Date: Sat, 06 Mar 2021 09:07:04 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 254058] zfs doesn't set mnt_time aka RootOnZFS doesn't work without RTC Message-ID: <bug-254058-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254058 Bug ID: 254058 Summary: zfs doesn't set mnt_time aka RootOnZFS doesn't work without RTC Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: peterj@FreeBSD.org vfs_mountroot() extracts the most recent mnt_time from the mounted filesystems (root and devfs at the time) and passes it to inittodr() as a fallback if there isn't a functioning system RTC. This is intended to ensure that things like log timestamps don't go backwards. Unfortunately, only the UFS code actually initialises mnt_time so other root filesystems types will leave mnt_time set to the epoch (1970-01-01 0000Z). Root on NFS isn't impacted because that uses nfs_mountroot(), which does inittodr() based on the remote filesystem. That leaves ZFS: If a system with root on ZFS doesn't have a functioning RTC then the system time will start at 1970-01-01 0000Z until (eg) NTP fixes it. This leaves close-to-epoch timestamps strewn throughout the filesystem, which is annoying. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254058-227>
