Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/VOP_STRATEGY.9
Show All 22 Lines | |||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd February 2, 2014 | .Dd June 30, 2022 | ||||
.Dt VOP_STRATEGY 9 | .Dt VOP_STRATEGY 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm VOP_STRATEGY | .Nm VOP_STRATEGY | ||||
.Nd read or write a file system buffer | .Nd read or write a file system buffer | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/param.h | .In sys/param.h | ||||
.In sys/buf.h | |||||
.In sys/vnode.h | .In sys/vnode.h | ||||
.Ft int | .Ft int | ||||
.Fn VOP_STRATEGY "struct vnode *vp" "struct buf *bp" | .Fn VOP_STRATEGY "struct vnode *vp" "struct buf *bp" | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The arguments are: | The arguments are: | ||||
.Bl -tag -width 2n | .Bl -tag -width 2n | ||||
.It Fa vp | .It Fa vp | ||||
The vnode that the buffer is for. | The vnode that the buffer is for. | ||||
.It Fa bp | .It Fa bp | ||||
The buffer to be read or written. | The buffer to be read or written. | ||||
.El | .El | ||||
.Pp | .Pp | ||||
This call either reads or writes data from a file, depending on the value of | This call either reads or writes data from a file, depending on the value of | ||||
.Fa bp->b_io.bio_cmd . | .Fa bp->b_iocmd . | ||||
.Pp | .Pp | ||||
The call may block. | The call may block. | ||||
.Sh RETURN VALUES | .Sh RETURN VALUES | ||||
Always zero. | Always zero. | ||||
Errors should be signalled by setting BIO_ERROR on b_ioflags field in struct buf, | Errors should be signalled by setting the | ||||
and setting b_error to the appropriate errno value. | .Dv BIO_ERROR | ||||
bit in | |||||
.Fa bp->b_ioflags | |||||
and setting | |||||
.Fa bp->b_error | |||||
to the appropriate | |||||
.Va errno | |||||
value. | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr errno 2 , | |||||
.Xr buf 9 , | .Xr buf 9 , | ||||
.Xr vnode 9 | .Xr vnode 9 | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
This manual page was written by | This manual page was written by | ||||
.An Doug Rabson . | .An Doug Rabson . |