[systemd-commits] src/journal
Lennart Poettering
lennart at kemper.freedesktop.org
Wed Oct 17 19:12:35 PDT 2012
src/journal/journal-file.c | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 0598fd4a9548fbe0b642d7ef6eb0ed490ec0ee0f
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Oct 18 04:12:25 2012 +0200
journal: suggest rotation when fields are not indexed
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 43fd445..edf8e7d 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2753,6 +2753,13 @@ bool journal_file_rotate_suggested(JournalFile *f, usec_t max_file_usec) {
return true;
}
+ /* Are the data objects properly indexed by field objects? */
+ if (JOURNAL_HEADER_CONTAINS(f->header, n_data) &&
+ JOURNAL_HEADER_CONTAINS(f->header, n_fields) &&
+ le64toh(f->header->n_data) > 0 &&
+ le64toh(f->header->n_fields) == 0)
+ return true;
+
if (max_file_usec > 0) {
usec_t t, h;
More information about the systemd-commits
mailing list