]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - man/man8/xfs_bmap.8
xfs_bmap: don't reject -e
[thirdparty/xfsprogs-dev.git] / man / man8 / xfs_bmap.8
CommitLineData
2bd0ea18
NS
1.TH xfs_bmap 8
2.SH NAME
3xfs_bmap \- print block mapping for an XFS file
4.SH SYNOPSIS
753bf054
BN
5.B xfs_bmap
6[
54806785 7.B \-adelpv
753bf054
BN
8] [
9.B \-n
10.I num_extents
11]
12.I file
eaa6a2bf
ES
13.br
14.B xfs_bmap \-V
2bd0ea18 15.SH DESCRIPTION
753bf054 16.B xfs_bmap
2bd0ea18 17prints the map of disk blocks used by files in an XFS filesystem.
753bf054
BN
18The map lists each
19.I extent
20used by the file, as well as regions
21in the file that do not have any corresponding blocks (holes).
2bd0ea18 22Each line of the listings takes the following form:
753bf054
BN
23.PP
24.RS
25.IR extent ": [" startoffset .. endoffset "]: " startblock .. endblock
26.RE
27.PP
28Holes are marked by replacing the
29.IR startblock .. endblock " with " hole .
2bd0ea18
NS
30All the file offsets and disk blocks are in units of 512-byte blocks,
31no matter what the filesystem's block size is.
32.PP
753bf054
BN
33.SH OPTIONS
34.TP
35.B \-a
36If this option is specified, information about the file's
37attribute fork is printed instead of the default data fork.
38.TP
7536ce44
DW
39.B \-c
40If this option is specified, information about the file's
41copy on write fork is printed instead of the default data fork.
42.TP
753bf054 43.B \-d
2bd0ea18
NS
44If portions of the file have been migrated offline by
45a DMAPI application, a DMAPI read event will be generated to
46bring those portions back online before the disk block map is
753bf054
BN
47printed. However if the
48.B \-d
49option is used, no DMAPI read event will be generated for a
50DMAPI file and offline portions will be reported as holes.
51.TP
7536ce44
DW
52.B \-e
53If this option is used,
54.B xfs_bmap
55obtains all delayed allocation extents, and does not flush dirty pages
56to disk before querying extent data. With the
57.B \-v
58option, the
59.I flags
60column will show which extents have not yet been allocated.
61.TP
753bf054
BN
62.B \-l
63If this option is used, then
64.IP
65.RS 1.2i
66.RI < nblocks "> blocks"
67.RE
68.IP
69will be appended to each line.
70.I nblocks
71is the length of the extent described on the line in units of 512-byte blocks.
72.IP
73This flag has no effect if the
74.B \-v
75option is used.
76.TP
77.BI \-n " num_extents"
78If this option is given,
79.B xfs_bmap
fa9f6f13 80will display at most
753bf054
BN
81.I num_extents
82extents. In the absence of
83.BR \-n ", " xfs_bmap
fa9f6f13 84will display all extents in the file.
753bf054
BN
85.TP
86.B \-p
87If this option is used,
88.B xfs_bmap
89obtains all unwritten (preallocated) extents that do not contain written
90data. With the
91.B \-v
92option, the
93.I flags
94column will show which extents are preallocated/unwritten.
95.TP
96.B \-v
97Shows verbose information. When this flag is specified, additional AG
98specific information is appended to each line in the following form:
99.IP
100.RS 1.2i
101.IR agno " (" startagoffset .. endagoffset ") " nblocks " " flags
102.RE
103.IP
104A second
105.B \-v
106option will print out the
107.I flags
108legend.
eaa6a2bf
ES
109.TP
110.B \-V
111Prints the version number and exits.
2bd0ea18 112.SH SEE ALSO
753bf054
BN
113.BR xfs_fsr (8),
114.BR xfs (5).