From: Lennart Poettering Date: Tue, 20 Mar 2018 19:41:30 +0000 (+0100) Subject: journal: don't insist that the journal file header's boot ID matches the last entry X-Git-Tag: v239~514^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8513%2Fhead;p=thirdparty%2Fsystemd.git journal: don't insist that the journal file header's boot ID matches the last entry We update the boot ID whenever the file is opened for writing (i.e. set to ONLINE stat), even if we never write a single entry to it. Hence, don't insist that the last entry's boot ID matches the file header. As pointed out by Matthijs van Duin: https://lists.freedesktop.org/archives/systemd-devel/2018-March/040499.html --- diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c index dc6b21b1e9b..4d35168591e 100644 --- a/src/journal/journal-verify.c +++ b/src/journal/journal-verify.c @@ -1245,7 +1245,7 @@ int journal_file_verify( } if (entry_monotonic_set && - (!sd_id128_equal(entry_boot_id, f->header->boot_id) || + (sd_id128_equal(entry_boot_id, f->header->boot_id) && entry_monotonic != le64toh(f->header->tail_entry_monotonic))) { error(0, "Invalid tail monotonic timestamp"); r = -EBADMSG;