Subject: CVS commit: src/sys/ufs
To: None <source-changes@NetBSD.org>
From: Konrad Schroder <perseant@netbsd.org>
List: source-changes
Date: 02/26/2005 05:40:43
Module Name: src
Committed By: perseant
Date: Sat Feb 26 05:40:43 UTC 2005
Modified Files:
src/sys/ufs/lfs: TODO lfs.h lfs_alloc.c lfs_balloc.c lfs_bio.c
lfs_extern.h lfs_segment.c lfs_subr.c lfs_syscalls.c lfs_vfsops.c
lfs_vnops.c
src/sys/ufs/ufs: ufs_readwrite.c
Log Message:
Various minor LFS improvements:
* Note when lfs_putpages(9) thinks it is not going to be writing any
pages before calling genfs_putpages(9). This prevents a situation in
which blocks can be queued for writing without a segment header.
* Correct computation of NRESERVE(), though it is still a gross
overestimate in most cases. Note that if NRESERVE() is too high, it
may be impossible to create files on the filesystem. We catch this
case on filesystem mount and refuse to mount r/w.
* Allow filesystems to be mounted whose block size is == MAXBSIZE.
* Somewhere along the line, ufs_bmaparray(9) started mangling UNWRITTEN
entries in indirect blocks again, triggering a failed assertion "daddr
<= LFS_MAX_DADDR". Explicitly convert to and from int32_t to correct
this.
* Add a high-water mark for the number of dirty pages any given LFS can
hold before triggering a flush. This is settable by sysctl, but off
(zero) by default.
* Be more careful about the MAX_BYTES and MAX_BUFS computations so we
shouldn't see "please increase to at least zero" messages.
* Note that VBLK and VCHR vnodes can have nonzero values in di_db[0]
even though their v_size == 0. Don't panic when we see this.
* Change lfs_bfree to a signed quantity. The manner in which it is
processed before being passed to the cleaner means that sometimes it
may drop below zero, and the cleaner must be aware of this.
* Never report bfree < 0 (or higher than lfs_dsize) through
lfs_statvfs(9). This prevents df(1) from ever telling us that our full
filesystems have 16TB free.
* Account space allocated through lfs_balloc(9) that does not have
associated buffer headers, so that the pagedaemon doesn't run us out
of segments.
* Return ENOSPC from lfs_balloc(9) when bfree drops to zero.
* Address a deadlock in lfs_bmapv/lfs_markv when the filesystem is being
unmounted. Because vfs_busy() is a shared lock, and
lfs_bmapv/lfs_markv mark the filesystem vfs_busy(), the cleaner can be
holding the lock that umount() is blocking on, then try to vfs_busy()
again in getnewvnode().
To generate a diff of this commit:
cvs rdiff -r1.7 -r1.8 src/sys/ufs/lfs/TODO
cvs rdiff -r1.74 -r1.75 src/sys/ufs/lfs/lfs.h
cvs rdiff -r1.73 -r1.74 src/sys/ufs/lfs/lfs_alloc.c
cvs rdiff -r1.48 -r1.49 src/sys/ufs/lfs/lfs_balloc.c
cvs rdiff -r1.77 -r1.78 src/sys/ufs/lfs/lfs_bio.c
cvs rdiff -r1.61 -r1.62 src/sys/ufs/lfs/lfs_extern.h
cvs rdiff -r1.155 -r1.156 src/sys/ufs/lfs/lfs_segment.c
cvs rdiff -r1.47 -r1.48 src/sys/ufs/lfs/lfs_subr.c
cvs rdiff -r1.100 -r1.101 src/sys/ufs/lfs/lfs_syscalls.c
cvs rdiff -r1.162 -r1.163 src/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -r1.133 -r1.134 src/sys/ufs/lfs/lfs_vnops.c
cvs rdiff -r1.60 -r1.61 src/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.