journal: Relax boot ID and monotonic clock consistency checks
authormsizanoen <msizanoen@qtmlabs.xyz>
Wed, 30 Aug 2023 11:53:29 +0000 (18:53 +0700)
committermsizanoen <msizanoen@qtmlabs.xyz>
Wed, 30 Aug 2023 13:17:18 +0000 (20:17 +0700)
commitaddcecf6f4686811b63d48d51398d887c2c4bb68
tree38ea546a4e6ab94769913162d3a0a002a1f6025c
parent2f766aca1e1398288e01b26a69eb02a7b831ab00
journal: Relax boot ID and monotonic clock consistency checks

The monotonic clock value consistency should only be checked if the boot
ID is the same as the last journal entry, and requiring that the current
boot ID be the same as the boot ID of the last entry is not necessary
for ensuring deterministic bisection as we already enforce strict
ordering of the real time clock value in a single journal file.

This fixes an issue where a new journal file is unnecessarily created
every boot, potentially wasting storage space.
src/journal/journald-server.c
src/libsystemd/sd-journal/journal-file.c