-.\" $OpenBSD: VOP_LOOKUP.9,v 1.44 2018/10/06 23:08:13 beck Exp $
+.\" $OpenBSD: VOP_LOOKUP.9,v 1.45 2021/12/12 09:14:58 visa Exp $
.\"
.\" Copyright (c) 2003 Ted Unangst
.\" Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: October 6 2018 $
+.Dd $Mdocdate: December 12 2021 $
.Dt VOP_LOOKUP 9
.Os
.Sh NAME
.Fc
.Ft int
.Fo VOP_STRATEGY
+.Fa "struct vnode *vp"
.Fa "struct buf *bp"
.Fc
.Ft int
The name of the directory for removal is additionally contained in
.Fa cnp .
.Pp
-.It Fn VOP_STRATEGY bp
-Call the appropriate strategy function for the device backing the
-buffer's vnode.
+.It Fn VOP_STRATEGY vp bp
+Call the appropriate strategy function for the device vnode
+.Fa vp
+to read or write the buffer
+.Fa bp .
.Pp
.It Fn VOP_SYMLINK dvp vpp cnp vap target
Create a symbolic link with name
-/* $OpenBSD: softraid.c,v 1.419 2021/05/16 15:10:19 deraadt Exp $ */
+/* $OpenBSD: softraid.c,v 1.420 2021/12/12 09:14:58 visa Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
vp->v_numoutput++;
LIST_INIT(&b.b_dep);
- VOP_STRATEGY(&b);
+ VOP_STRATEGY(vp, &b);
biowait(&b);
if (b.b_flags & B_ERROR) {
wu->swu_cb_active = 1;
TAILQ_FOREACH(ccb, &wu->swu_ccb, ccb_link)
- VOP_STRATEGY(&ccb->ccb_buf);
+ VOP_STRATEGY(ccb->ccb_buf.b_vp, &ccb->ccb_buf);
wu->swu_cb_active = 0;
}
-/* $OpenBSD: cd9660_vnops.c,v 1.91 2021/12/11 09:28:26 visa Exp $ */
+/* $OpenBSD: cd9660_vnops.c,v 1.92 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
/*-
}
vp = ip->i_devvp;
bp->b_dev = vp->v_rdev;
- (vp->v_op->vop_strategy)(ap);
+ VOP_STRATEGY(vp, bp);
return (0);
}
-/* $OpenBSD: udf_vnops.c,v 1.68 2020/01/20 23:21:55 claudio Exp $ */
+/* $OpenBSD: udf_vnops.c,v 1.69 2021/12/12 09:14:59 visa Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
splx(s);
} else {
bp->b_dev = vp->v_rdev;
- (up->u_devvp->v_op->vop_strategy)(ap);
+ VOP_STRATEGY(up->u_devvp, bp);
}
return (0);
-/* $OpenBSD: vfs_bio.c,v 1.207 2021/09/05 11:44:46 mpi Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.208 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*
SET(bp->b_flags, B_READ | async);
bcstats.pendingreads++;
bcstats.numreads++;
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
/* Pay for the read. */
curproc->p_ru.ru_inblock++; /* XXX */
} else if (async) {
bcstats.pendingreads++;
bcstats.numreads++;
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
curproc->p_ru.ru_inblock++;
out:
splx(s);
buf_flip_dma(bp);
SET(bp->b_flags, B_WRITEINPROG);
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
/*
* If the queue is above the high water mark, wait till
-/* $OpenBSD: vfs_vops.c,v 1.33 2021/10/20 06:35:39 semarie Exp $ */
+/* $OpenBSD: vfs_vops.c,v 1.34 2021/12/12 09:14:59 visa Exp $ */
/*
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
*
}
int
-VOP_STRATEGY(struct buf *bp)
+VOP_STRATEGY(struct vnode *vp, struct buf *bp)
{
struct vop_strategy_args a;
+ a.a_vp = vp;
a.a_bp = bp;
if ((ISSET(bp->b_flags, B_BC)) && (!ISSET(bp->b_flags, B_DMA)))
panic("Non dma reachable buffer passed to VOP_STRATEGY");
- if (bp->b_vp->v_op->vop_strategy == NULL)
+ if (vp->v_op->vop_strategy == NULL)
return (EOPNOTSUPP);
- return ((bp->b_vp->v_op->vop_strategy)(&a));
+ return ((vp->v_op->vop_strategy)(&a));
}
int
-/* $OpenBSD: dead_vnops.c,v 1.38 2021/10/19 06:09:39 semarie Exp $ */
+/* $OpenBSD: dead_vnops.c,v 1.39 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: dead_vnops.c,v 1.16 1996/02/13 13:12:48 mycroft Exp $ */
/*
splx(s);
return (EIO);
}
- return (VOP_STRATEGY(ap->a_bp));
+ return (VOP_STRATEGY(ap->a_bp->b_vp, ap->a_bp));
}
int
-/* $OpenBSD: msdosfs_vnops.c,v 1.136 2021/12/11 09:28:26 visa Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.137 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
vp = dep->de_devvp;
bp->b_dev = vp->v_rdev;
- (vp->v_op->vop_strategy)(ap);
+ VOP_STRATEGY(vp, bp);
return (0);
}
-/* $OpenBSD: nfs_vnops.c,v 1.187 2021/10/02 08:51:41 semarie Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.188 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
buf_flip_dma(bp);
if (force)
bp->b_flags |= B_WRITEINPROG;
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
}
if( (oldflags & B_ASYNC) == 0) {
-/* $OpenBSD: vnode.h,v 1.162 2021/10/20 06:35:39 semarie Exp $ */
+/* $OpenBSD: vnode.h,v 1.163 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
};
int VOP_ADVLOCK(struct vnode *, void *, int, struct flock *, int);
-/* Special cases: */
struct vop_strategy_args {
+ struct vnode *a_vp;
struct buf *a_bp;
};
-int VOP_STRATEGY(struct buf *);
+int VOP_STRATEGY(struct vnode *, struct buf *);
+/* Special cases: */
struct vop_bwrite_args {
struct buf *a_bp;
};
-/* $OpenBSD: ext2fs_bmap.c,v 1.27 2019/07/19 00:24:31 cheloha Exp $ */
+/* $OpenBSD: ext2fs_bmap.c,v 1.28 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: ext2fs_bmap.c,v 1.5 2000/03/30 12:41:11 augustss Exp $ */
/*
else {
bp->b_blkno = blkptrtodb(ump, daddr);
bp->b_flags |= B_READ;
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
curproc->p_ru.ru_inblock++; /* XXX */
bcstats.pendingreads++;
if ((error = biowait(bp)) != 0) {
-/* $OpenBSD: ext2fs_inode.c,v 1.64 2021/03/11 13:31:35 jsg Exp $ */
+/* $OpenBSD: ext2fs_inode.c,v 1.65 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: ext2fs_inode.c,v 1.24 2001/06/19 12:59:18 wiz Exp $ */
/*
if (bp->b_bcount > bp->b_bufsize)
panic("ext2fs_indirtrunc: bad buffer size");
bp->b_blkno = dbn;
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
error = biowait(bp);
}
if (error) {
-/* $OpenBSD: ffs_inode.c,v 1.80 2019/07/25 01:43:21 cheloha Exp $ */
+/* $OpenBSD: ffs_inode.c,v 1.81 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */
/*
if (bp->b_bcount > bp->b_bufsize)
panic("ffs_indirtrunc: bad buffer size");
bp->b_blkno = dbn;
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
error = biowait(bp);
}
if (error) {
-/* $OpenBSD: ufs_bmap.c,v 1.36 2019/07/19 00:24:32 cheloha Exp $ */
+/* $OpenBSD: ufs_bmap.c,v 1.37 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: ufs_bmap.c,v 1.3 1996/02/09 22:36:00 christos Exp $ */
/*
bp->b_flags |= B_READ;
bcstats.pendingreads++;
bcstats.numreads++;
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
curproc->p_ru.ru_inblock++; /* XXX */
if ((error = biowait(bp)) != 0) {
brelse(bp);
-/* $OpenBSD: ufs_vnops.c,v 1.154 2021/12/11 09:28:26 visa Exp $ */
+/* $OpenBSD: ufs_vnops.c,v 1.155 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */
/*
}
vp = ip->i_devvp;
bp->b_dev = vp->v_rdev;
- (vp->v_op->vop_strategy)(ap);
+ VOP_STRATEGY(vp, bp);
return (0);
}
-/* $OpenBSD: uvm_swap.c,v 1.151 2021/11/11 09:34:27 tb Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.152 2021/12/12 09:14:59 visa Exp $ */
/* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */
/*
bp->b_blkno = bn;
splx(s);
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
return;
case VREG:
/* delegate to sw_reg_strategy function. */
if ((bp->b_flags & B_READ) == 0)
bp->b_vp->v_numoutput++;
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
}
sdp->swd_flags &= ~SWF_BUSY;
}
}
/* now we start the I/O, and if async, return. */
- VOP_STRATEGY(bp);
+ VOP_STRATEGY(bp->b_vp, bp);
if (async)
return (VM_PAGER_PEND);