Page MenuHomeFreeBSD

newfs: warn if newer than kernel
ClosedPublic

Authored by emaste on Oct 23 2017, 12:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 2:45 PM
Unknown Object (File)
Thu, May 2, 2:45 PM
Unknown Object (File)
Thu, May 2, 2:45 PM
Unknown Object (File)
Thu, May 2, 1:49 PM
Unknown Object (File)
Mar 22 2024, 10:23 PM
Unknown Object (File)
Mar 22 2024, 10:23 PM
Unknown Object (File)
Mar 22 2024, 10:23 PM
Unknown Object (File)
Mar 8 2024, 2:47 PM
Subscribers

Details

Summary

Creating a UFS filesystem with a newfs newer than the running kernel, and then mounting that filesystem, can lead to interesting failures - see e.g. freebsd-current mailing list posting VM images for 12.0-CURRENT showing checksum failed messages. Add a safety belt to explicitly warn when newfs is newer than the running kernel.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Oct 23 2017, 2:08 PM
This revision was automatically updated to reflect the committed changes.

Won't this trigger every single time we build a snapshot with a kernel that doesn't match? Unless we're rebooting with the new kernel we just built to build a snapshot, I'm having trouble understanding how this would be helpful in preventing the checksum issue from repeating when kirk, say, adds the same to the superblock or some other area he has bits defined for.

In D12765#272641, @imp wrote:

Won't this trigger every single time we build a snapshot with a kernel that doesn't match?

This triggered because we ran new newfs, mounted that filesystem on an old kernel to populate it. Then the filesystem is used by the new kernel in the snapshot.

In D12765#272641, @imp wrote:

Won't this trigger every single time we build a snapshot with a kernel that doesn't match?

This triggered because we ran new newfs, mounted that filesystem on an old kernel to populate it. Then the filesystem is used by the new kernel in the snapshot.

Right. Because we use the new newfs with the old kernel in the release process, we'd get this warning every time freebsd version is bumped. This means that effectively all of the snapshots we generate going forward would get this warning while building when none of them will be an actual problem.

Because we use the new newfs with the old kernel in the release process

Yes, this is a bug in the release process that needs to be fixed, since the same type of problem will come back again whenever we add new syscalls etc.

gjb removed a subscriber: imp.
gjb added a subscriber: imp.