Page MenuHomeFreeBSD

Fix makefs inode initialization
ClosedPublic

Authored by markj on Dec 15 2017, 10:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 6:15 PM
Unknown Object (File)
Wed, Dec 4, 5:50 PM
Unknown Object (File)
Tue, Nov 26, 4:58 AM
Unknown Object (File)
Oct 29 2024, 11:48 AM
Unknown Object (File)
Oct 29 2024, 11:47 AM
Unknown Object (File)
Oct 29 2024, 11:47 AM
Unknown Object (File)
Oct 29 2024, 11:27 AM
Unknown Object (File)
Oct 5 2024, 6:06 AM
Subscribers
None

Details

Summary

UFS2 does lazy initialization of inodes. makefs emulates this, but fails
to take into account the fact that we might need to initialize multiple
blocks to write a given inode. If we don't, a later initialization will
clobber that inode.

Specific inode number allocation patterns are needed to hit this case,
so it's somewhat hard to test.

Test Plan

I have a VM image-building script which can trigger the problem.
In particular, it generates images which are not clean according to fsck:
it finds directory entries pointing to unallocated (clobbered) inodes.
With this change, fsck runs cleanly, and all makefs tests pass.

Diff Detail

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