Subject: CVS commit: syssrc/sys/ufs/ufs
To: None <>
From: Konrad Schroder <>
List: source-changes
Date: 07/13/2001 23:30:26
Module Name:	syssrc
Committed By:	perseant
Date:		Fri Jul 13 20:30:26 UTC 2001

Modified Files:
	basesrc/libexec/lfs_cleanerd: clean.h cleanerd.c lfs_cleanerd.8
	    library.c misc.c print.c
	basesrc/sbin/dump_lfs: Makefile lfs_inode.c
	basesrc/sbin/fsck_lfs: dir.c inode.c pass0.c pass1.c pass5.c setup.c
	basesrc/sbin/newfs_lfs: config.h extern.h lfs.c misc.c newfs.c
	basesrc/usr.sbin/dumplfs: dumplfs.c extern.h misc.c
	syssrc/sys/ufs/lfs: TODO lfs.h lfs_alloc.c lfs_balloc.c lfs_bio.c
	    lfs_cksum.c lfs_debug.c lfs_extern.h lfs_inode.c lfs_segment.c
	    lfs_subr.c lfs_syscalls.c lfs_vfsops.c lfs_vnops.c
	syssrc/sys/ufs/ufs: ufs_readwrite.c

Log Message:
Merge the short-lived perseant-lfsv2 branch into the trunk.

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.

To generate a diff of this commit:
cvs rdiff -r1.10 -r1.11 basesrc/libexec/lfs_cleanerd/clean.h
cvs rdiff -r1.30 -r1.31 basesrc/libexec/lfs_cleanerd/cleanerd.c
cvs rdiff -r1.8 -r1.9 basesrc/libexec/lfs_cleanerd/lfs_cleanerd.8
cvs rdiff -r1.21 -r1.22 basesrc/libexec/lfs_cleanerd/library.c
cvs rdiff -r1.6 -r1.7 basesrc/libexec/lfs_cleanerd/misc.c
cvs rdiff -r1.9 -r1.10 basesrc/libexec/lfs_cleanerd/print.c
cvs rdiff -r1.1 -r1.2 basesrc/sbin/dump_lfs/Makefile
cvs rdiff -r1.2 -r1.3 basesrc/sbin/dump_lfs/lfs_inode.c
cvs rdiff -r1.4 -r1.5 basesrc/sbin/fsck_lfs/dir.c
cvs rdiff -r1.10 -r1.11 basesrc/sbin/fsck_lfs/inode.c \
cvs rdiff -r1.8 -r1.9 basesrc/sbin/fsck_lfs/pass0.c \
    basesrc/sbin/fsck_lfs/pass5.c basesrc/sbin/fsck_lfs/setup.c
cvs rdiff -r1.7 -r1.8 basesrc/sbin/fsck_lfs/utilities.c
cvs rdiff -r1.5 -r1.6 basesrc/sbin/newfs_lfs/config.h
cvs rdiff -r1.4 -r1.5 basesrc/sbin/newfs_lfs/extern.h
cvs rdiff -r1.21 -r1.22 basesrc/sbin/newfs_lfs/lfs.c
cvs rdiff -r1.1 -r1.2 basesrc/sbin/newfs_lfs/misc.c
cvs rdiff -r1.6 -r1.7 basesrc/sbin/newfs_lfs/newfs.c
cvs rdiff -r1.12 -r1.13 basesrc/sbin/newfs_lfs/newfs_lfs.8
cvs rdiff -r1.18 -r1.19 basesrc/usr.sbin/dumplfs/dumplfs.c
cvs rdiff -r1.4 -r1.5 basesrc/usr.sbin/dumplfs/extern.h
cvs rdiff -r1.5 -r1.6 basesrc/usr.sbin/dumplfs/misc.c
cvs rdiff -r1.4 -r1.5 syssrc/sys/ufs/lfs/TODO
cvs rdiff -r1.36 -r1.37 syssrc/sys/ufs/lfs/lfs.h
cvs rdiff -r1.47 -r1.48 syssrc/sys/ufs/lfs/lfs_alloc.c
cvs rdiff -r1.28 -r1.29 syssrc/sys/ufs/lfs/lfs_balloc.c
cvs rdiff -r1.35 -r1.36 syssrc/sys/ufs/lfs/lfs_bio.c
cvs rdiff -r1.15 -r1.16 syssrc/sys/ufs/lfs/lfs_cksum.c
cvs rdiff -r1.11 -r1.12 syssrc/sys/ufs/lfs/lfs_debug.c
cvs rdiff -r1.24 -r1.25 syssrc/sys/ufs/lfs/lfs_extern.h
cvs rdiff -r1.51 -r1.52 syssrc/sys/ufs/lfs/lfs_inode.c
cvs rdiff -r1.68 -r1.69 syssrc/sys/ufs/lfs/lfs_segment.c
cvs rdiff -r1.17 -r1.18 syssrc/sys/ufs/lfs/lfs_subr.c
cvs rdiff -r1.56 -r1.57 syssrc/sys/ufs/lfs/lfs_syscalls.c
cvs rdiff -r1.65 -r1.66 syssrc/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -r1.50 -r1.51 syssrc/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -r1.31 -r1.32 syssrc/sys/ufs/ufs/ufs_readwrite.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.