From 1b25a5988640ac862e8e964c30aaccfd83e128cf Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 24 Oct 2004 20:03:41 +0000 Subject: 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(). --- sys/ufs/ffs/ffs_inode.c | 2 +- sys/ufs/ufs/ufs_bmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/ufs') diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index ce0d77e..372d83c 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -562,7 +562,7 @@ ffs_indirtrunc(ip, lbn, dbn, lastbn, level, countp) bp->b_blkno = dbn; vfs_busy_pages(bp, 0); bp->b_iooffset = dbtob(bp->b_blkno); - VOP_STRATEGY(bp->b_vp, bp); + bstrategy(bp); error = bufwait(bp); } if (error) { diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 6035baf..63f958c 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -225,7 +225,7 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, runb) bp->b_ioflags &= ~BIO_ERROR; vfs_busy_pages(bp, 0); bp->b_iooffset = dbtob(bp->b_blkno); - VOP_STRATEGY(bp->b_vp, bp); + bstrategy(bp); curproc->p_stats->p_ru.ru_inblock++; /* XXX */ error = bufwait(bp); if (error) { -- cgit v1.1