summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-10-24 20:03:41 +0000
committerphk <phk@FreeBSD.org>2004-10-24 20:03:41 +0000
commit1b25a5988640ac862e8e964c30aaccfd83e128cf (patch)
tree220ef3feb4e3c7063a6550b7466cbd964e346c84 /sys/kern/vfs_cluster.c
parent27296db6a7b0487c98e7e27a7765cf3d19bdf963 (diff)
downloadFreeBSD-src-1b25a5988640ac862e8e964c30aaccfd83e128cf.zip
FreeBSD-src-1b25a5988640ac862e8e964c30aaccfd83e128cf.tar.gz
Move the buffer method vector (buf->b_op) to the bufobj.
Extend it with a strategy method. Add bufstrategy() which do the usual VOP_SPECSTRATEGY/VOP_STRATEGY song and dance. Rename ibwrite to bufwrite(). Move the two NFS buf_ops to more sensible places, add bufstrategy to them. Add inlines for bwrite() and bstrategy() which calls through buf->b_bufobj->b_ops->b_{write,strategy}(). Replace almost all VOP_STRATEGY()/VOP_SPECSTRATEGY() calls with bstrategy().
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 1626929..7f0701c 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -236,10 +236,8 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp)
if ((bp->b_flags & B_ASYNC) || bp->b_iodone != NULL)
BUF_KERNPROC(bp);
bp->b_iooffset = dbtob(bp->b_blkno);
- error = VOP_STRATEGY(vp, bp);
+ bstrategy(bp);
curproc->p_stats->p_ru.ru_inblock++;
- if (error)
- return (error);
}
/*
@@ -291,7 +289,7 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp)
if ((rbp->b_flags & B_ASYNC) || rbp->b_iodone != NULL)
BUF_KERNPROC(rbp);
rbp->b_iooffset = dbtob(rbp->b_blkno);
- (void) VOP_STRATEGY(vp, rbp);
+ bstrategy(rbp);
curproc->p_stats->p_ru.ru_inblock++;
}
@@ -824,7 +822,6 @@ cluster_wbuild(vp, size, start_lbn, len)
TAILQ_INIT(&bp->b_cluster.cluster_head);
bp->b_bcount = 0;
bp->b_magic = tbp->b_magic;
- bp->b_op = tbp->b_op;
bp->b_bufobj = tbp->b_bufobj;
bp->b_bufsize = 0;
bp->b_npages = 0;
OpenPOWER on IntegriCloud