DragonFly commits List (threaded) for 2006-05
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/sys/dev/disk/ccd ccd.c src/sys/dev/disk/vn vn.c src/sys/i386/i386 machdep.c src/sys/kern subr_diskslice.c vfs_bio.c vfs_cluster.c src/sys/sys buf.h src/sys/vfs/mfs mfs_vfsops.c
dillon 2006/05/04 11:32:23 PDT
DragonFly src repository
Modified files:
sys/dev/disk/ccd ccd.c
sys/dev/disk/vn vn.c
sys/i386/i386 machdep.c
sys/kern subr_diskslice.c vfs_bio.c vfs_cluster.c
sys/sys buf.h
sys/vfs/mfs mfs_vfsops.c
Log:
Block devices generally truncate the size of I/O requests which go past EOF.
This is exactly what we want when manually reading or writing a block device
such as /dev/ad0s1a, but is not desired when a VFS issues I/O ops on
filesystem buffers. In such cases, any EOF condition must be considered an
error.
Implement a new filesystem buffer flag B_BNOCLIP, which getblk() and friends
automatically set. If set, block devices are guarenteed to return an error
if the I/O request is at EOF or would otherwise have to be clipped to EOF.
Block devices further guarentee that b_bcount will not be modified when this
flag is set.
Adjust all block device EOF checks to use the new flag, and clean up the code
while I'm there. Also, set b_resid in a couple of degenerate cases where
it was not being set.
Revision Changes Path
1.30 +30 -31 src/sys/dev/disk/ccd/ccd.c
1.21 +36 -31 src/sys/dev/disk/vn/vn.c
1.91 +31 -14 src/sys/i386/i386/machdep.c
1.19 +30 -18 src/sys/kern/subr_diskslice.c
1.72 +1 -1 src/sys/kern/vfs_bio.c
1.25 +1 -1 src/sys/kern/vfs_cluster.c
1.35 +15 -18 src/sys/sys/buf.h
1.29 +37 -23 src/sys/vfs/mfs/mfs_vfsops.c
http://www.dragonflybsd.org/cvsweb/src/sys/dev/disk/ccd/ccd.c.diff?r1=1.29&r2=1.30&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/dev/disk/vn/vn.c.diff?r1=1.20&r2=1.21&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/machdep.c.diff?r1=1.90&r2=1.91&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/subr_diskslice.c.diff?r1=1.18&r2=1.19&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_bio.c.diff?r1=1.71&r2=1.72&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_cluster.c.diff?r1=1.24&r2=1.25&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/buf.h.diff?r1=1.34&r2=1.35&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/mfs/mfs_vfsops.c.diff?r1=1.28&r2=1.29&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]