CVSROOT:        /cvs
Module name:    src
Changes by:     v...@cvs.openbsd.org    2025/05/18 05:47:35

Modified files:
        sys/arch/octeon/conf: BOOT 
        sys/arch/powerpc64/conf: BOOT 
        sys/ufs/ffs    : ffs_vfsops.c 

Log message:
Skip filesystem mount time update in BOOT kernels

When the kernel boots on a system without RTC, system time is set up
using previous mount time of the root filesystem. In a BOOT-kernel-based
bootloader the initial root filesystem is the embedded ramdisk image.
When the bootloader proceeds to mount and unmount the actual root
filesystem, the root filesystem's mount time is reset back to the
constant ramdisk mount time plus small amount of uptime. Consequently
the system always boots with (nearly) the same initial time, when RTC
is not present.

To enable crude timekeeping across reboots without RTC and NTP,
do not update filesystem mount times in BOOT kernels. This is similar
to the behaviour of conventional bootblocks.

Timestamp update skipping suggested by deraadt@
OK kettenis@ kirill@

Reply via email to