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:
15804ce
)
journal: suggest rotation when fields are not indexed
author
Lennart Poettering
<lennart@poettering.net>
Thu, 18 Oct 2012 02:12:25 +0000
(
04:12
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 18 Oct 2012 02:12:25 +0000
(
04:12
+0200)
src/journal/journal-file.c
patch
|
blob
|
history
diff --git
a/src/journal/journal-file.c
b/src/journal/journal-file.c
index 43fd4453a44accfde468c66c37f1e236072f43e2..edf8e7dd5e3dcd0dc23d4e9bbfd697484734a74e 100644
(file)
--- 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;