Convert the global 'bioops' into per-mount bio_ops. For now we also have
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 6 Nov 2007 03:50:02 +0000 (03:50 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 6 Nov 2007 03:50:02 +0000 (03:50 +0000)
commit408357d8b19e9bb56282ce677c3c3a7328ea7ed2
tree8e194d9c6a71bc0a2737abd5585cd2eb051651d4
parent3e997bb737e43bad8a85d20d11829e182db00c49
Convert the global 'bioops' into per-mount bio_ops.  For now we also have
to have a per buffer b_ops as well since the controlling filesystem cannot
be located from information in struct buf (b_vp could be the backing store
so that can't be used).  This change allows HAMMER to use bio_ops.

Change the ordering of the bio_ops.io_deallocate call so it occurs before
the buffer's B_LOCKED is checked.  This allows the deallocate call to set
B_LOCKED to retain the buffer in situations where the target filesystem
is unable to immediately disassociate the buffer.  Also keep VMIO intact
for B_LOCKED buffers (in addition to B_DELWRI buffers).

HAMMER will use this feature to keep buffers passively associated with
other filesystem structures and thus be able to avoid constantly brelse()ing
and getblk()ing them.
14 files changed:
sys/dev/disk/ccd/ccd.c
sys/kern/kern_shutdown.c
sys/kern/vfs_bio.c
sys/kern/vfs_cluster.c
sys/kern/vfs_mount.c
sys/kern/vfs_sync.c
sys/kern/vfs_syscalls.c
sys/sys/buf.h
sys/sys/buf2.h
sys/sys/mount.h
sys/vfs/specfs/spec_vnops.c
sys/vfs/ufs/ffs_softdep.c
sys/vfs/ufs/ffs_vnops.c
sys/vm/vm_pager.c