1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
.TH xfs_bmap 8
.SH NAME
xfs_bmap \- print block mapping for an XFS file
.SH SYNOPSIS
.B xfs_bmap
[
.B \-adelpv
] [
.B \-n
.I num_extents
]
.I file
.br
.B xfs_bmap \-V
.SH DESCRIPTION
.B xfs_bmap
prints the map of disk blocks used by files in an XFS filesystem.
The map lists each
.I 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:
.PP
.RS
.IR extent ": [" startoffset .. endoffset "]: " startblock .. endblock
.RE
.PP
Holes are marked by replacing the
.IR 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.
.PP
.SH OPTIONS
.TP
.B \-a
If this option is specified, information about the file's
attribute fork is printed instead of the default data fork.
.TP
.B \-e
If this option is used,
.B xfs_bmap
obtains all delayed allocation extents, and does not flush dirty pages
to disk before querying extent data. With the
.B \-v
option, the
.I flags
column will show which extents have not yet been allocated.
.TP
.B \-l
If this option is used, then
.IP
.RS 1.2i
.RI < nblocks "> blocks"
.RE
.IP
will be appended to each line.
.I nblocks
is the length of the extent described on the line in units of 512-byte blocks.
.IP
This flag has no effect if the
.B \-v
option is used.
.TP
.BI \-n " num_extents"
If this option is given,
.B xfs_bmap
will display at most
.I num_extents
extents. In the absence of
.BR \-n ", " xfs_bmap
will display all extents in the file.
.TP
.B \-p
If this option is used,
.B xfs_bmap
obtains all unwritten (preallocated) extents that do not contain written
data. With the
.B \-v
option, the
.I flags
column will show which extents are preallocated/unwritten.
.TP
.B \-v
Shows verbose information. When this flag is specified, additional AG
specific information is appended to each line in the following form:
.IP
.RS 1.2i
.IR agno " (" startagoffset .. endagoffset ") " nblocks " " flags
.RE
.IP
A second
.B \-v
option will print out the
.I flags
legend.
.TP
.B \-V
Prints the version number and exits.
.SH SEE ALSO
.BR xfs_fsr (8),
.BR xfs (5).
|