journal: special case the trivial cache chain cache entry
This commit is contained in:
parent
8bc8ab83c8
commit
34741aa3e2
|
@ -1328,6 +1328,11 @@ static void chain_cache_put(
|
|||
uint64_t total) {
|
||||
|
||||
if (!ci) {
|
||||
/* If the chain item to cache for this chain is the
|
||||
* first one it's not worth caching anything */
|
||||
if (array == first)
|
||||
return;
|
||||
|
||||
if (hashmap_size(h) >= CHAIN_CACHE_MAX)
|
||||
ci = hashmap_steal_first(h);
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue