On Do, 15.03.18 07:02, Matthijs van Duin (matthijsvanduin at gmail.com) wrote: > While studying a bit how journal works, I noticed something odd: > > My understanding of the boot_id field in the file header is that it should > reflect the boot_id of the tail entry, to allow correct interpretation of > the tail_entry_monotonic timestamp. This also agrees with the checks done > by journal_file_verify(). > > However, in journal_file_refresh_header(), the boot_id field is updated to > the current boot id even though no entry is being added there. This is even > being done before the journal file is set online! I am pretty sure the boot ID should reflect the boot the file was last set online on. Hence I'd say journal_file_verify() is wrong, and journal_file_refresh_header() is right. Will fix! > Shouldn't the header boot_id instead be refreshed > in journal_file_link_entry(), where the tail_entry timestamps are being > updated? > > (also, the tail_entry_monotonic_valid flag of JournalFile doesn't seem to > get tested anywhere?) True! I guess we can drop that. Will fix, too! Thanks for the hints, such code reviews are very welcome! Lennart -- Lennart Poettering, Red Hat