Contents

buf_blkno

Get physical block number associated with a buffer, in the sense of VNOP_BLOCKMAP.

Declaration

daddr64_t buf_blkno(buf_t bp);

Parameters

  • bp:

    Buffer whose physical block number to get.

Return Value

Block number.

Discussion

When a buffer's physical block number is the same is its logical block number, then the physical block number is considered uninitialized. A physical block number of -1 indicates that there is no valid physical mapping (e.g. the logical block is invalid or corresponds to a sparse region in a file). Physical block number is normally set by the cluster layer or by buf_getblk().

See Also

Buffers