diff options
author | mckusick <mckusick@FreeBSD.org> | 1999-06-16 23:27:55 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 1999-06-16 23:27:55 +0000 |
commit | 88e39a63db386a8e7939538fd1b350cbe663486b (patch) | |
tree | 002e7a32883a2178dd2164b02c296d429dee5cfd /sys/kern | |
parent | 97a0215ac1c4c057e39723365f18d612e9304581 (diff) | |
download | FreeBSD-src-88e39a63db386a8e7939538fd1b350cbe663486b.zip FreeBSD-src-88e39a63db386a8e7939538fd1b350cbe663486b.tar.gz |
Add a vnode argument to VOP_BWRITE to get rid of the last vnode
operator special case. Delete special case code from vnode_if.sh,
vnode_if.src, umap_vnops.c, and null_vnops.c.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 14 | ||||
-rw-r--r-- | sys/kern/vfs_export.c | 8 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 8 | ||||
-rw-r--r-- | sys/kern/vnode_if.pl | 47 | ||||
-rw-r--r-- | sys/kern/vnode_if.sh | 47 | ||||
-rw-r--r-- | sys/kern/vnode_if.src | 11 |
6 files changed, 23 insertions, 112 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 88e0956..43acafb 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $Id: vfs_bio.c,v 1.212 1999/06/15 23:37:23 mckusick Exp $ + * $Id: vfs_bio.c,v 1.213 1999/06/16 03:19:04 tegge Exp $ */ /* @@ -699,7 +699,7 @@ void bawrite(struct buf * bp) { bp->b_flags |= B_ASYNC; - (void) VOP_BWRITE(bp); + (void) VOP_BWRITE(bp->b_vp, bp); } /* @@ -714,7 +714,7 @@ int bowrite(struct buf * bp) { bp->b_flags |= B_ORDERED | B_ASYNC; - return (VOP_BWRITE(bp)); + return (VOP_BWRITE(bp->b_vp, bp)); } /* @@ -1155,7 +1155,7 @@ vfs_bio_awrite(struct buf * bp) * XXX returns b_bufsize instead of b_bcount for nwritten? */ nwritten = bp->b_bufsize; - (void) VOP_BWRITE(bp); + (void) VOP_BWRITE(bp->b_vp, bp); return nwritten; } @@ -1880,7 +1880,7 @@ loop: ) { if (bp->b_flags & B_DELWRI) { bp->b_flags |= B_NOCACHE; - VOP_BWRITE(bp); + VOP_BWRITE(bp->b_vp, bp); } else { if ((bp->b_flags & B_VMIO) && (LIST_FIRST(&bp->b_dep) == NULL)) { @@ -1888,7 +1888,7 @@ loop: brelse(bp); } else { bp->b_flags |= B_NOCACHE; - VOP_BWRITE(bp); + VOP_BWRITE(bp->b_vp, bp); } } goto loop; @@ -1925,7 +1925,7 @@ loop: */ if ((bp->b_flags & (B_CACHE|B_DELWRI)) == B_DELWRI) { - VOP_BWRITE(bp); + VOP_BWRITE(bp->b_vp, bp); goto loop; } diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 982850f..bb8fa53 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.200 1999/05/31 11:27:44 phk Exp $ + * $Id: vfs_subr.c,v 1.201 1999/06/15 23:37:25 mckusick Exp $ */ /* @@ -650,12 +650,12 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo) } else { bremfree(bp); bp->b_flags |= (B_BUSY | B_ASYNC); - VOP_BWRITE(bp); + VOP_BWRITE(bp->b_vp, bp); } } else { bremfree(bp); bp->b_flags |= B_BUSY; - (void) VOP_BWRITE(bp); + (void) VOP_BWRITE(bp->b_vp, bp); } break; } @@ -778,7 +778,7 @@ restartsync: } else { bp->b_flags &= ~B_ASYNC; } - VOP_BWRITE(bp); + VOP_BWRITE(bp->b_vp, bp); } goto restartsync; } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 982850f..bb8fa53 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.200 1999/05/31 11:27:44 phk Exp $ + * $Id: vfs_subr.c,v 1.201 1999/06/15 23:37:25 mckusick Exp $ */ /* @@ -650,12 +650,12 @@ vinvalbuf(vp, flags, cred, p, slpflag, slptimeo) } else { bremfree(bp); bp->b_flags |= (B_BUSY | B_ASYNC); - VOP_BWRITE(bp); + VOP_BWRITE(bp->b_vp, bp); } } else { bremfree(bp); bp->b_flags |= B_BUSY; - (void) VOP_BWRITE(bp); + (void) VOP_BWRITE(bp->b_vp, bp); } break; } @@ -778,7 +778,7 @@ restartsync: } else { bp->b_flags &= ~B_ASYNC; } - VOP_BWRITE(bp); + VOP_BWRITE(bp->b_vp, bp); } goto restartsync; } diff --git a/sys/kern/vnode_if.pl b/sys/kern/vnode_if.pl index 87517e6..07e0e91 100644 --- a/sys/kern/vnode_if.pl +++ b/sys/kern/vnode_if.pl @@ -32,7 +32,7 @@ # SUCH DAMAGE. # # @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93 -# $Id: vnode_if.sh,v 1.16 1998/11/10 09:04:09 peter Exp $ +# $Id: vnode_if.sh,v 1.17 1999/02/28 11:30:00 bde Exp $ # # Script to produce VFS front-end sugar. @@ -350,48 +350,3 @@ $AWK 'function kill_surrounding_ws (s) { printf "\n"; }' < $SRC >> $CFILE - -# THINGS THAT DON'T WORK RIGHT YET. -# -# vop_bwrite doesn't take any vnodes as arguments. This means that it -# can't function successfully through a bypass routine. -# -# To get around this problem for now we handle it as a special case. - -cat << END_OF_SPECIAL_CASES >> $HEADER -#include <sys/buf.h> - -struct vop_bwrite_args { - struct vnodeop_desc *a_desc; - struct buf *a_bp; -}; -extern struct vnodeop_desc vop_bwrite_desc; -static __inline int VOP_BWRITE __P(( - struct buf *bp)); -static __inline int VOP_BWRITE(bp) - struct buf *bp; -{ - struct vop_bwrite_args a; - - a.a_desc = VDESC(vop_bwrite); - a.a_bp = bp; - return (VCALL((bp)->b_vp, VOFFSET(vop_bwrite), &a)); -} -END_OF_SPECIAL_CASES - -cat << END_OF_SPECIAL_CASES >> $CFILE -static int vop_bwrite_vp_offsets[] = { - VDESC_NO_OFFSET -}; -struct vnodeop_desc vop_bwrite_desc = { - 0, - "vop_bwrite", - 0, - vop_bwrite_vp_offsets, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - NULL, -}; -END_OF_SPECIAL_CASES diff --git a/sys/kern/vnode_if.sh b/sys/kern/vnode_if.sh index 87517e6..07e0e91 100644 --- a/sys/kern/vnode_if.sh +++ b/sys/kern/vnode_if.sh @@ -32,7 +32,7 @@ # SUCH DAMAGE. # # @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93 -# $Id: vnode_if.sh,v 1.16 1998/11/10 09:04:09 peter Exp $ +# $Id: vnode_if.sh,v 1.17 1999/02/28 11:30:00 bde Exp $ # # Script to produce VFS front-end sugar. @@ -350,48 +350,3 @@ $AWK 'function kill_surrounding_ws (s) { printf "\n"; }' < $SRC >> $CFILE - -# THINGS THAT DON'T WORK RIGHT YET. -# -# vop_bwrite doesn't take any vnodes as arguments. This means that it -# can't function successfully through a bypass routine. -# -# To get around this problem for now we handle it as a special case. - -cat << END_OF_SPECIAL_CASES >> $HEADER -#include <sys/buf.h> - -struct vop_bwrite_args { - struct vnodeop_desc *a_desc; - struct buf *a_bp; -}; -extern struct vnodeop_desc vop_bwrite_desc; -static __inline int VOP_BWRITE __P(( - struct buf *bp)); -static __inline int VOP_BWRITE(bp) - struct buf *bp; -{ - struct vop_bwrite_args a; - - a.a_desc = VDESC(vop_bwrite); - a.a_bp = bp; - return (VCALL((bp)->b_vp, VOFFSET(vop_bwrite), &a)); -} -END_OF_SPECIAL_CASES - -cat << END_OF_SPECIAL_CASES >> $CFILE -static int vop_bwrite_vp_offsets[] = { - VDESC_NO_OFFSET -}; -struct vnodeop_desc vop_bwrite_desc = { - 0, - "vop_bwrite", - 0, - vop_bwrite_vp_offsets, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - VDESC_NO_OFFSET, - NULL, -}; -END_OF_SPECIAL_CASES diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index c53ae2a..b60ff4a 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -31,7 +31,7 @@ # SUCH DAMAGE. # # @(#)vnode_if.src 8.12 (Berkeley) 5/14/95 -# $Id: vnode_if.src,v 1.19 1998/09/05 14:13:06 phk Exp $ +# $Id: vnode_if.src,v 1.20 1999/03/27 03:08:07 eivind Exp $ # # @@ -485,8 +485,9 @@ vop_freeblks { }; # -# Needs work: no vp? +#% bwrite vp L L L # -#vop_bwrite { -# IN struct buf *bp; -#}; +vop_bwrite { + IN struct vnode *vp; + IN struct buf *bp; +}; |