Subject: CVS commit: src/sbin/fsck_lfs
To: None <source-changes@NetBSD.org>
From: Konrad Schroder <perseant@netbsd.org>
List: source-changes
Date: 07/18/2006 23:37:13
Module Name:	src
Committed By:	perseant
Date:		Tue Jul 18 23:37:13 UTC 2006

Modified Files:
	src/sbin/fsck_lfs: Makefile fsck_vars.h inode.c lfs.c lfs_user.h main.c
	    pass0.c pass1.c pass4.c pass5.c pass6.c segwrite.c setup.c
	    utilities.c vars.c

Log Message:
Various improvements to fsck_lfs, to wit:

* Add lfs_balloc capability to the lfs library.
* Extend the Ifile if we run out of free inodes when creating lost+found.
* Don't roll forward if we have allocated a lost+found, to avoid
  conflicts when adding new files in roll-forward.
* Make some messages slightly more verbose (e.g. include inode number,
  and use pwarn() instead of printf() so the messages include the device
  name when preening).
* Change superblock detection/avoidance to use the offset table in the
  primary superblock, rather than looking at the contents.
* Be more verbose about various operations when passed the -d flag,
  especially roll-forward.
* Be more careful about dirops during roll forward, since the cleaner can
  sometimes write blocks from dirop vnodes.  Detect and avoid this problem.
* Always check the free list, even if given -i; if we're going to write
  it we have to check it first.
* Mark inodes dirty when blocks are found during roll forward, so the
  inodes are written with the new block locations.
* Update size of inodes if blocks beyond EOF are found during roll
  forward.
* Fix segment accounting for blocks and inodes found during roll
  forward.
* Report statistics on roll forward: how many new/deleted/moved files
  and how many updated blocks (or "nothing new").
* Don't care if the device being checked is really a device, if we have
  been passed the -f flag (to facilitate automated testing).
* When writing to the disk, use the current time in the segment headers
  rathern than time 0.
* When passed the -i flag, locate the partial segment containing the
  Ifile inode and use that to calculate lfs_offset, lfs_curseg,
  lfs_nextseg.  (Again for automated testing.)


To generate a diff of this commit:
cvs rdiff -r1.12 -r1.13 src/sbin/fsck_lfs/Makefile \
    src/sbin/fsck_lfs/segwrite.c
cvs rdiff -r1.10 -r1.11 src/sbin/fsck_lfs/fsck_vars.h \
    src/sbin/fsck_lfs/vars.c
cvs rdiff -r1.31 -r1.32 src/sbin/fsck_lfs/inode.c
cvs rdiff -r1.23 -r1.24 src/sbin/fsck_lfs/lfs.c
cvs rdiff -r1.1 -r1.2 src/sbin/fsck_lfs/lfs_user.h
cvs rdiff -r1.28 -r1.29 src/sbin/fsck_lfs/main.c src/sbin/fsck_lfs/setup.c
cvs rdiff -r1.27 -r1.28 src/sbin/fsck_lfs/pass0.c
cvs rdiff -r1.24 -r1.25 src/sbin/fsck_lfs/pass1.c \
    src/sbin/fsck_lfs/utilities.c
cvs rdiff -r1.13 -r1.14 src/sbin/fsck_lfs/pass4.c
cvs rdiff -r1.18 -r1.19 src/sbin/fsck_lfs/pass5.c
cvs rdiff -r1.11 -r1.12 src/sbin/fsck_lfs/pass6.c

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