Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
bandwidth and seek time of the disk, using the "4 * bandwidth * seek
time" formula from Neefe-Matthews' 1997 paper. An RZ25 disk with this
option gets 200K segments. Reference the paper in the manual page.
kernel.
Don't make more superblock segments than we have a record of in
the superblock; and print these out as we go, like newfs.
Add am "-M" flag to specify the number of reserved segments, with a note
in the man page not to use it.
size" (for consistency with bsize/fsize, and since segment size == block
size is never a valid combination).
Updated the man page to include explicit reasonable values for fsize, bsize,
and sgs, at suggestion from Hubert Feyrer.
segment size from block size).
newfs_lfs now reads the disklabel to find segment, block, and fragment
sizes. Because reading this info from the wrong fs type could result in
very poor fs layout (e.g. ffs has "16" where the segshift would go,
resulting in 512-*megabyte* segments for 8K blocks), newfs_lfs refuses
to create a filesystem on a partition not labeled "4.4LFS".
Man pages for newfs_lfs updated to reflect this change.
also fix newfs_lfs to get rid of all sorts of useless options that applied
only to newfs_ffs. Corrected reference to the FFS paper to the reference
to the BSD-LFS paper.