diff options
author | phk <phk@FreeBSD.org> | 2004-10-24 20:03:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-24 20:03:41 +0000 |
commit | 1b25a5988640ac862e8e964c30aaccfd83e128cf (patch) | |
tree | 220ef3feb4e3c7063a6550b7466cbd964e346c84 /sys/nfs4client | |
parent | 27296db6a7b0487c98e7e27a7765cf3d19bdf963 (diff) | |
download | FreeBSD-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/nfs4client')
-rw-r--r-- | sys/nfs4client/nfs4_vnops.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c index d855109..91ca6cc 100644 --- a/sys/nfs4client/nfs4_vnops.c +++ b/sys/nfs4client/nfs4_vnops.c @@ -2956,7 +2956,7 @@ nfs4_writebp(struct buf *bp, int force __unused, struct thread *td) BUF_KERNPROC(bp); bp->b_iooffset = dbtob(bp->b_blkno); - VOP_STRATEGY(bp->b_vp, bp); + bstrategy(bp); if( (oldflags & B_ASYNC) == 0) { int rtval = bufwait(bp); @@ -3081,3 +3081,22 @@ nfsfifo_close(struct vop_close_args *ap) } #endif + +/* + * Just call nfs_writebp() with the force argument set to 1. + * + * NOTE: B_DONE may or may not be set in a_bp on call. + */ +static int +nfs4_bwrite(struct buf *bp) +{ + + return (nfs4_writebp(bp, 1, curthread)); +} + +struct buf_ops buf_ops_nfs4 = { + .bop_name = "buf_ops_nfs4", + .bop_write = nfs4_bwrite, + .bop_strategy = bufstrategy, +}; + |