chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8bc8ab8
)
journal: special case the trivial cache chain cache entry
author
Lennart Poettering
<lennart@poettering.net>
Fri, 26 Oct 2012 18:25:36 +0000
(20:25 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 26 Oct 2012 18:25:36 +0000
(20:25 +0200)
src/journal/journal-file.c
patch
|
blob
|
history
diff --git
a/src/journal/journal-file.c
b/src/journal/journal-file.c
index 6c9deacf2ce1c26ccbe94e9b7fcaff070b86961b..3df099dbd2f3af936713cb413bdb448265a30b2e 100644
(file)
--- a/
src/journal/journal-file.c
+++ b/
src/journal/journal-file.c
@@
-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 {