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.
This commit is contained in:
parent
37f6a9df5e
commit
7c68e9b5c4
@ -53,7 +53,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ffs_softdep.c 9.40 (McKusick) 6/15/99
|
||||
* $Id: ffs_softdep.c,v 1.29 1999/05/22 04:43:04 julian Exp $
|
||||
* $Id: ffs_softdep.c,v 1.30 1999/06/15 23:37:29 mckusick Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -3533,7 +3533,8 @@ softdep_update_inodeblock(ip, bp, waitfor)
|
||||
}
|
||||
gotit = getdirtybuf(&inodedep->id_buf, MNT_WAIT);
|
||||
FREE_LOCK(&lk);
|
||||
if (gotit && (error = VOP_BWRITE(inodedep->id_buf)) != 0)
|
||||
if (gotit &&
|
||||
(error = VOP_BWRITE(inodedep->id_buf->b_vp, inodedep->id_buf)) != 0)
|
||||
softdep_error("softdep_update_inodeblock: bwrite", error);
|
||||
if ((inodedep->id_state & DEPCOMPLETE) == 0)
|
||||
panic("softdep_update_inodeblock: update failed");
|
||||
@ -3666,7 +3667,7 @@ softdep_fsync(vp)
|
||||
*/
|
||||
error = bread(pvp, lbn, blksize(fs, VTOI(pvp), lbn), p->p_ucred,
|
||||
&bp);
|
||||
ret = VOP_BWRITE(bp);
|
||||
ret = VOP_BWRITE(bp->b_vp, bp);
|
||||
vput(pvp);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
@ -3808,7 +3809,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3825,7 +3826,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3842,7 +3843,7 @@ softdep_sync_metadata(ap)
|
||||
if (getdirtybuf(&nbp, MNT_WAIT) == 0)
|
||||
goto restart;
|
||||
FREE_LOCK(&lk);
|
||||
if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3896,7 +3897,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3917,7 +3918,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -4027,7 +4028,7 @@ flush_inodedep_deps(fs, ino)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(bp);
|
||||
} else if ((error = VOP_BWRITE(bp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0) {
|
||||
ACQUIRE_LOCK(&lk);
|
||||
return (error);
|
||||
}
|
||||
@ -4049,7 +4050,7 @@ flush_inodedep_deps(fs, ino)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(bp);
|
||||
} else if ((error = VOP_BWRITE(bp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0) {
|
||||
ACQUIRE_LOCK(&lk);
|
||||
return (error);
|
||||
}
|
||||
@ -4136,7 +4137,8 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
gotit = getdirtybuf(&inodedep->id_buf,MNT_WAIT);
|
||||
FREE_LOCK(&lk);
|
||||
if (gotit &&
|
||||
(error = VOP_BWRITE(inodedep->id_buf)) != 0)
|
||||
(error = VOP_BWRITE(inodedep->id_buf->b_vp,
|
||||
inodedep->id_buf)) != 0)
|
||||
break;
|
||||
ACQUIRE_LOCK(&lk);
|
||||
}
|
||||
@ -4151,7 +4153,7 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
fsbtodb(ump->um_fs, ino_to_fsba(ump->um_fs, inum)),
|
||||
(int)ump->um_fs->fs_bsize, NOCRED, &bp)) != 0)
|
||||
break;
|
||||
if ((error = VOP_BWRITE(bp)) != 0)
|
||||
if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0)
|
||||
break;
|
||||
ACQUIRE_LOCK(&lk);
|
||||
if (dap == LIST_FIRST(diraddhdp))
|
||||
|
@ -53,7 +53,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ffs_softdep.c 9.40 (McKusick) 6/15/99
|
||||
* $Id: ffs_softdep.c,v 1.29 1999/05/22 04:43:04 julian Exp $
|
||||
* $Id: ffs_softdep.c,v 1.30 1999/06/15 23:37:29 mckusick Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -3533,7 +3533,8 @@ softdep_update_inodeblock(ip, bp, waitfor)
|
||||
}
|
||||
gotit = getdirtybuf(&inodedep->id_buf, MNT_WAIT);
|
||||
FREE_LOCK(&lk);
|
||||
if (gotit && (error = VOP_BWRITE(inodedep->id_buf)) != 0)
|
||||
if (gotit &&
|
||||
(error = VOP_BWRITE(inodedep->id_buf->b_vp, inodedep->id_buf)) != 0)
|
||||
softdep_error("softdep_update_inodeblock: bwrite", error);
|
||||
if ((inodedep->id_state & DEPCOMPLETE) == 0)
|
||||
panic("softdep_update_inodeblock: update failed");
|
||||
@ -3666,7 +3667,7 @@ softdep_fsync(vp)
|
||||
*/
|
||||
error = bread(pvp, lbn, blksize(fs, VTOI(pvp), lbn), p->p_ucred,
|
||||
&bp);
|
||||
ret = VOP_BWRITE(bp);
|
||||
ret = VOP_BWRITE(bp->b_vp, bp);
|
||||
vput(pvp);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
@ -3808,7 +3809,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3825,7 +3826,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3842,7 +3843,7 @@ softdep_sync_metadata(ap)
|
||||
if (getdirtybuf(&nbp, MNT_WAIT) == 0)
|
||||
goto restart;
|
||||
FREE_LOCK(&lk);
|
||||
if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3896,7 +3897,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3917,7 +3918,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -4027,7 +4028,7 @@ flush_inodedep_deps(fs, ino)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(bp);
|
||||
} else if ((error = VOP_BWRITE(bp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0) {
|
||||
ACQUIRE_LOCK(&lk);
|
||||
return (error);
|
||||
}
|
||||
@ -4049,7 +4050,7 @@ flush_inodedep_deps(fs, ino)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(bp);
|
||||
} else if ((error = VOP_BWRITE(bp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0) {
|
||||
ACQUIRE_LOCK(&lk);
|
||||
return (error);
|
||||
}
|
||||
@ -4136,7 +4137,8 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
gotit = getdirtybuf(&inodedep->id_buf,MNT_WAIT);
|
||||
FREE_LOCK(&lk);
|
||||
if (gotit &&
|
||||
(error = VOP_BWRITE(inodedep->id_buf)) != 0)
|
||||
(error = VOP_BWRITE(inodedep->id_buf->b_vp,
|
||||
inodedep->id_buf)) != 0)
|
||||
break;
|
||||
ACQUIRE_LOCK(&lk);
|
||||
}
|
||||
@ -4151,7 +4153,7 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
fsbtodb(ump->um_fs, ino_to_fsba(ump->um_fs, inum)),
|
||||
(int)ump->um_fs->fs_bsize, NOCRED, &bp)) != 0)
|
||||
break;
|
||||
if ((error = VOP_BWRITE(bp)) != 0)
|
||||
if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0)
|
||||
break;
|
||||
ACQUIRE_LOCK(&lk);
|
||||
if (dap == LIST_FIRST(diraddhdp))
|
||||
|
@ -37,11 +37,11 @@
|
||||
*
|
||||
* Ancestors:
|
||||
* @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92
|
||||
* $Id: null_vnops.c,v 1.31 1999/01/27 22:42:06 dillon Exp $
|
||||
* $Id: null_vnops.c,v 1.32 1999/01/28 00:57:50 dillon Exp $
|
||||
* ...and...
|
||||
* @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project
|
||||
*
|
||||
* $Id: null_vnops.c,v 1.31 1999/01/27 22:42:06 dillon Exp $
|
||||
* $Id: null_vnops.c,v 1.32 1999/01/28 00:57:50 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -192,7 +192,6 @@ SYSCTL_INT(_debug, OID_AUTO, nullfs_bug_bypass, CTLFLAG_RW,
|
||||
&null_bug_bypass, 0, "");
|
||||
|
||||
static int null_access __P((struct vop_access_args *ap));
|
||||
static int null_bwrite __P((struct vop_bwrite_args *ap));
|
||||
static int null_getattr __P((struct vop_getattr_args *ap));
|
||||
static int null_inactive __P((struct vop_inactive_args *ap));
|
||||
static int null_lock __P((struct vop_lock_args *ap));
|
||||
@ -200,7 +199,6 @@ static int null_lookup __P((struct vop_lookup_args *ap));
|
||||
static int null_print __P((struct vop_print_args *ap));
|
||||
static int null_reclaim __P((struct vop_reclaim_args *ap));
|
||||
static int null_setattr __P((struct vop_setattr_args *ap));
|
||||
static int null_strategy __P((struct vop_strategy_args *ap));
|
||||
static int null_unlock __P((struct vop_unlock_args *ap));
|
||||
|
||||
/*
|
||||
@ -594,56 +592,6 @@ null_print(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX - vop_strategy must be hand coded because it has no
|
||||
* vnode in its arguments.
|
||||
* This goes away with a merged VM/buffer cache.
|
||||
*/
|
||||
static int
|
||||
null_strategy(ap)
|
||||
struct vop_strategy_args /* {
|
||||
struct buf *a_bp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = NULLVPTOLOWERVP(bp->b_vp);
|
||||
|
||||
error = VOP_STRATEGY(bp->b_vp, bp);
|
||||
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX - like vop_strategy, vop_bwrite must be hand coded because it has no
|
||||
* vnode in its arguments.
|
||||
* This goes away with a merged VM/buffer cache.
|
||||
*/
|
||||
static int
|
||||
null_bwrite(ap)
|
||||
struct vop_bwrite_args /* {
|
||||
struct buf *a_bp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = NULLVPTOLOWERVP(bp->b_vp);
|
||||
|
||||
error = VOP_BWRITE(bp);
|
||||
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Global vfs data structures
|
||||
*/
|
||||
@ -651,7 +599,6 @@ vop_t **null_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc null_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) null_bypass },
|
||||
{ &vop_access_desc, (vop_t *) null_access },
|
||||
{ &vop_bwrite_desc, (vop_t *) null_bwrite },
|
||||
{ &vop_getattr_desc, (vop_t *) null_getattr },
|
||||
{ &vop_inactive_desc, (vop_t *) null_inactive },
|
||||
{ &vop_lock_desc, (vop_t *) null_lock },
|
||||
@ -659,7 +606,6 @@ static struct vnodeopv_entry_desc null_vnodeop_entries[] = {
|
||||
{ &vop_print_desc, (vop_t *) null_print },
|
||||
{ &vop_reclaim_desc, (vop_t *) null_reclaim },
|
||||
{ &vop_setattr_desc, (vop_t *) null_setattr },
|
||||
{ &vop_strategy_desc, (vop_t *) null_strategy },
|
||||
{ &vop_unlock_desc, (vop_t *) null_unlock },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)umap_vnops.c 8.6 (Berkeley) 5/22/95
|
||||
* $Id: umap_vnops.c,v 1.25 1998/07/30 17:40:45 bde Exp $
|
||||
* $Id: umap_vnops.c,v 1.26 1998/12/07 21:58:34 archie Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -57,7 +57,6 @@ static int umap_bug_bypass = 0; /* for debugging: enables bypass printf'ing */
|
||||
SYSCTL_INT(_debug, OID_AUTO, umapfs_bug_bypass, CTLFLAG_RW,
|
||||
&umap_bug_bypass, 0, "");
|
||||
|
||||
static int umap_bwrite __P((struct vop_bwrite_args *ap));
|
||||
static int umap_bypass __P((struct vop_generic_args *ap));
|
||||
static int umap_getattr __P((struct vop_getattr_args *ap));
|
||||
static int umap_inactive __P((struct vop_inactive_args *ap));
|
||||
@ -65,7 +64,6 @@ static int umap_lock __P((struct vop_lock_args *ap));
|
||||
static int umap_print __P((struct vop_print_args *ap));
|
||||
static int umap_reclaim __P((struct vop_reclaim_args *ap));
|
||||
static int umap_rename __P((struct vop_rename_args *ap));
|
||||
static int umap_strategy __P((struct vop_strategy_args *ap));
|
||||
static int umap_unlock __P((struct vop_unlock_args *ap));
|
||||
|
||||
/*
|
||||
@ -432,48 +430,6 @@ umap_reclaim(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
umap_strategy(ap)
|
||||
struct vop_strategy_args /* {
|
||||
struct vnode *a_vp;
|
||||
struct buf *a_bp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = UMAPVPTOLOWERVP(bp->b_vp);
|
||||
|
||||
error = VOP_STRATEGY(bp->b_vp, ap->a_bp);
|
||||
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
umap_bwrite(ap)
|
||||
struct vop_bwrite_args /* {
|
||||
struct buf *a_bp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = UMAPVPTOLOWERVP(bp->b_vp);
|
||||
|
||||
error = VOP_BWRITE(ap->a_bp);
|
||||
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
umap_print(ap)
|
||||
struct vop_print_args /* {
|
||||
@ -549,14 +505,12 @@ umap_rename(ap)
|
||||
vop_t **umap_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc umap_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) umap_bypass },
|
||||
{ &vop_bwrite_desc, (vop_t *) umap_bwrite },
|
||||
{ &vop_getattr_desc, (vop_t *) umap_getattr },
|
||||
{ &vop_inactive_desc, (vop_t *) umap_inactive },
|
||||
{ &vop_lock_desc, (vop_t *) umap_lock },
|
||||
{ &vop_print_desc, (vop_t *) umap_print },
|
||||
{ &vop_reclaim_desc, (vop_t *) umap_reclaim },
|
||||
{ &vop_rename_desc, (vop_t *) umap_rename },
|
||||
{ &vop_strategy_desc, (vop_t *) umap_strategy },
|
||||
{ &vop_unlock_desc, (vop_t *) umap_unlock },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
|
||||
* $Id: union_vnops.c,v 1.59 1998/12/14 05:00:59 dillon Exp $
|
||||
* $Id: union_vnops.c,v 1.60 1999/01/27 22:42:08 dillon Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -1734,24 +1734,17 @@ union_strategy(ap)
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = OTHERVP(bp->b_vp);
|
||||
struct vnode *othervp = OTHERVP(bp->b_vp);
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (bp->b_vp == NULLVP)
|
||||
if (othervp == NULLVP)
|
||||
panic("union_strategy: nil vp");
|
||||
if (((bp->b_flags & B_READ) == 0) &&
|
||||
(bp->b_vp == LOWERVP(savedvp)))
|
||||
(othervp == LOWERVP(bp->b_vp)))
|
||||
panic("union_strategy: writing to lowervp");
|
||||
#endif
|
||||
|
||||
error = VOP_STRATEGY(bp->b_vp, bp);
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
return (VOP_STRATEGY(othervp, bp));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -841,7 +841,7 @@ ext2_direnter(ip, dvp, cnp)
|
||||
ep = (struct ext2_dir_entry *)((char *)ep + dsize);
|
||||
}
|
||||
bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize);
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
if (!error && dp->i_endoff && dp->i_endoff < dp->i_size)
|
||||
error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_SYNC,
|
||||
@ -880,7 +880,7 @@ ext2_dirremove(dvp, cnp)
|
||||
UFS_BLKATOFF(dvp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0)
|
||||
return (error);
|
||||
ep->inode = 0;
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
return (error);
|
||||
}
|
||||
@ -891,7 +891,7 @@ ext2_dirremove(dvp, cnp)
|
||||
(char **)&ep, &bp)) != 0)
|
||||
return (error);
|
||||
ep->rec_len += dp->i_reclen;
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
return (error);
|
||||
}
|
||||
@ -914,7 +914,7 @@ ext2_dirrewrite(dp, ip, cnp)
|
||||
if ((error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0)
|
||||
return (error);
|
||||
ep->inode = ip->i_number;
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
return (error);
|
||||
}
|
||||
|
@ -841,7 +841,7 @@ ext2_direnter(ip, dvp, cnp)
|
||||
ep = (struct ext2_dir_entry *)((char *)ep + dsize);
|
||||
}
|
||||
bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize);
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
if (!error && dp->i_endoff && dp->i_endoff < dp->i_size)
|
||||
error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_SYNC,
|
||||
@ -880,7 +880,7 @@ ext2_dirremove(dvp, cnp)
|
||||
UFS_BLKATOFF(dvp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0)
|
||||
return (error);
|
||||
ep->inode = 0;
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
return (error);
|
||||
}
|
||||
@ -891,7 +891,7 @@ ext2_dirremove(dvp, cnp)
|
||||
(char **)&ep, &bp)) != 0)
|
||||
return (error);
|
||||
ep->rec_len += dp->i_reclen;
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
return (error);
|
||||
}
|
||||
@ -914,7 +914,7 @@ ext2_dirrewrite(dp, ip, cnp)
|
||||
if ((error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0)
|
||||
return (error);
|
||||
ep->inode = ip->i_number;
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||
return (error);
|
||||
}
|
||||
|
@ -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 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo)
|
||||
) {
|
||||
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 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo)
|
||||
brelse(bp);
|
||||
} else {
|
||||
bp->b_flags |= B_NOCACHE;
|
||||
VOP_BWRITE(bp);
|
||||
VOP_BWRITE(bp->b_vp, bp);
|
||||
}
|
||||
}
|
||||
goto loop;
|
||||
@ -1925,7 +1925,7 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo)
|
||||
*/
|
||||
|
||||
if ((bp->b_flags & (B_CACHE|B_DELWRI)) == B_DELWRI) {
|
||||
VOP_BWRITE(bp);
|
||||
VOP_BWRITE(bp->b_vp, bp);
|
||||
goto loop;
|
||||
}
|
||||
|
||||
|
@ -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 @@ vtruncbuf(vp, cred, p, length, blksize)
|
||||
} else {
|
||||
bp->b_flags &= ~B_ASYNC;
|
||||
}
|
||||
VOP_BWRITE(bp);
|
||||
VOP_BWRITE(bp->b_vp, bp);
|
||||
}
|
||||
goto restartsync;
|
||||
}
|
||||
|
@ -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 @@ vtruncbuf(vp, cred, p, length, blksize)
|
||||
} else {
|
||||
bp->b_flags &= ~B_ASYNC;
|
||||
}
|
||||
VOP_BWRITE(bp);
|
||||
VOP_BWRITE(bp->b_vp, bp);
|
||||
}
|
||||
goto restartsync;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -37,11 +37,11 @@
|
||||
*
|
||||
* Ancestors:
|
||||
* @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92
|
||||
* $Id: null_vnops.c,v 1.31 1999/01/27 22:42:06 dillon Exp $
|
||||
* $Id: null_vnops.c,v 1.32 1999/01/28 00:57:50 dillon Exp $
|
||||
* ...and...
|
||||
* @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project
|
||||
*
|
||||
* $Id: null_vnops.c,v 1.31 1999/01/27 22:42:06 dillon Exp $
|
||||
* $Id: null_vnops.c,v 1.32 1999/01/28 00:57:50 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -192,7 +192,6 @@ SYSCTL_INT(_debug, OID_AUTO, nullfs_bug_bypass, CTLFLAG_RW,
|
||||
&null_bug_bypass, 0, "");
|
||||
|
||||
static int null_access __P((struct vop_access_args *ap));
|
||||
static int null_bwrite __P((struct vop_bwrite_args *ap));
|
||||
static int null_getattr __P((struct vop_getattr_args *ap));
|
||||
static int null_inactive __P((struct vop_inactive_args *ap));
|
||||
static int null_lock __P((struct vop_lock_args *ap));
|
||||
@ -200,7 +199,6 @@ static int null_lookup __P((struct vop_lookup_args *ap));
|
||||
static int null_print __P((struct vop_print_args *ap));
|
||||
static int null_reclaim __P((struct vop_reclaim_args *ap));
|
||||
static int null_setattr __P((struct vop_setattr_args *ap));
|
||||
static int null_strategy __P((struct vop_strategy_args *ap));
|
||||
static int null_unlock __P((struct vop_unlock_args *ap));
|
||||
|
||||
/*
|
||||
@ -594,56 +592,6 @@ null_print(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX - vop_strategy must be hand coded because it has no
|
||||
* vnode in its arguments.
|
||||
* This goes away with a merged VM/buffer cache.
|
||||
*/
|
||||
static int
|
||||
null_strategy(ap)
|
||||
struct vop_strategy_args /* {
|
||||
struct buf *a_bp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = NULLVPTOLOWERVP(bp->b_vp);
|
||||
|
||||
error = VOP_STRATEGY(bp->b_vp, bp);
|
||||
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX - like vop_strategy, vop_bwrite must be hand coded because it has no
|
||||
* vnode in its arguments.
|
||||
* This goes away with a merged VM/buffer cache.
|
||||
*/
|
||||
static int
|
||||
null_bwrite(ap)
|
||||
struct vop_bwrite_args /* {
|
||||
struct buf *a_bp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = NULLVPTOLOWERVP(bp->b_vp);
|
||||
|
||||
error = VOP_BWRITE(bp);
|
||||
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Global vfs data structures
|
||||
*/
|
||||
@ -651,7 +599,6 @@ vop_t **null_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc null_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) null_bypass },
|
||||
{ &vop_access_desc, (vop_t *) null_access },
|
||||
{ &vop_bwrite_desc, (vop_t *) null_bwrite },
|
||||
{ &vop_getattr_desc, (vop_t *) null_getattr },
|
||||
{ &vop_inactive_desc, (vop_t *) null_inactive },
|
||||
{ &vop_lock_desc, (vop_t *) null_lock },
|
||||
@ -659,7 +606,6 @@ static struct vnodeopv_entry_desc null_vnodeop_entries[] = {
|
||||
{ &vop_print_desc, (vop_t *) null_print },
|
||||
{ &vop_reclaim_desc, (vop_t *) null_reclaim },
|
||||
{ &vop_setattr_desc, (vop_t *) null_setattr },
|
||||
{ &vop_strategy_desc, (vop_t *) null_strategy },
|
||||
{ &vop_unlock_desc, (vop_t *) null_unlock },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)umap_vnops.c 8.6 (Berkeley) 5/22/95
|
||||
* $Id: umap_vnops.c,v 1.25 1998/07/30 17:40:45 bde Exp $
|
||||
* $Id: umap_vnops.c,v 1.26 1998/12/07 21:58:34 archie Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -57,7 +57,6 @@ static int umap_bug_bypass = 0; /* for debugging: enables bypass printf'ing */
|
||||
SYSCTL_INT(_debug, OID_AUTO, umapfs_bug_bypass, CTLFLAG_RW,
|
||||
&umap_bug_bypass, 0, "");
|
||||
|
||||
static int umap_bwrite __P((struct vop_bwrite_args *ap));
|
||||
static int umap_bypass __P((struct vop_generic_args *ap));
|
||||
static int umap_getattr __P((struct vop_getattr_args *ap));
|
||||
static int umap_inactive __P((struct vop_inactive_args *ap));
|
||||
@ -65,7 +64,6 @@ static int umap_lock __P((struct vop_lock_args *ap));
|
||||
static int umap_print __P((struct vop_print_args *ap));
|
||||
static int umap_reclaim __P((struct vop_reclaim_args *ap));
|
||||
static int umap_rename __P((struct vop_rename_args *ap));
|
||||
static int umap_strategy __P((struct vop_strategy_args *ap));
|
||||
static int umap_unlock __P((struct vop_unlock_args *ap));
|
||||
|
||||
/*
|
||||
@ -432,48 +430,6 @@ umap_reclaim(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
umap_strategy(ap)
|
||||
struct vop_strategy_args /* {
|
||||
struct vnode *a_vp;
|
||||
struct buf *a_bp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = UMAPVPTOLOWERVP(bp->b_vp);
|
||||
|
||||
error = VOP_STRATEGY(bp->b_vp, ap->a_bp);
|
||||
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
umap_bwrite(ap)
|
||||
struct vop_bwrite_args /* {
|
||||
struct buf *a_bp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = UMAPVPTOLOWERVP(bp->b_vp);
|
||||
|
||||
error = VOP_BWRITE(ap->a_bp);
|
||||
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
umap_print(ap)
|
||||
struct vop_print_args /* {
|
||||
@ -549,14 +505,12 @@ umap_rename(ap)
|
||||
vop_t **umap_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc umap_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) umap_bypass },
|
||||
{ &vop_bwrite_desc, (vop_t *) umap_bwrite },
|
||||
{ &vop_getattr_desc, (vop_t *) umap_getattr },
|
||||
{ &vop_inactive_desc, (vop_t *) umap_inactive },
|
||||
{ &vop_lock_desc, (vop_t *) umap_lock },
|
||||
{ &vop_print_desc, (vop_t *) umap_print },
|
||||
{ &vop_reclaim_desc, (vop_t *) umap_reclaim },
|
||||
{ &vop_rename_desc, (vop_t *) umap_rename },
|
||||
{ &vop_strategy_desc, (vop_t *) umap_strategy },
|
||||
{ &vop_unlock_desc, (vop_t *) umap_unlock },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
|
||||
* $Id: union_vnops.c,v 1.59 1998/12/14 05:00:59 dillon Exp $
|
||||
* $Id: union_vnops.c,v 1.60 1999/01/27 22:42:08 dillon Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -1734,24 +1734,17 @@ union_strategy(ap)
|
||||
} */ *ap;
|
||||
{
|
||||
struct buf *bp = ap->a_bp;
|
||||
int error;
|
||||
struct vnode *savedvp;
|
||||
|
||||
savedvp = bp->b_vp;
|
||||
bp->b_vp = OTHERVP(bp->b_vp);
|
||||
struct vnode *othervp = OTHERVP(bp->b_vp);
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (bp->b_vp == NULLVP)
|
||||
if (othervp == NULLVP)
|
||||
panic("union_strategy: nil vp");
|
||||
if (((bp->b_flags & B_READ) == 0) &&
|
||||
(bp->b_vp == LOWERVP(savedvp)))
|
||||
(othervp == LOWERVP(bp->b_vp)))
|
||||
panic("union_strategy: writing to lowervp");
|
||||
#endif
|
||||
|
||||
error = VOP_STRATEGY(bp->b_vp, bp);
|
||||
bp->b_vp = savedvp;
|
||||
|
||||
return (error);
|
||||
return (VOP_STRATEGY(othervp, bp));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.71 1999/05/06 20:00:30 phk Exp $
|
||||
* $Id: nfs_bio.c,v 1.72 1999/06/05 05:25:37 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -894,7 +894,7 @@ nfs_write(ap)
|
||||
|
||||
if (bp->b_dirtyend > 0 &&
|
||||
(on > bp->b_dirtyend || (on + n) < bp->b_dirtyoff)) {
|
||||
if (VOP_BWRITE(bp) == EINTR)
|
||||
if (VOP_BWRITE(bp->b_vp, bp) == EINTR)
|
||||
return (EINTR);
|
||||
goto again;
|
||||
}
|
||||
@ -961,7 +961,7 @@ nfs_write(ap)
|
||||
if ((np->n_flag & NQNFSNONCACHE) || (ioflag & IO_SYNC)) {
|
||||
if (ioflag & IO_INVAL)
|
||||
bp->b_flags |= B_NOCACHE;
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
if (error)
|
||||
return (error);
|
||||
if (np->n_flag & NQNFSNONCACHE) {
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.129 1999/05/11 19:54:47 phk Exp $
|
||||
* $Id: nfs_vnops.c,v 1.130 1999/06/05 05:35:02 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -2933,7 +2933,7 @@ nfs_flush(vp, cred, waitfor, p, commit)
|
||||
else
|
||||
bp->b_flags |= (B_BUSY|B_ASYNC|B_WRITEINPROG|B_NEEDCOMMIT);
|
||||
splx(s);
|
||||
VOP_BWRITE(bp);
|
||||
VOP_BWRITE(bp->b_vp, bp);
|
||||
goto loop;
|
||||
}
|
||||
splx(s);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.71 1999/05/06 20:00:30 phk Exp $
|
||||
* $Id: nfs_bio.c,v 1.72 1999/06/05 05:25:37 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -894,7 +894,7 @@ nfs_write(ap)
|
||||
|
||||
if (bp->b_dirtyend > 0 &&
|
||||
(on > bp->b_dirtyend || (on + n) < bp->b_dirtyoff)) {
|
||||
if (VOP_BWRITE(bp) == EINTR)
|
||||
if (VOP_BWRITE(bp->b_vp, bp) == EINTR)
|
||||
return (EINTR);
|
||||
goto again;
|
||||
}
|
||||
@ -961,7 +961,7 @@ nfs_write(ap)
|
||||
if ((np->n_flag & NQNFSNONCACHE) || (ioflag & IO_SYNC)) {
|
||||
if (ioflag & IO_INVAL)
|
||||
bp->b_flags |= B_NOCACHE;
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
if (error)
|
||||
return (error);
|
||||
if (np->n_flag & NQNFSNONCACHE) {
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.129 1999/05/11 19:54:47 phk Exp $
|
||||
* $Id: nfs_vnops.c,v 1.130 1999/06/05 05:35:02 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -2933,7 +2933,7 @@ nfs_flush(vp, cred, waitfor, p, commit)
|
||||
else
|
||||
bp->b_flags |= (B_BUSY|B_ASYNC|B_WRITEINPROG|B_NEEDCOMMIT);
|
||||
splx(s);
|
||||
VOP_BWRITE(bp);
|
||||
VOP_BWRITE(bp->b_vp, bp);
|
||||
goto loop;
|
||||
}
|
||||
splx(s);
|
||||
|
@ -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
|
||||
|
@ -53,7 +53,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ffs_softdep.c 9.40 (McKusick) 6/15/99
|
||||
* $Id: ffs_softdep.c,v 1.29 1999/05/22 04:43:04 julian Exp $
|
||||
* $Id: ffs_softdep.c,v 1.30 1999/06/15 23:37:29 mckusick Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -3533,7 +3533,8 @@ softdep_update_inodeblock(ip, bp, waitfor)
|
||||
}
|
||||
gotit = getdirtybuf(&inodedep->id_buf, MNT_WAIT);
|
||||
FREE_LOCK(&lk);
|
||||
if (gotit && (error = VOP_BWRITE(inodedep->id_buf)) != 0)
|
||||
if (gotit &&
|
||||
(error = VOP_BWRITE(inodedep->id_buf->b_vp, inodedep->id_buf)) != 0)
|
||||
softdep_error("softdep_update_inodeblock: bwrite", error);
|
||||
if ((inodedep->id_state & DEPCOMPLETE) == 0)
|
||||
panic("softdep_update_inodeblock: update failed");
|
||||
@ -3666,7 +3667,7 @@ softdep_fsync(vp)
|
||||
*/
|
||||
error = bread(pvp, lbn, blksize(fs, VTOI(pvp), lbn), p->p_ucred,
|
||||
&bp);
|
||||
ret = VOP_BWRITE(bp);
|
||||
ret = VOP_BWRITE(bp->b_vp, bp);
|
||||
vput(pvp);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
@ -3808,7 +3809,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3825,7 +3826,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3842,7 +3843,7 @@ softdep_sync_metadata(ap)
|
||||
if (getdirtybuf(&nbp, MNT_WAIT) == 0)
|
||||
goto restart;
|
||||
FREE_LOCK(&lk);
|
||||
if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3896,7 +3897,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -3917,7 +3918,7 @@ softdep_sync_metadata(ap)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(nbp);
|
||||
} else if ((error = VOP_BWRITE(nbp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(nbp->b_vp, nbp)) != 0) {
|
||||
bawrite(bp);
|
||||
return (error);
|
||||
}
|
||||
@ -4027,7 +4028,7 @@ flush_inodedep_deps(fs, ino)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(bp);
|
||||
} else if ((error = VOP_BWRITE(bp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0) {
|
||||
ACQUIRE_LOCK(&lk);
|
||||
return (error);
|
||||
}
|
||||
@ -4049,7 +4050,7 @@ flush_inodedep_deps(fs, ino)
|
||||
FREE_LOCK(&lk);
|
||||
if (waitfor == MNT_NOWAIT) {
|
||||
bawrite(bp);
|
||||
} else if ((error = VOP_BWRITE(bp)) != 0) {
|
||||
} else if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0) {
|
||||
ACQUIRE_LOCK(&lk);
|
||||
return (error);
|
||||
}
|
||||
@ -4136,7 +4137,8 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
gotit = getdirtybuf(&inodedep->id_buf,MNT_WAIT);
|
||||
FREE_LOCK(&lk);
|
||||
if (gotit &&
|
||||
(error = VOP_BWRITE(inodedep->id_buf)) != 0)
|
||||
(error = VOP_BWRITE(inodedep->id_buf->b_vp,
|
||||
inodedep->id_buf)) != 0)
|
||||
break;
|
||||
ACQUIRE_LOCK(&lk);
|
||||
}
|
||||
@ -4151,7 +4153,7 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
fsbtodb(ump->um_fs, ino_to_fsba(ump->um_fs, inum)),
|
||||
(int)ump->um_fs->fs_bsize, NOCRED, &bp)) != 0)
|
||||
break;
|
||||
if ((error = VOP_BWRITE(bp)) != 0)
|
||||
if ((error = VOP_BWRITE(bp->b_vp, bp)) != 0)
|
||||
break;
|
||||
ACQUIRE_LOCK(&lk);
|
||||
if (dap == LIST_FIRST(diraddhdp))
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_lookup.c 8.15 (Berkeley) 6/16/95
|
||||
* $Id: ufs_lookup.c,v 1.26 1999/01/07 16:14:18 bde Exp $
|
||||
* $Id: ufs_lookup.c,v 1.27 1999/01/28 00:57:56 dillon Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -719,7 +719,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
|
||||
dirp->d_ino, newdirbp);
|
||||
bdwrite(bp);
|
||||
} else {
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
}
|
||||
ret = UFS_UPDATE(dvp, !DOINGSOFTDEP(dvp));
|
||||
if (error == 0)
|
||||
@ -896,7 +896,7 @@ ufs_dirremove(dvp, ip, flags, isrmdir)
|
||||
if (ip)
|
||||
ip->i_nlink--;
|
||||
if (flags & DOWHITEOUT)
|
||||
error = VOP_BWRITE(bp);
|
||||
error = VOP_BWRITE(bp->b_vp, bp);
|
||||
else if (dvp->v_mount->mnt_flag & MNT_ASYNC
|
||||
&& dp->i_count != 0) {
|
||||
bdwrite(bp);
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
|
||||
* $Id: ufs_vnops.c,v 1.113 1999/04/28 11:38:20 phk Exp $
|
||||
* $Id: ufs_vnops.c,v 1.114 1999/05/11 19:55:05 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_quota.h"
|
||||
@ -1421,7 +1421,7 @@ ufs_mkdir(ap)
|
||||
}
|
||||
}
|
||||
if ((error = UFS_UPDATE(tvp, !DOINGSOFTDEP(tvp))) != 0) {
|
||||
(void)VOP_BWRITE(bp);
|
||||
(void)VOP_BWRITE(bp->b_vp, bp);
|
||||
goto bad;
|
||||
}
|
||||
VN_POLLEVENT(dvp, POLLWRITE); /* XXX right place? */
|
||||
@ -1436,7 +1436,7 @@ ufs_mkdir(ap)
|
||||
* an appropriate ordering dependency to the buffer which ensures that
|
||||
* the buffer is written before the new name is written in the parent.
|
||||
*/
|
||||
if (!DOINGSOFTDEP(dvp) && ((error = VOP_BWRITE(bp)) != 0))
|
||||
if (!DOINGSOFTDEP(dvp) && ((error = VOP_BWRITE(bp->b_vp, bp)) != 0))
|
||||
goto bad;
|
||||
ufs_makedirentry(ip, cnp, &newdir);
|
||||
error = ufs_direnter(dvp, tvp, &newdir, cnp, bp);
|
||||
|
Loading…
Reference in New Issue
Block a user