summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-10-26 10:44:10 +0000
committerphk <phk@FreeBSD.org>2004-10-26 10:44:10 +0000
commitfd2239c999cde831addfbfeb6a93874315b13654 (patch)
tree1dce54aab22f680923307ceb5fa06a88e65f184d /sys/kern/vfs_bio.c
parent274ea3ac5322264c230a2cb06b9ea72809a7c92f (diff)
downloadFreeBSD-src-fd2239c999cde831addfbfeb6a93874315b13654.zip
FreeBSD-src-fd2239c999cde831addfbfeb6a93874315b13654.tar.gz
The island council met and voted buf_prewrite() home.
Give ffs it's own bufobj->bo_ops vector and create a private strategy routine, (currently misnamed for forwards compatibility), which is just a copy of the generic bufstrategy routine except we call softdep_disk_prewrite() directly instead of through the buf_prewrite() indirection. Teach UFS about the need for softdep_disk_prewrite() and call the function directly in FFS. Remove buf_prewrite() from the default bufstrategy() and from the global bio_ops method vector.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 4b23f51..64231f2 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3777,12 +3777,10 @@ bufstrategy(struct bufobj *bo, struct buf *bp)
KASSERT(vp->v_type != VCHR && vp->v_type != VBLK,
("Wrong vnode in bufstrategy(bp=%p, vp=%p)", bp, vp));
#endif
- if (vp->v_type == VCHR) {
- if (!buf_prewrite(bp->b_vp, bp))
- i = VOP_SPECSTRATEGY(vp, bp);
- } else {
+ if (vp->v_type == VCHR)
+ i = VOP_SPECSTRATEGY(vp, bp);
+ else
i = VOP_STRATEGY(vp, bp);
- }
KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
}
OpenPOWER on IntegriCloud