DragonFly commits List (threaded) for 2006-05
cvs commit: src/sys/kern vfs_bio.c vfs_subr.c src/sys/sys buf.h src/sys/vm vnode_pager.c
dillon 2006/05/25 12:31:15 PDT
DragonFly src repository
sys/kern vfs_bio.c vfs_subr.c
Fix several buffer cache issues related to B_NOCACHE.
* Do not set B_NOCACHE when calling vinvalbuf(... V_SAVE). This will
destroy dirty VM backing store associated with clean buffers before
the VM system has a chance to check for and flush them.
* Properly set B_NOCACHE when destroying buffers related to truncated data.
* Fix a bug in vnode_pager_setsize() that was recently introduced.
v_filesize was being set before a new/old size comparison, causing a
file truncation to not destroy related VM pages past the new EOF.
* Remove a bogus B_NOCACHE|B_DIRTY test in brelse(). This was originally
intended to be a B_NOCACHE|B_DELWRITE test which then cleared B_NOCACHE,
but now that B_NOCACHE operation has been fixed it really does indicate that
the buffer, its contents, and its backing store are to be destroyed, even
if the buffer is marked B_DELWRI.
Instead of clearing B_NOCACHE when B_DELWRITE is found to be set, clear
B_DELWRITE when B_NOCACHE is found to be set.
Note that B_NOCACHE is still cleared when bdirty() is called in order to
ensure that data is not lost when softupdates and other code do a
'B_NOCACHE + bwrite' sequence. Softupdates can redirty a buffer in its
io completion hook and a write error can also redirty a buffer.
* The VMIO buffer rundown seems to have mophed into a state where the
distinction between NFS and non-NFS buffers can be removed. Remove
Revision Changes Path
1.76 +36 -31 src/sys/kern/vfs_bio.c
1.87 +19 -7 src/sys/kern/vfs_subr.c
1.37 +1 -1 src/sys/sys/buf.h
1.30 +3 -1 src/sys/vm/vnode_pager.c