2 .\" SPDX-License-Identifier: BSD-2-Clause
4 .\" Copyright (c) 2019 The FreeBSD Foundation
6 .\" This documentation was written by BFF Storage Systems, LLC under
7 .\" sponsorship from the FreeBSD Foundation.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .Nd Logical to physical block number conversion
40 .Fn VOP_BMAP "struct vnode *vp" "daddr_t bn" "struct bufobj **bop" "daddr_t *bnp" "int *runp" "int *runb"
42 This vnode call is used to lookup the physical block number of the file system's
43 underlying device where a given logical block of a file is stored.
47 The vnode of the file.
49 Logical block number within the file identified by
52 Return storage for the buffer object associated with the file system's
55 Return storage for the physical block number.
57 Return storage for the number of succeeding logical blocks that may be
58 efficiently read at the same time as the requested block.
59 This will usually be the number of logical blocks whose physical blocks are
60 contiguously allocated.
61 However a file system is free to define "efficient" as it see fit.
65 but for preceding rather than succeeding blocks.
68 Any of the return arguments may be
70 to indicate that the caller does not care about that information.
72 The vnode will be locked on entry and should remain locked on return.
74 Zero is returned on success, otherwise an error code is returned.
80 function first appeared in
83 This manual page was written by