]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - man/man8/xfs_bmap.8
6b4a88f54a6fe6cf71de9737a352e92552ca7f7d
[thirdparty/xfsprogs-dev.git] / man / man8 / xfs_bmap.8
1 .TH xfs_bmap 8
2 .SH NAME
3 xfs_bmap \- print block mapping for an XFS file
4 .SH SYNOPSIS
5 .nf
6 \f3xfs_bmap\f1 [ \f3\-a\f1 ] [ \f3\-l\f1 ] [ \f3\-d\f1 ] [ \f3\-n \f2nnn\f1 ] file ...
7 .fi
8 .SH DESCRIPTION
9 .I xfs_bmap
10 prints the map of disk blocks used by files in an XFS filesystem.
11 The map lists each \f2extent\fP used by the file, as well as regions
12 in the file that do not have any corresponding blocks (\f2hole\f1s).
13 Each line of the listings takes the following form:
14
15 .Ex
16 \f2extent\f1\f7: [\f1\f2startoffset\f1\f7..\f1\f2endoffset\f1\f7]: \c
17 \f1\f2startblock\f1\f7..\f1\f2endblock\f1
18 .Ee
19
20 Holes are marked by replacing the \f2startblock..endblock\f1 with \f2hole\fP.
21 All the file offsets and disk blocks are in units of 512-byte blocks,
22 no matter what the filesystem's block size is.
23 .PP
24 If portions of the file have been migrated offline by
25 a DMAPI application, a DMAPI read event will be generated to
26 bring those portions back online before the disk block map is
27 printed. However if the \f3-d\f1 option is used, no DMAPI read event
28 will be generated for a DMAPI file and offline portions will be reported as holes.
29 .PP
30 If the \f3-l\f1 option is used, then
31
32 .Ex
33 \f1\f2<nblocks>\f1\f7 \f1\f2blocks\f1\f7
34 .Ee
35
36 will be appended to each line. \f1\f2Nblocks\f1\f7 is the length
37 of the extent described on the line in units of 512-byte blocks.
38 .PP
39 If the \f3\-a\f1 option is given, information about the file's
40 attribute fork is printed instead of the default data fork.
41 .PP
42 If the \f3\-n \f2nnn\f1 option is given, \f3xfs_bmap\f1 obtains the extent
43 list of the file in groups of \f2nnn\f1 extents.
44 In the absence of \f3\-n\f1, \f3xfs_bmap\f1 queries the system for
45 the number of extents in the file and uses that value to compute
46 the group size.
47 .SH DIAGNOSTICS
48 .TP 10
49 \f7ioctl(XFS_IOC_GETBMAPX) \f1\f2filename\f1\f7: Invalid argument\f1
50 The file \f2filename\f1 is not in an XFS filesystem.
51 .SH SEE ALSO
52 xfs(5).