]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - man/man8/xfs_db.8
Merge back xfs_db version command extension from IRIX.
[thirdparty/xfsprogs-dev.git] / man / man8 / xfs_db.8
CommitLineData
2bd0ea18
NS
1.TH xfs_db 8
2.SH NAME
3xfs_db \- debug an XFS filesystem
4.SH SYNOPSIS
5.nf
6\f3xfs_db\f1 [ \f3\-c\f1 cmd ] ... [ \f3\-p\f1 prog ] [ \f3\-r\f1 ] [ \f3\-x\f1 ] xfs_special
7.sp .8v
8\f3xfs_db\f1 \f3\-f\f1 [ \f3\-c\f1 cmd ] ... [ \f3\-p\f1 prog ] [ \f3\-f\f1 ] [ \f3\-r\f1 ] [ \f3\-x\f1 ] file
9.fi
10.SH DESCRIPTION
11\f2xfs_db\f1 is used to examine an XFS filesystem.
12Under rare circumstances it can also be used to modify an XFS filesystem,
13but that task is normally left to \f2xfs_repair\f1(8) or to
42cf2b97 14scripts such as \f2xfs_admin\f1 that run \f2xfs_db\f1.
2bd0ea18
NS
15.PP
16The options to \f2xfs_db\f1 are:
17.TP 10
18\f3\-c\f1 \f2cmd\f1
19\f2xfs_db\f1 commands may be run interactively (the default)
20or as arguments on the command line.
21Multiple \f3\-c\f1 arguments may be given.
22The commands are run in the sequence given, then the program exits.
23This is the mechanism used to implement \f2xfs_check\f1(8).
24.TP
25\f3\-f\f1
d2df702b 26Specifies that the filesystem image to be processed is stored in a
2bd0ea18
NS
27regular file
28(see the \f2mkfs.xfs\f1 \f3\-d\f1 \f2file\f1 option).
29This might happen if an image copy
30of a filesystem has been made into an ordinary file with \f2xfs_copy\f1(8).
31.TP
cc01ba7a
NS
32.B \-l
33Specifies the device special file where the filesystems external
34log resides.
35Only for those filesystems which use an external log.
36See the
37\f2mkfs.xfs\f1 \f3\-l\f1 option, and refer to
38.IR xfs (5)
39for a detailed description of the XFS log.
40.TP
2bd0ea18
NS
41\f3\-i\f1
42Allows execution on a mounted filesystem, provided it is mounted read-only.
43Useful for shell scripts such as \f2xfs_check\f1(8), which must only
44operate on filesystems in a guarenteed consistent state
45(either unmounted or mounted read-only).
46These semantics are slightly different to that of the \f3\-r\f1 option.
47.TP
48\f3\-p\f1 \f2prog\f1
49Set the program name for prompts and some error messages,
50the default value is \f2xfs_db\f1.
51.TP
52\f3\-r\f1
53Open \f2file\f1 or \f2xfs_special\f1 read-only.
54This option is required if \f2xfs_special\f1 is a mounted filesystem.
55It is only necessary to omit this flag if a command that changes data
56(\f3write\f1, \f3blocktrash\f1) is to be used.
57.TP
58\f3\-x\f1
59Specifies expert mode.
60This enables the \f3write\f1 command.
61.SH CONCEPTS
62\f2xfs_db\f1 commands can be broken up into two classes.
63Most commands are for the navigation and display of data structures in
64the filesystem.
65Other commands are for scanning the filesystem in some way.
66.PP
67Commands which are used to navigate the filesystem structure take arguments
68which reflect the names of filesystem structure fields.
69There can be multiple field names separated by dots when the underlying
70structures are nested, as in C.
71The field names can be indexed (as an array index)
72if the underlying field is an array.
73The array indices can be specified as a range, two numbers separated by a dash.
74.PP
75\f2xfs_db\f1 maintains a current address in the filesystem.
76The granularity of the address is a filesystem structure.
77This can be a filesystem block,
78an inode or quota (smaller than a filesystem block),
79or a directory block (could be larger than a filesystem block).
80There are a variety of commands to set the current address.
81Associated with the current address is the current data type,
82which is the structural type of this data.
83Commands which follow the structure of the filesystem always set the type
84as well as the address.
85Commands which examine pieces of an individual file (inode) need the current
86inode to be set, this is done with the \f3inode\f1 command.
87.PP
88The current address/type information is actually maintained in a
89stack that can be explicitly manipulated with the
90\f3push\f1, \f3pop\f1, and \f3stack\f1 commands.
91This allows for easy examination of a nested filesystem structure.
92Also, the last several locations visited are stored in a ring buffer
93which can be manipulated with the
94\f3forward\f1, \f3back\f3, and \f3ring\f1 commands.
95.PP
96XFS filesystems are divided into a small number of allocation groups.
97\f2xfs_db\f1 maintains a notion of the current allocation group which is
98manipulated by some commands.
99The initial allocation group is 0.
100.SH COMMANDS
101.PP
102Many commands have extensive online help.
103Use the \f3help\f1 command for more details on any command.
104.TP 10
105\f3a\f1
106See the \f3addr\f1 command.
107.TP
108\f3ablock\f1 \f2filoff\f1
109Set current address to the offset \f2filoff\f1 (a filesystem block number)
110in the attribute area of the current inode.
111.TP
112\f3addr\f1 [ \f2field-expression\f1 ]
113Set current address to the value of the \f2field-expression\f1.
114This is used to ``follow'' a reference in one structure to the object
115being referred to.
116If no argument is given the current address is printed.
117.TP
118\f3agf\f1 [ \f2agno\f1 ]
119Set current address to the AGF block for allocation group \f2agno\f1.
120If no argument is given use the current allocation group.
121.TP
122\f3agfl\f1 [ \f2agno\f1 ]
123Set current address to the AGFL block for allocation group \f2agno\f1.
124If no argument is given use the current allocation group.
125.TP
126\f3agi\f1 [ \f2agno\f1 ]
127Set current address to the AGI block for allocation group \f2agno\f1.
128If no argument is given use the current allocation group.
129.TP
130\f3b\f1
131See the \f3back\f1 command.
132.TP
133\f3back\f1
134Move to the previous location in the position ring.
135.TP
136\f3blockfree\f1
137Free block usage information collected by the last execution of the
138\f3blockget\f1 command.
139This must be done before another \f3blockget\f1 command can be given,
140presumably with different arguments than the previous one.
141.TP
142\f3blockget\f1 [ \f3\-npsv\f1 ] [ \f3\-b\f1 \f2bno\f1 ] ... [ \f3\-i\f1 \f2ino\f1 ] ...
143Get block usage and check filesystem consistency.
144The information is saved for use by a subsequent
145\f3blockuse\f1, \f3ncheck\f1, or \f3blocktrash\f1 command.
146See \f2xfs_check\f1(8) for more information.
147.br
148The \f3\-b\f1 option is used to specify filesystem block numbers
149about which verbose information should be printed.
150.br
151The \f3\-i\f1 option is used to specify inode numbers about which
152verbose information should be printed.
153.br
154The \f3\-n\f1 option is used to save pathnames for inodes visited,
155this is used to support the \f2xfs_ncheck\f1(8) command.
156It also means that pathnames will be printed for inodes that have problems.
157This option uses a lot of memory so is not enabled by default.
158.br
159The \f3\-p\f1 option causes error messages to be prefixed with the
160filesystem name being processed.
161This is useful if several copies of \f2xfs_db\f1 are run in parallel.
162.br
163The \f3\-s\f1 option restricts output to severe errors only.
164This is useful if the output is too long otherwise.
165.br
166The \f3\-v\f1 option enables verbose output.
167Messages will be printed for every block and inode processed.
168.TP
169\f3blocktrash\f1 [ \f3\-n\f1 \f2c\f1 ] [ \f3\-x\f1 \f2a\f1 ] [ \f3\-y\f1 \f2b\f1 ] [ \f3\-s\f1 \f2s\f1 ] [ \f3\-0123\f1 ] [ \f3\-t\f1 \f2t\f1 ] ...
170Trash randomly selected filesystem metadata blocks.
171Trashing occurs to randomly selected bits in the chosen blocks.
172This command is available only in debugging versions of \f2xfs_db\f1.
173It is useful for testing \f2xfs_repair\f1(8) and \f2xfs_check\f1(8).
174.br
175The \f3\-0\f1, \f3\-1\f1, \f3\-2\f1, and \f3\-3\f1 options (mutually exclusive)
176set the operating mode for \f3blocktrash\f1.
177In \f3\-0\f1 mode, changed bits are cleared.
178In \f3\-1\f1 mode, changed bits are set.
179In \f3\-2\f1 mode, changed bits are inverted.
180In \f3\-3\f1 mode, changed bits are randomized.
181.br
182The \f3\-n\f1 option supplies the count of block-trashings to perform
183(default 1).
184.br
185The \f3\-s\f1 option supplies a seed to the random processing.
186.br
187The \f3\-t\f1 option gives a type of blocks to be selected
188for trashing.
189Multiple \f3\-t\f1 options may be given.
190If no \f3\-t\f1 options are given then all metadata types can be trashed.
191.br
192The \f3\-x\f1 option sets the minimum size of bit range to be trashed.
193The default value is 1.
194.br
195The \f3\-y\f1 option sets the maximum size of bit range to be trashed.
196The default value is 1024.
197.TP
198\f3blockuse\f1 [ \f3\-n\f1 ] [ \f3\-c\f1 \f2blockcount\f1 ]
199Print usage for current filesystem block(s).
200For each block, the type and (if any) inode are printed.
201.br
202The \f3\-c\f1 option specifies a count of blocks to process.
203The default value is 1 (the current block only).
204.br
205The \f3\-n\f1 option specifies that file names should be printed.
206The prior \f3blockget\f1 command must have also specified the \f3\-n\f1 option.
207.TP
208\f3bmap\f1 [ \f3\-a\f1 ] [ \f3\-d\f1 ] [ \f2block\f1 [ \f2len\f1 ] ]
209Show the block map for the current inode.
210The map display can be restricted to an area of the file with the
211\f2block\f1 and \f2len\f1 arguments.
212If \f2block\f1 is given and \f2len\f1 is omitted then 1 is assumed for len.
213.br
214The \f3\-a\f1 and \f3\-d\f1 options are used to select the attribute or data
215area of the inode, if neither option is given then both areas are shown.
216.TP
217\f3check\f1
218See the \f3blockget\f1 command.
219.TP
220\f3convert\f1 \f2type\f1 \f2number\f1 [ \f2type\f1 \f2number\f1 ] ... \f2type\f1
221Convert from one address form to another.
222The known \f2type\f1s, with alternate names, are:
223\f3agblock\f1 or \f3agbno\f1 (filesystem block within an allocation group),
224\f3agino\f1 or \f3aginode\f1 (inode number within an allocation group),
225\f3agnumber\f1 or \f3agno\f1 (allocation group number),
226\f3bboff\f1 or \f3daddroff\f1 (byte offset in a \f3daddr\f1),
227\f3blkoff\f1 or \f3fsboff\f1 or \f3agboff\f1 (byte offset in a \f3agblock\f1
228or \f3fsblock\f1),
229\f3byte\f1 or \f3fsbyte\f1 (byte address in filesystem),
230\f3daddr\f1 or \f3bb\f1 (disk address, 512-byte blocks),
231\f3fsblock\f1 or \f3fsb\f1 or \f3fsbno\f1 (filesystem block, see the
232\f3fsblock\f1 command),
233\f3ino\f1 or \f3inode\f1 (inode number),
234\f3inoidx\f1 or \f3offset\f1 (index of inode in filesystem block),
235and \f3inooff\f1 or \f3inodeoff\f1 (byte offset in inode).
236Only conversions that ``make sense'' are allowed.
237The compound form (with more than three arguments) is useful for
238conversions such as
239\f3convert\f1 \f3agno\f1 \f2ag\f1 \f3agbno\f1 \f2agb\f1 \f3fsblock\f1.
240.TP
241\f3daddr\f1 [ \f2d\f1 ]
242Set current address to the daddr (512 byte block) given by \f2d\f1.
243If no value for \f2d\f1 is given the current address is printed,
244expressed as a daddr.
245The type is set to \f3data\f1 (uninterpreted).
246.TP
247\f3dblock\f1 \f2filoff\f1
248Set current address to the offset \f2filoff\f1 (a filesystem block number)
249in the data area of the current inode.
250.TP
251\f3debug\f1 [ \f2flagbits\f1 ]
252Set debug option bits.
253These are used for debugging \f2xfs_db\f1.
254If no value is given for \f2flagbits\f1, print the current debug option bits.
255These are for the use of the implementor.
256.TP
257\f3dquot\f1 [ \f2projectid_or_userid\f1 ]
258Set current address to a project or user quota block.
259.TP
260\f3echo\f1 [ \f2arg\f1 ] ...
261Echo the arguments to the output.
262.TP
263\f3f\f1
264See the \f3forward\f1 command.
265.TP
266\f3forward\f1
267Move forward to the next entry in the position ring.
268.TP
269\f3frag\f1 [ \f3\-adflqRrv\f1 ]
270Get file fragmentation data.
271This prints information about fragmentation of file data in the filesystem
272(as opposed to fragmentation of freespace,
273for which see the \f3freesp\f1 command).
274Every file in the filesystem is examined to see how far from ideal
275its extent mappings are.
276A summary is printed giving the totals.
277.br
278The \f3\-v\f1 option sets verbosity,
279every inode has information printed for it.
280The remaining options select which inodes and extents are examined.
281If no options are given then all are assumed set,
282otherwise just those given are enabled.
283.br
284The \f3\-a\f1 option enables processing of attribute data.
285.br
286The \f3\-d\f1 option enables processing of directory data.
287.br
288The \f3\-f\f1 option enables processing of regular file data.
289.br
290The \f3\-l\f1 option enables processing of symbolic link data.
291.br
292The \f3\-q\f1 option enables processing of quota file data.
293.br
294The \f3\-R\f1 option enables processing of realtime control file data.
295.br
296The \f3\-r\f1 option enables processing of realtime file data.
297.TP
298\f3freesp\f1 [ \f3\-bcds\f1 ] [ \f3\-a\f1 \f2a\f1 ] ... [ \f3\-e\f1 \f2i\f1 ] [ \f3\-h\f1 \f2h1\f1 ] ... [ \f3\-m\f1 \f2m\f1 ]
299Summarize free space for the filesystem.
300The free blocks are examined and totalled,
301and displayed in the form of a histogram,
302with a count of extents in each range of free extent sizes.
303.br
304The \f3\-a\f1 \f2a\f1 option adds \f2a\f1 to the list of
305allocation groups to be processed.
306If no \f3\-a\f1 options are given then all allocation groups are processed.
307.br
308The \f3\-b\f1 option specifies that the histogram buckets are binary-sized,
309with the starting sizes being the powers of 2.
310.br
311The \f3\-c\f1 option specifies that \f3freesp\f1 will search the
312by-size (cnt) space Btree instead of the default by-block (bno) space Btree.
313.br
314The \f3\-d\f1 option specifies that every free extent will be displayed.
315.br
316The \f3\-e\f1 \f2i\f1 option specifies that the histogram buckets are
317equal-sized, with the size specified as \f2i\f1.
318.br
319The \f3\-h\f1 \f2h1\f1 option specifies a starting block number
320for a histogram bucket as \f2h1\f1.
321Multiple \f3\-h\f1 options are given to specify the complete set of buckets.
322.br
323The \f3\-m\f1 \f2m\f1 option specifies that the histogram
324starting block numbers are powers of \f2m\f1.
325This is the general case of \f3\-b\f1.
326.br
327The \f3\-s\f1 option specifies that a final summary of total free extents,
328free blocks, and the average free extent size is printed.
329.TP
330\f3fsb\f1
331See the \f3fsblock\f1 command.
332.TP
333\f3fsblock\f1 [ \f2fsb\f1 ]
334Set current address to the fsblock value given by \f2fsb\f1.
335If no value for \f2fsb\f1 is given the current address is printed,
336expressed as an fsb.
337The type is set to \f3data\f1 (uninterpreted).
338XFS filesystem block numbers are computed
339((\f2agno\f1 << \f2agshift\f1) | \f2agblock\f1)
340where \f2agshift\f1 depends on the size of an allocation group.
341Use the \f3convert\f1 command to convert to and from this form.
342Block numbers given for file blocks
343(for instance from the \f3bmap\f1 command)
344are in this form.
345.TP
346\f3hash\f1 \f2string\f1
347Prints the hash value of \f2string\f1 using the hash function of the XFS
348directory and attribute implementation.
349.TP
350\f3help\f1 [ \f2command\f1 ]
351Print help for one or all commands.
352.TP
353\f3inode\f1 [ \f2inode#\f1 ]
354Set the current inode number.
355If no \f2inode#\f1 is given, print the current inode number.
356.TP
512cfb8a
NS
357\f3label\f1 [ \f2label\f1 ]
358Set the filesystem label.
359The filesystem label can be used by
360.IR mount (8)
361instead of using a device special file.
362The maximum length of an XFS label is 12 characters \- use of a longer
363\f2label\f1 will result in truncation and a warning will be issued.
364If no \f2label\f1 is given, the current filesystem label is printed.
365.TP
2bd0ea18
NS
366\f3log\f1 [ \f3stop\f1 | \f3start\f1 \f2filename\f1 ]
367Start logging output to \f2filename\f1, stop logging,
368or print the current logging status.
369.TP
370\f3ncheck\f1 [ \f3\-s\f1 ] [ \f3\-i\f1 \f2ino\f1 ] ...
371Print name-inode pairs.
4ebc222c 372A \f3blockget \-n\f1 command must be run first to gather the information.
2bd0ea18
NS
373.br
374The \f3\-i\f1 option specifies an inode number to be printed.
375If no \f3\-i\f1 options are given then all inodes are printed.
376.br
377The \f3\-s\f1 option specifies that only setuid and setgid files are printed.
378.TP
379\f3p\f1
380See the \f3print\f1 command.
381.TP
382\f3pop\f1
383Pop location from the stack.
384.TP
385\f3print\f1 [ \f2field-expression\f1 ] ...
386Print field values.
387If no argument is given, print all fields in the current structure.
388.TP
389\f3push\f1 [ \f2command\f1 ]
390Push location to the stack.
391If \f2command\f1 is supplied,
392set the current location to the results of \f2command\f1
393after pushing the old location.
394.TP
395\f3q\f1
396See the \f3quit\f1 command.
397.TP
398\f3quit\f1
399Exit \f2xfs_db\f1.
400.TP
401\f3ring\f1 [ \f2index\f1 ]
402Show position ring (if no \f2index\f1 argument is given),
403or move to a specific entry in the position ring given by \f2index\f1.
404.TP
405\f3sb\f1 [ \f2agno\f1 ]
406Set current address to SB header in allocation group \f2agno\f1.
407If no \f2agno\f1 is given use the current allocation group number.
408.TP
409\f3source\f1 \f2source-file\f1
410Process commands from \f2source-file\f1.
411\f3source\f1 commands can be nested.
412.TP
413\f3stack\f1
414View the location stack.
415.TP
416\f3type\f1 [ \f2type\f1 ]
417Set the current data type to \f2type\f1.
418If no argument is given, show the current data type.
419The possible data types are:
420\f3agf\f1, \f3agfl\f1, \f3agi\f1, \f3attr\f1, \f3bmapbta\f1, \f3bmapbtd\f1,
421\f3bnobt\f1, \f3cntbt\f1, \f3data\f1, \f3dir\f1, \f3dir2\f1, \f3dqblk\f1,
422\f3inobt\f1, \f3inode\f1, \f3log\f1, \f3rtbitmap\f1, \f3rtsummary\f1,
c6b24b3b 423\f3sb\f1, \f3symlink\f1, and \f3text\f1.
2bd0ea18
NS
424See the TYPES section below for more information on these data types.
425.TP
512cfb8a
NS
426\f3uuid\f1 [ \f2uuid\f1 or \f2generate\f1 or \f2rewrite\f1 ]
427Set the filesystem universally unique identifier (UUID).
428The filesystem UUID can be used by
429.IR mount (8)
430instead of using a device special file.
431The \f2uuid\f1 can be set directly to the desired UUID, or it can
432be automatically generated using the \f2generate\f1 option.
433These options will both write the UUID into every copy of the
434superblock in the filesystem.
435\f2rewrite\f1 copies the current UUID from the primary superblock
436to all secondary copies of the superblock.
437If no argument is given, the current filesystem UUID is printed.
438.TP
d2df702b 439\f3version\f1 [ \f2extflg\f1 | [\f2versionnum\f1 \f2features2\f1 ] ]
4ca431fc
NS
440Enable selected features for a filesystem (certain features can
441be enabled on an unmounted filesystem, after
442.IR mkfs.xfs (8)
443has created the filesystem).
444Support for unwritten extents can be enabled using the \f2extflg\f1
445option.
d2df702b
NS
446Support for extended attributes can be enabled using the \f2attr1\f1
447or \f2attr2\f1 option.
448Once enabled, extended attributes cannot be disabled, but the user
449may toggle between \f2attr1\f1 and \f2attr2\f1 at will (older kernels
450may not support the newer version).
451.br
452With one argument, this command will write the updated version number
453into every copy of the superblock in the filesystem.
4ca431fc 454If no argument is given, the current version and feature bits are printed.
d2df702b
NS
455If two arguments are given, they will be used as numeric values for the
456\f2versionnum\f1 and \f2features2\f1 bits respectively, and their string
457equivalent reported (but no modifications are made).
4ca431fc 458.TP
512cfb8a 459\f3write\f1 [ \f2field\f1 or \f2value\f1 ] ...
2bd0ea18
NS
460Write a value to disk.
461Specific fields can be set in structures (struct mode),
462or a block can be set to data values (data mode),
463or a block can be set to string values (string mode, for symlink blocks).
464The operation happens immediately: there is no buffering.
465.br
466Struct mode is in effect when the current type is structural,
467i.e. not data.
468For struct mode, the syntax is ``\f3write\f1 \f2field\f1 \f2value\f1''.
469.br
470Data mode is in effect when the current type is data.
471In this case the contents of the block can be shifted or rotated left or right,
472or filled with a sequence, a constant value, or a random value.
473In this mode \f3write\f1 with no arguments gives more information on
474the allowed commands.
475.SH TYPES
476This section gives the fields in each structure type and their meanings.
477Note that some types of block cover multiple actual structures,
478for instance directory blocks.
479.TP 10
480\f3agf\f1
481The AGF block is the header for block allocation information;
482it is in the second 512-byte block of each allocation group.
483The following fields are defined:
484.br
485\f3magicnum\f1: AGF block magic number, 0x58414746 ('XAGF')
486.br
487\f3versionnum\f1: version number, currently 1
488.br
489\f3seqno\f1: sequence number starting from 0
490.br
491\f3length\f1: size in filesystem blocks of the allocation group.
492All allocation groups except the last one of the filesystem have
493the superblock's \f3agblocks\f1 value here
494.br
495\f3bnoroot\f1: block number of the root of the Btree holding free space
496information sorted by block number
497.br
498\f3cntroot\f1: block number of the root of the Btree holding free space
499information sorted by block count
500.br
501\f3bnolevel\f1: number of levels in the by-block-number Btree
502.br
503\f3cntlevel\f1: number of levels in the by-block-count Btree
504.br
505\f3flfirst\f1: index into the AGFL block of the first active entry
506.br
507\f3fllast\f1: index into the AGFL block of the last active entry
508.br
509\f3flcount\f1: count of active entries in the AGFL block
510.br
511\f3freeblks\f1: count of blocks represented in the freespace Btrees
512.br
513\f3longest\f1: longest free space represented in the freespace Btrees
514.TP
515\f3agfl\f1
516The AGFL block contains block numbers for use of the block allocator;
517it is in the fourth 512-byte block of each allocation group.
518Each entry in the active list is a block number within the allocation group
519that can be used for any purpose if space runs low.
520The AGF block fields \f3flfirst\f1, \f3fllast\f1, and \f3flcount\f1
521designate which entries are currently active.
522Entry space is allocated in a circular manner within the AGFL block.
523Fields defined:
524.br
525\f3bno\f1: array of all block numbers.
526Even those which are not active are printed
527.TP
528\f3agi\f1
529The AGI block is the header for inode allocation information;
530it is in the third 512-byte block of each allocation group.
531Fields defined:
532.br
533\f3magicnum\f1: AGI block magic number, 0x58414749 ('XAGI')
534.br
535\f3versionnum\f1: version number, currently 1
536.br
537\f3seqno\f1: sequence number starting from 0
538.br
539\f3length\f1: size in filesystem blocks of the allocation group
540.br
541\f3count\f1: count of inodes allocated
542.br
543\f3root\f1: block number of the root of the Btree holding inode allocation
544information
545.br
546\f3level\f1: number of levels in the inode allocation Btree
547.br
548\f3freecount\f1: count of allocated inodes that are not in use
549.br
550\f3newino\f1: last inode number allocated
551.br
552\f3dirino\f1: unused
553.br
554\f3unlinked\f1: an array of inode numbers within the allocation group.
555The entries in the AGI block are the heads of lists which run through the
556inode \f3next_unlinked\f1 field.
557These inodes are to be unlinked the next time the filesystem is mounted
558.TP
559\f3attr\f1
560An attribute fork is organized as a Btree with the actual data
561embedded in the leaf blocks.
562The root of the Btree is found in block 0 of the fork.
563The index (sort order) of the Btree is the hash value of the attribute name.
564All the blocks contain a \f3blkinfo\f1 structure at the beginning,
565see type \f3dir\f1 for a description.
566Nonleaf blocks are identical in format to those for version 1 and
567version 2 directories, see type \f3dir\f1 for a description.
568Leaf blocks can refer to ``local'' or ``remote'' attribute values.
569Local values are stored directly in the leaf block.
570Remote values are stored in an independent block in the attribute fork
571(with no structure).
572Leaf blocks contain the following fields:
573.br
574\f3hdr\f1: header containing
575a \f3blkinfo\f1 structure \f3info\f1 (magic number 0xfbee),
576a \f3count\f1 of active entries,
577\f3usedbytes\f1 total bytes of names and values,
578the \f3firstused\f1 byte in the name area,
579\f3holes\f1 set if the block needs compaction,
580and array \f3freemap\f1 as for \f3dir\f1 leaf blocks
581.br
582\f3entries\f1: array of structures containing
583a \f3hashval\f1,
584\f3nameidx\f1 (index into the block of the name),
585and flags \f3incomplete\f1,
586\f3root\f1,
587and \f3local\f1
588.br
589\f3nvlist\f1: array of structures describing the attribute names and values.
590Fields always present:
591\f3valuelen\f1 (length of value in bytes),
592\f3namelen\f1,
593and \f3name\f1.
594Fields present for local values:
595\f3value\f1 (value string).
596Fields present for remote values:
597\f3valueblk\f1 (fork block number of containing the value).
598.TP
599\f3bmapbt\f1
600Files with many extents in their data or attribute fork will have the
601extents described by the contents of a Btree for that fork,
602instead of being stored directly in the inode.
603Each bmap Btree starts with a root block contained within the inode.
604The other levels of the Btree are stored in filesystem blocks.
605The blocks are linked to sibling left and right blocks at each level,
606as well as by pointers from parent to child blocks.
607Each block contains the following fields:
608.br
609\f3magic\f1: bmap Btree block magic number, 0x424d4150 ('BMAP')
610.br
611\f3level\f1: level of this block above the leaf level
612.br
613\f3numrecs\f1: number of records or keys in the block
614.br
615\f3leftsib\f1: left (logically lower) sibling block, 0 if none
616.br
617\f3rightsib\f1: right (logically higher) sibling block, 0 if none
618.br
619\f3recs\f1: [leaf blocks only] array of extent records.
620Each record contains
621\f3startoff\f1,
622\f3startblock\f1,
623\f3blockcount\f1,
624and \f3extentflag\f1 (1 if the extent is unwritten)
625.br
626\f3keys\f1: [nonleaf blocks only] array of key records.
627These are the first key value of each block in the level below this one.
628Each record contains \f3startoff\f1
629.br
630\f3ptrs\f1: [nonleaf blocks only] array of child block pointers.
631Each pointer is a filesystem block number to the next level in the Btree
632.TP
633\f3bnobt\f1
634There is one set of filesystem blocks forming the by-block-number allocation
635Btree for each allocation group.
636The root block of this Btree is designated by the \f3bnoroot\f1 field in the
637coresponding AGF block.
638The blocks are linked to sibling left and right blocks at each level,
639as well as by pointers from parent to child blocks.
640Each block has the following fields:
641.br
642\f3magic\f1: BNOBT block magic number, 0x41425442 ('ABTB')
643.br
644\f3level\f1: level number of this block, 0 is a leaf
645.br
646\f3numrecs\f1: number of data entries in the block
647.br
648\f3leftsib\f1: left (logically lower) sibling block, 0 if none
649.br
650\f3rightsib\f1: right (logically higher) sibling block, 0 if none
651.br
652\f3recs\f1: [leaf blocks only] array of freespace records.
653Each record contains
654\f3startblock\f1
655and \f3blockcount\f1
656.br
657\f3keys\f1: [nonleaf blocks only] array of key records.
658These are the first value of each block in the level below this one.
d2df702b 659Each record contains
2bd0ea18
NS
660\f3startblock\f1
661and \f3blockcount\f1
662.br
663\f3ptrs\f1: [nonleaf blocks only] array of child block pointers.
664Each pointer is a block number within the allocation group to the next level
665in the Btree
666.TP
667\f3cntbt\f1
668There is one set of filesystem blocks forming the by-block-count allocation
669Btree for each allocation group.
670The root block of this Btree is designated by the \cntroot\f1 field in the
671coresponding AGF block.
672The blocks are linked to sibling left and right blocks at each level,
673as well as by pointers from parent to child blocks.
674Each block has the following fields:
675.br
676\f3magic\f1: CNTBT block magic number, 0x41425443 ('ABTC')
677.br
678\f3level\f1: level number of this block, 0 is a leaf
679.br
680\f3numrecs\f1: number of data entries in the block
681.br
682\f3leftsib\f1: left (logically lower) sibling block, 0 if none
683.br
684\f3rightsib\f1: right (logically higher) sibling block, 0 if none
685.br
686\f3recs\f1: [leaf blocks only] array of freespace records.
d2df702b 687Each record contains
2bd0ea18
NS
688\f3startblock\f1
689and \f3blockcount\f1
690.br
691\f3keys\f1: [nonleaf blocks only] array of key records.
692These are the first value of each block in the level below this one.
d2df702b 693Each record contains
2bd0ea18
NS
694\f3blockcount\f1
695and \f3startblock\f1
696.br
697\f3ptrs\f1: [nonleaf blocks only] array of child block pointers.
698Each pointer is a block number within the allocation group to the next level
699in the Btree
700.TP
701\f3data\f1
702User file blocks, and other blocks whose type is unknown,
703have this type for display purposes in \f2xfs_db\f1.
704The block data is displayed in hexadecimal format.
705.TP
706\f3dir\f1
707A version 1 directory is organized as a Btree with the directory data
708embedded in the leaf blocks.
709The root of the Btree is found in block 0 of the file.
710The index (sort order) of the Btree is the hash value of the entry name.
711All the blocks contain a \f3blkinfo\f1 structure at the beginning
712with the following fields:
713.br
714\f3forw\f1: next sibling block
715.br
716\f3back\f1: previous sibling block
717.br
718\f3magic\f1: magic number for this block type
719.sp
720The nonleaf (node) blocks have the following fields:
721.br
722\f3hdr\f1: header containing
723a \f3blkinfo\f1 structure \f3info\f1 (magic number 0xfebe),
724the \f3count\f1 of active entries,
725and the \f3level\f1 of this block above the leaves
726.br
727\f3btree\f1: array of entries containing
728\f3hashval\f1 and
729\f3before\f1 fields.
730The \f3before\f1 value is a block number within the directory file to the
731child block,
732the \f3hashval\f1 is the last hash value in that block
733.sp
734The leaf blocks have the following fields:
735.br
736\f3hdr\f1: header containing
737a \f3blkinfo\f1 structure \f3info\f1 (magic number 0xfeeb),
738the \f3count\f1 of active entries,
739\f3namebytes\f1 (total name string bytes),
740\f3holes\f1 flag (block needs compaction),
741and \f3freemap\f1 (array of \f3base\f1, \f3size\f1 entries for free regions)
742.br
743\f3entries\f1: array of structures containing
744\f3hashval\f1,
745\f3nameidx\f1 (byte index into the block of the name string),
746and \f3namelen\f1
747.br
748\f3namelist\f1: array of structures containing
749\f3inumber\f1
750and \f3name\f1
751.TP
752\f3dir2\f1
753A version 2 directory has four kinds of blocks.
754Data blocks start at offset 0 in the file.
755There are two kinds of data blocks: single-block directories have
756the leaf information embedded at the end of the block, data blocks
757in multi-block directories do not.
062998e3 758Node and leaf blocks start at offset 32GiB (with either a single
2bd0ea18 759leaf block or the root node block).
062998e3 760Freespace blocks start at offset 64GiB.
2bd0ea18
NS
761The node and leaf blocks form a Btree, with references to the data
762in the data blocks.
763The freespace blocks form an index of longest free spaces within the
764data blocks.
765.sp
766A single-block directory block contains the following fields:
767.br
d2df702b 768\f3bhdr\f1: header containing
2bd0ea18
NS
769\f3magic\f1 number 0x58443242 ('XD2B')
770and an array \f3bestfree\f1 of the longest 3 free spaces in the block
771(\f3offset\f1, \f3length\f1)
772.br
773\f3bu\f1: array of union structures.
774Each element is either an entry or a freespace.
775For entries, there are the following fields:
776\f3inumber\f1,
777\f3namelen\f1,
778\f3name\f1,
779and \f3tag\f1.
780For freespace, there are the following fields:
781\f3freetag\f1 (0xffff),
782\f3length\f1,
783and \f3tag\f1.
784The \f3tag\f1 value is the byte offset in the block of the start
785of the entry it is contained in
786.br
787\f3bleaf\f1: array of leaf entries containing
788\f3hashval\f1
789and \f3address\f1.
790The \f3address\f1 is a 64-bit word offset into the file
791.br
792\f3btail\f1: tail structure containing
793the total \f3count\f1 of leaf entries
794and \f3stale\f1 count of unused leaf entries
795.sp
796A data block contains the following fields:
797.br
798\f3dhdr\f1:
d2df702b 799header containing
2bd0ea18
NS
800\f3magic\f1 number 0x58443244 ('XD2D')
801and an array \f3bestfree\f1 of the longest 3 free spaces in the block
802(\f3offset\f1, \f3length\f1)
803.br
804\f3du\f1: array of union structures as for \f3bu\f1
805.sp
806Leaf blocks have two possible forms.
807If the Btree consists of a single leaf then the freespace information
808is in the leaf block,
809otherwise it is in separate blocks and the root of the Btree is
810a node block.
811A leaf block contains the following fields:
812.br
813\f3lhdr\f1: header containing
814a \f3blkinfo\f1 structure \f3info\f1 (magic number 0xd2f1 for the single
815leaf case, 0xd2ff for the true Btree case),
816the total \f3count\f1 of leaf entries,
817and \f3stale\f1 count of unused leaf entries
818.br
819\f3lents\f1: leaf entries, as for \f3bleaf\f1
820.br
821\f3lbests\f1: [single leaf only]
822array of values which represent the longest freespace
823in each data block in the directory
824.br
825\f3ltail\f1: [single leaf only] tail structure containing
826\f3bestcount\f1 count of \f3lbests\f1
827.sp
828A node block is identical to that for types \f3attr\f1 and \f3dir\f1.
829.sp
830A freespace block contains the following fields:
831.br
832\f3fhdr\f1: header containing
d2df702b 833\f3magic\f1 number 0x58443246 ('XD2F'),
2bd0ea18
NS
834\f3firstdb\f1 first data block number covered by this freespace block,
835\f3nvalid\f1 number of valid entries,
836and \f3nused\f1 number of entries representing real data blocks
837.br
838\f3fbests\f1: array of values as for \f3lbests\f1
839.TP
840\f3dqblk\f1
841The quota information is stored in files referred to by the superblock
842\f3uquotino\f1 and \f3pquotino\f1 fields.
843Each filesystem block in a quota file contains a constant number of
844quota entries.
845The quota entry size is currently 136 bytes,
062998e3 846so with a 4KiB filesystem block size there are 30 quota entries per block.
2bd0ea18
NS
847The \f3dquot\f1 command is used to locate these entries in the filesystem.
848The file entries are indexed by the user or project identifier
849to determine the block and offset.
850Each quota entry has the following fields:
851.br
852\f3magic\f1: magic number, 0x4451 ('DQ')
853.br
854\f3version\f1: version number, currently 1
855.br
856\f3flags\f1: flags, values include
8570x01 for user quota,
8580x02 for project quota
859.br
860\f3id\f1: user or project identifier
861.br
862\f3blk_hardlimit\f1: absolute limit on blocks in use
863.br
864\f3blk_softlimit\f1: preferred limit on blocks in use
865.br
866\f3ino_hardlimit\f1: absolute limit on inodes in use
867.br
868\f3ino_softlimit\f1: preferred limit on inodes in use
869.br
870\f3bcount\f1: blocks actually in use
871.br
872\f3icount\f1: inodes actually in use
873.br
874\f3itimer\f1: time when service will be refused if soft limit is violated
875for inodes
876.br
877\f3btimer\f1: time when service will be refused if soft limit is violated
878for blocks
879.br
880\f3iwarns\f1: number of warnings issued about inode limit violations
881.br
882\f3bwarns\f1: number of warnings issued about block limit violations
883.br
884\f3rtb_hardlimit\f1: absolute limit on realtime blocks in use
885.br
886\f3rtb_softlimit\f1: preferred limit on realtime blocks in use
887.br
888\f3rtbcount\f1: realtime blocks actually in use
889.br
890\f3rtbtimer\f1: time when service will be refused if soft limit is violated
891for realtime blocks
892.br
893\f3rtbwarns\f1: number of warnings issued about realtime block limit violations
894.TP
895\f3inobt\f1
896There is one set of filesystem blocks forming the inode allocation
897Btree for each allocation group.
898The root block of this Btree is designated by the \f3root\f1 field in the
899coresponding AGI block.
900The blocks are linked to sibling left and right blocks at each level,
901as well as by pointers from parent to child blocks.
902Each block has the following fields:
903.br
904\f3magic\f1: INOBT block magic number, 0x49414254 ('IABT')
905.br
906\f3level\f1: level number of this block, 0 is a leaf
907.br
908\f3numrecs\f1: number of data entries in the block
909.br
910\f3leftsib\f1: left (logically lower) sibling block, 0 if none
911.br
912\f3rightsib\f1: right (logically higher) sibling block, 0 if none
913.br
914\f3recs\f1: [leaf blocks only] array of inode records.
d2df702b 915Each record contains
2bd0ea18
NS
916\f3startino\f1 allocation-group relative inode number,
917\f3freecount\f1 count of free inodes in this chunk,
918and \f3free\f1 bitmap, LSB corresponds to inode 0
919.br
920\f3keys\f1: [nonleaf blocks only] array of key records.
921These are the first value of each block in the level below this one.
d2df702b 922Each record contains
2bd0ea18
NS
923\f3startino\f1
924.br
925\f3ptrs\f1: [nonleaf blocks only] array of child block pointers.
926Each pointer is a block number within the allocation group to the next level
927in the Btree
928.TP
929\f3inode\f1
930Inodes are allocated in ``chunks'' of 64 inodes each.
931Usually a chunk is multiple filesystem blocks, although there are cases
932with large filesystem blocks where a chunk is less than one block.
933The inode Btree (see \f3inobt\f1 above)
934refers to the inode numbers per allocation group.
935The inode numbers directly reflect the location of the inode block on disk.
936Use the \f3inode\f1 command to point \f2xfs_db\f1 to a specific inode.
937Each inode contains four regions:
938\f3core\f1,
939\f3next_unlinked\f1,
940\f3u\f1,
941and \f3a\f1.
942\f3core\f1 contains the fixed information.
943\f3next_unlinked\f1 is separated from the core due to
c4510382 944journaling considerations, see type \f3agi\f1 field \f3unlinked\f1.
2bd0ea18
NS
945\f3u\f1 is a union structure that is different in size and format depending
946on the type and representation of the file data (``data fork'').
947\f3a\f1 is an optional union structure to describe attribute data,
948that is different in size, format, and location depending on the presence
949and representation of attribute data, and the size of the \f3u\f1 data
950(``attribute fork'').
951\f2xfs_db\f1 automatically selects the proper union members based on
952information in the inode.
953.br
954The following are fields in the inode core:
955.br
956\f3magic\f1: inode magic number, 0x494e ('IN')
957.br
958\f3mode\f1: mode and type of file, as described in \f3chmod\f1(2),
959\f3mknod\f1(2), and \f3stat\f1(2)
960.br
961\f3version\f1: inode version, 1 or 2
962.br
963\f3format\f1: format of \f3u\f1 union data
63899e27 964(0: xfs_dev_t,
2bd0ea18
NS
9651: local file \- in-inode directory or symlink,
9662: extent list,
9673: Btree root,
9684: unique id [unused])
969.br
970\f3nlinkv1\f1: number of links to the file in a version 1 inode
971.br
972\f3nlinkv2\f1: number of links to the file in a version 2 inode
973.br
974\f3projid\f1: owner's project id (version 2 inode only)
975.br
976\f3uid\f1: owner's user id
977.br
978\f3gid\f1: owner's group id
979.br
980\f3atime\f1: time last accessed (seconds and nanoseconds)
981.br
982\f3mtime\f1: time last modified
983.br
984\f3ctime\f1: time created or inode last modified
985.br
986\f3size\f1: number of bytes in the file
987.br
988\f3nblocks\f1: total number of blocks in the file including
989indirect and attribute
990.br
399ab595 991\f3extsize\f1: basic/minimum extent size for the file
2bd0ea18
NS
992.br
993\f3nextents\f1: number of extents in the data fork
994.br
995\f3naextents\f1: number of extents in the attribute fork
996.br
997\f3forkoff\f1: attribute fork offset in the inode,
998in 64-bit words from the start of \f3u\f1
999.br
1000\f3aformat\f1: format of \f3a\f1 data
1001(1: local attribute data,
10022: extent list,
10033: Btree root)
1004.br
1005\f3dmevmask\f1: DMAPI event mask
1006.br
1007\f3dmstate\f1: DMAPI state information
1008.br
1009\f3newrtbm\f1: file is the realtime bitmap and is ``new'' format
1010.br
1011\f3prealloc\f1: file has preallocated data space after EOF
1012.br
1013\f3realtime\f1: file data is in the realtime subvolume
1014.br
1015\f3gen\f1: inode generation number
1016.sp
1017The following fields are in the \f3u\f1 data fork union:
1018.br
1019\f3bmbt\f1: bmap Btree root.
1020This looks like a \f3bmapbtd\f1 block with redundant information removed
1021.br
1022\f3bmx\f1: array of extent descriptors
1023.br
1024\f3dev\f1: dev_t for the block or character device
1025.br
1026\f3sfdir\f1: shortform (in-inode) version 1 directory.
d2df702b
NS
1027This consists of
1028a \f3hdr\f1 containing
2bd0ea18
NS
1029the \f3parent\f1 inode number
1030and a \f3count\f1 of active entries in the directory,
d2df702b 1031followed by
2bd0ea18 1032an array \f3list\f1 of \f3hdr\f1.\f3count\f1 entries.
d2df702b
NS
1033Each such entry contains
1034\f3inumber\f1,
2bd0ea18
NS
1035\f3namelen\f1,
1036and \f3name\f1 string
1037.br
1038\f3sfdir2\f1: shortform (in-inode) version 2 directory.
d2df702b
NS
1039This consists of
1040a \f3hdr\f1 containing
2bd0ea18
NS
1041a \f3count\f1 of active entries in the directory,
1042an \f3i8count\f1 of entries with inumbers that don't fit in a 32-bit value,
1043and the \f3parent\f1 inode number,
d2df702b 1044followed by
2bd0ea18 1045an array \f3list\f1 of \f3hdr\f1.\f3count\f1 entries.
d2df702b 1046Each such entry contains
2bd0ea18
NS
1047\f3namelen\f1,
1048a saved \f3offset\f1 used when the directory is converted to a larger form,
1049a \f3name\f1 string,
1050and the \f3inumber\f1
1051.br
1052\f3symlink\f1: symbolic link string value
1053.sp
1054The following fields are in the \f3a\f1 attribute fork union if it exists:
1055.br
1056\f3bmbt\f1: bmap Btree root, as above
1057.br
1058\f3bmx\f1: array of extent descriptors
1059.br
1060\f3sfattr\f1: shortform (in-inode) attribute values.
1061This consists of
1062a \f3hdr\f1 containing
1063a \f3totsize\f1 (total size in bytes)
1064and a \f3count\f1 of active entries,
1065followed by
1066an array \f3list\f1 of \f3hdr\f1.\f3count\f1 entries.
1067Each such entry contains
1068\f3namelen\f1,
1069\f3valuelen\f1,
1070\f3root\f1 flag,
1071\f3name\f1,
1072and \f3value\f1
1073.TP
1074\f3log\f1
1075Log blocks contain the journal entries for XFS.
1076It's not useful to examine these with \f2xfs_db\f1,
1077use \f2xfs_logprint\f1(8) instead.
1078.TP
1079\f3rtbitmap\f1
1080If the filesystem has a realtime subvolume, then the \f3rbmino\f1 field
1081in the superblock refers to a file that contains the realtime bitmap.
1082Each bit in the bitmap file controls the allocation of a single realtime extent
1083(set == free).
1084The bitmap is processed in 32-bit words,
1085the LSB of a word is used for the first extent controlled by that bitmap word.
1086The \f3atime\f1 field of the realtime bitmap inode contains a counter
1087that is used to control where the next new realtime file will start.
1088.TP
1089\f3rtsummary\f1
1090If the filesystem has a realtime subvolume,
1091then the \f3rsumino\f1 field in the superblock refers to a file
1092that contains the realtime summary data.
1093The summary file contains a two-dimensional array of 16-bit values.
1094Each value counts the number of free extent runs
1095(consecutive free realtime extents)
1096of a given range of sizes that starts in a given bitmap block.
1097The size ranges are binary buckets (low size in the bucket is a power of 2).
1098There are as many size ranges as are necessary given the size of the
1099realtime subvolume.
1100The first dimension is the size range,
1101the second dimension is the starting bitmap block number
1102(adjacent entries are for the same size, adjacent bitmap blocks).
1103.TP
1104\f3sb\f1
1105There is one sb (superblock) structure per allocation group.
1106It is the first disk block in the allocation group.
1107Only the first one (block 0 of the filesystem) is actually used;
1108the other blocks are redundant information for \f2xfs_repair\f1(8)
1109to use if the first superblock is damaged.
1110Fields defined:
1111.br
1112\f3magicnum\f1: superblock magic number, 0x58465342 ('XFSB')
1113.br
1114\f3blocksize\f1: filesystem block size in bytes
1115.br
1116\f3dblocks\f1: number of filesystem blocks present in the data subvolume
1117.br
1118\f3rblocks\f1: number of filesystem blocks present in the realtime subvolume
1119.br
1120\f3rextents\f1: number of realtime extents that \f3rblocks\f1 contain
1121.br
1122\f3uuid\f1: unique identifier of the filesystem
1123.br
1124\f3logstart\f1: starting filesystem block number of the log (journal).
1125If this value is 0 the log is ``external''
1126.br
1127\f3rootino\f1: root inode number
1128.br
1129\f3rbmino\f1: realtime bitmap inode number
1130.br
1131\f3rsumino\f1: realtime summary data inode number
1132.br
1133\f3rextsize\f1: realtime extent size in filesystem blocks
1134.br
1135\f3agblocks\f1: size of an allocation group in filesystem blocks
1136.br
1137\f3agcount\f1: number of allocation groups
1138.br
1139\f3rbmblocks\f1: number of realtime bitmap blocks
1140.br
1141\f3logblocks\f1: number of log blocks (filesystem blocks)
1142.br
1143\f3versionnum\f1: filesystem version information.
1144This value is currently 1, 2, 3, or 4 in the low 4 bits.
1145If the low bits are 4 then the other bits have additional meanings.
11461 is the original value.
11472 means that attributes were used.
11483 means that version 2 inodes (large link counts) were used.
11494 is the bitmask version of the version number.
1150In this case, the other bits are used as flags
1151(0x0010: attributes were used,
11520x0020: version 2 inodes were used,
11530x0040: quotas were used,
11540x0080: inode cluster alignment is in force,
11550x0100: data stripe alignment is in force,
11560x0200: the \f3shared_vn\f1 field is used,
11570x1000: unwritten extent tracking is on,
11580x2000: version 2 directories are in use)
1159.br
1160\f3sectsize\f1: sector size in bytes, currently always 512.
1161This is the size of the superblock and the other header blocks
1162.br
1163\f3inodesize\f1: inode size in bytes
1164.br
1165\f3inopblock\f1: number of inodes per filesystem block
1166.br
1167\f3fname\f1: obsolete, filesystem name
1168.br
1169\f3fpack\f1: obsolete, filesystem pack name
1170.br
1171\f3blocklog\f1: log2 of \f3blocksize\f1
1172.br
1173\f3sectlog\f1: log2 of \f3sectsize\f1
1174.br
1175\f3inodelog\f1: log2 of \f3inodesize\f1
1176.br
1177\f3inopblog\f1: log2 of \f3inopblock\f1
1178.br
1179\f3agblklog\f1: log2 of \f3agblocks\f1 (rounded up)
1180.br
1181\f3rextslog\f1: log2 of \f3rextents\f1
1182.br
1183\f3inprogress\f1: \f2mkfs.xfs\f1(8) aborted before completing this filesystem
1184.br
1185\f3imax_pct\f1: maximum percentage of filesystem space used for inode blocks
1186.br
1187\f3icount\f1: number of allocated inodes
1188.br
1189\f3ifree\f1: number of allocated inodes that are not in use
1190.br
1191\f3fdblocks\f1: number of free data blocks
1192.br
1193\f3frextents\f1: number of free realtime extents
1194.br
1195\f3uquotino\f1: user quota inode number
1196.br
1197\f3pquotino\f1: project quota inode number; this is currently unused
1198.br
1199\f3qflags\f1: quota status flags
1200(0x01: user quota accounting is on,
12010x02: user quota limits are enforced,
12020x04: quotacheck has been run on user quotas,
12030x08: project quota accounting is on,
12040x10: project quota limits are enforced,
12050x20: quotacheck has been run on project quotas)
1206.br
1207\f3flags\f1: random flags.
12080x01: only read-only mounts are allowed
1209.br
1210\f3shared_vn\f1: shared version number (shared readonly filesystems)
1211.br
1212\f3inoalignmt\f1: inode chunk alignment in filesystem blocks
1213.br
1214\f3unit\f1: stripe or RAID unit
1215.br
1216\f3width\f1: stripe or RAID width
1217.br
1218\f3dirblklog\f1: log2 of directory block size (filesystem blocks)
1219.TP
1220\f3symlink\f1
1221Symbolic link blocks are used only when the symbolic link value does
1222not fit inside the inode.
1223The block content is just the string value.
1224Bytes past the logical end of the symbolic link value have arbitrary values.
c6b24b3b
NS
1225.TP
1226\f3text\f1
1227User file blocks, and other blocks whose type is unknown,
1228have this type for display purposes in \f2xfs_db\f1.
d2df702b 1229The block data is displayed in two columns: Hexadecimal format
c6b24b3b 1230and printable ASCII chars.
2bd0ea18
NS
1231.SH DIAGNOSTICS
1232Many messages can come from the \f3check\f1 (\f3blockget\f1) command;
1233these are documented in \f2xfs_check\f1(8).
1234.SH SEE ALSO
1235mkfs.xfs(8),
42cf2b97 1236xfs_admin(8),
2bd0ea18
NS
1237xfs_check(8),
1238xfs_copy(8),
1239xfs_logprint(8),
1240xfs_ncheck(8),
1241xfs_repair(8),
512cfb8a 1242mount(8),
2bd0ea18
NS
1243chmod(2),
1244mknod(2),
1245stat(2),
1246xfs(5).