summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2021-10-23 22:36:47 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2022-10-07 12:20:08 +0200
commit99daf3ce03f4091c74400f895f9c82a1c046e645 (patch)
tree6d6fc9fe60da785e7ef42b4923f44aa435428cd4 /src/journal
parentd06727aec2840dc3d6d1cb2b7032562eda8bf3b4 (diff)
downloadsystemd-99daf3ce03f4091c74400f895f9c82a1c046e645.tar.gz
journal: Use 32-bit entry array offsets in compact mode
Before: OBJECT TYPE ENTRIES SIZE Unused 0 0B Data 3610336 595.7M Field 5310 285.2K Entry 3498326 1.2G Data Hash Table 29 103.1M Field Hash Table 29 151.3K Entry Array 605991 1011.6M Tag 0 0B Total 7720021 2.9G After: OBJECT TYPE ENTRIES SIZE Unused 0 0B Data 3562667 591.0M Field 3971 213.6K Entry 3498566 1.2G Data Hash Table 20 71.1M Field Hash Table 20 104.3K Entry Array 582647 505.0M Tag 0 0B Total 7647891 2.4G
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/managed-journal-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/managed-journal-file.c b/src/journal/managed-journal-file.c
index c22aac3271..c8522126f3 100644
--- a/src/journal/managed-journal-file.c
+++ b/src/journal/managed-journal-file.c
@@ -50,7 +50,7 @@ static int managed_journal_file_entry_array_punch_hole(JournalFile *f, uint64_t
if (r < 0)
return r;
- n_items += journal_file_entry_array_n_items(&o);
+ n_items += journal_file_entry_array_n_items(f, &o);
p = q;
}
@@ -67,7 +67,7 @@ static int managed_journal_file_entry_array_punch_hole(JournalFile *f, uint64_t
return 0;
offset = p + offsetof(Object, entry_array.items) +
- (journal_file_entry_array_n_items(&o) - n_unused) * sizeof(le64_t);
+ (journal_file_entry_array_n_items(f, &o) - n_unused) * journal_file_entry_array_item_size(f);
sz = p + le64toh(o.object.size) - offset;
if (sz < MINIMUM_HOLE_SIZE)