xfs_bmap8
Print block mapping for an xfs file
Usage
xfs_bmap [-adelpv]
[-n
num_extents]
file
xfs_bmap -V
Overview
xfs_bmap prints the map of disk blocks used by files in an XFS filesystem. The map lists each extent used by the file, as well as regions in the file that do not have any corresponding blocks (holes). Each line of the listings takes the following form:
extent: [startoffset..endoffset]: startblock..endblock
Holes are marked by replacing the startblock..endblock with hole. All the file offsets and disk blocks are in units of 512-byte blocks, no matter what the filesystem's block size is.
Options
-
-a -
If this option is specified, information about the file's attribute fork is printed instead of the default data fork.
-
-e -
If this option is used,
xfs_bmapobtains all delayed allocation extents, and does not flush dirty pages to disk before querying extent data. With the-voption, the flags column will show which extents have not yet been allocated.
-
-l -
If this option is used, then
-
<nblocks> blocks
-
will be appended to each line. nblocks is the length of the extent described on the line in units of 512-byte blocks.
-
This flag has no effect if the
-voption is used.
-nnum_extents-
If this option is given,
xfs_bmapwill display at most num_extents extents. In the absence of-n,xfs_bmapwill display all extents in the file.
-
-p -
If this option is used,
xfs_bmapobtains all unwritten (preallocated) extents that do not contain written data. With the-voption, the flags column will show which extents are preallocated/unwritten.
-
-v -
Shows verbose information. When this flag is specified, additional AG specific information is appended to each line in the following form:
-
agno (startagoffset..endagoffset) nblocks flags
-
A second
-voption will print out the flags legend.
-
-V -
Prints the version number and exits.
Releases
13 releases since Debian 3.0 (Woody); the text changed 6 times.
-V since Debian 8 (Jessie);
-a since Debian 5.0 (Lenny);
-e since Debian 9 (Stretch);
-l since Debian 5.0 (Lenny);
-p since Debian 5.0 (Lenny);
-v since Debian 5.0 (Lenny).
-c until Debian 9 (Stretch);
-d until Debian 11 (Bullseye).