]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - man/man8/xfs_db.8
Update man pages to linux formatting/macro standards
[thirdparty/xfsprogs-dev.git] / man / man8 / xfs_db.8
1 .TH xfs_db 8
2 .SH NAME
3 xfs_db \- debug an XFS filesystem
4 .SH SYNOPSIS
5 .B xfs_db
6 [
7 .B \-c
8 .I cmd
9 ] ... [
10 .BR \-i | r | x
11 ] [
12 .B \-f
13 ] [
14 .B \-l
15 .I logdev
16 ] [
17 .B \-p
18 .I progname
19 ]
20 .I device
21 .br
22 .B xfs_db \-V
23 .SH DESCRIPTION
24 .B xfs_db
25 is used to examine an XFS filesystem. Under rare circumstances it can also
26 be used to modify an XFS filesystem, but that task is normally left to
27 .BR xfs_repair (8)
28 or to scripts such as
29 .BR xfs_admin (8)
30 that run
31 .BR xfs_db .
32 .PP
33 .SH OPTIONS
34 .TP
35 .BI \-c " cmd"
36 .B xfs_db
37 commands may be run interactively (the default) or as arguments
38 on the command line. Multiple
39 .B \-c
40 arguments may be given. The commands are run in the sequence given,
41 then the program exits. This is the mechanism used to implement
42 .BR xfs_check (8).
43 .TP
44 .B \-f
45 Specifies that the filesystem image to be processed is stored in a
46 regular file at
47 .I device
48 (see the
49 .BR mkfs.xfs "(8) " -d
50 .I file
51 option).
52 This might happen if an image copy of a filesystem has been made into
53 an ordinary file with
54 .BR xfs_copy (8).
55 .TP
56 .B \-i
57 Allows execution on a mounted filesystem, provided it is mounted read-only.
58 Useful for shell scripts such as
59 .BR xfs_check (8),
60 which must only operate on filesystems in a guarenteed consistent state
61 (either unmounted or mounted read-only). These semantics are slightly
62 different to that of the
63 .B -r
64 option.
65 .TP
66 .BI \-l " logdev"
67 Specifies the device where the filesystems external log resides.
68 Only for those filesystems which use an external log. See the
69 .BR mkfs.xfs "(8) " \-l
70 option, and refer to
71 .BR xfs (5)
72 for a detailed description of the XFS log.
73 .TP
74 .BI \-p " progname"
75 Set the program name to
76 .I progname
77 for prompts and some error messages, the default value is
78 .BR xfs_db .
79 .TP
80 .B -r
81 Open
82 .I device
83 or
84 .I filename
85 read-only. This option is required if the filesystem is mounted.
86 It is only necessary to omit this flag if a command that changes data
87 .RB ( write ", " blocktrash )
88 is to be used.
89 .TP
90 .B \-x
91 Specifies expert mode.
92 This enables the
93 .B write
94 and
95 .B blocktrash
96 commands.
97 .TP
98 .B \-V
99 Prints out the current version number and exits.
100 .SH CONCEPTS
101 .B xfs_db
102 commands can be broken up into two classes. Most commands are for
103 the navigation and display of data structures in the filesystem.
104 Other commands are for scanning the filesystem in some way.
105 .PP
106 Commands which are used to navigate the filesystem structure take arguments
107 which reflect the names of filesystem structure fields.
108 There can be multiple field names separated by dots when the underlying
109 structures are nested, as in C.
110 The field names can be indexed (as an array index)
111 if the underlying field is an array.
112 The array indices can be specified as a range, two numbers separated by a dash.
113 .PP
114 .B xfs_db
115 maintains a current address in the filesystem.
116 The granularity of the address is a filesystem structure.
117 This can be a filesystem block,
118 an inode or quota (smaller than a filesystem block),
119 or a directory block (could be larger than a filesystem block).
120 There are a variety of commands to set the current address.
121 Associated with the current address is the current data type,
122 which is the structural type of this data.
123 Commands which follow the structure of the filesystem always set the type
124 as well as the address.
125 Commands which examine pieces of an individual file (inode) need the current
126 inode to be set, this is done with the
127 .B inode
128 command.
129 .PP
130 The current address/type information is actually maintained in a
131 stack that can be explicitly manipulated with the
132 .BR push ", " pop ", and " stack
133 commands.
134 This allows for easy examination of a nested filesystem structure.
135 Also, the last several locations visited are stored in a ring buffer
136 which can be manipulated with the
137 .BR forward ", " back ", and " ring
138 commands.
139 .PP
140 XFS filesystems are divided into a small number of allocation groups.
141 .B xfs_db
142 maintains a notion of the current allocation group which is
143 manipulated by some commands. The initial allocation group is 0.
144 .SH COMMANDS
145 .PP
146 Many commands have extensive online help. Use the
147 .B help
148 command for more details on any command.
149 .TP
150 .B a
151 See the
152 .B addr
153 command.
154 .TP
155 .BI ablock " filoff"
156 Set current address to the offset .
157 I filoff
158 (a filesystem block number) in the attribute area of the current inode.
159 .TP
160 .BI "addr [" field-expression ]
161 Set current address to the value of the
162 .IR field-expression .
163 This is used to "follow" a reference in one structure to the object
164 being referred to. If no argument is given the current address is printed.
165 .TP
166 .BI "agf [" agno ]
167 Set current address to the AGF block for allocation group
168 .IR agno .
169 If no argument is given use the current allocation group.
170 .TP
171 .BI "agfl [" agno ]
172 Set current address to the AGFL block for allocation group
173 .IR agno .
174 If no argument is given use the current allocation group.
175 .TP
176 .BI "agi [" agno ]
177 Set current address to the AGI block for allocation group
178 .IR agno .
179 If no argument is given use the current allocation group.
180 .TP
181 .B b
182 See the
183 .B back
184 command.
185 .TP
186 .B back
187 Move to the previous location in the position ring.
188 .TP
189 .B blockfree
190 Free block usage information collected by the last execution of the
191 .B blockget
192 command. This must be done before another
193 .B blockget
194 command can be given, presumably with different arguments than the previous one.
195 .TP
196 .BI "blockget [\-npvs] [\-b " bno "] ... [\-i " ino "] ..."
197 Get block usage and check filesystem consistency.
198 The information is saved for use by a subsequent
199 .BR blockuse ", " ncheck ", or " blocktrash
200 command. See
201 .BR xfs_check (8)
202 for more information.
203 .RS 1.0i
204 .TP 0.4i
205 .B \-b
206 is used to specify filesystem block numbers about which verbose
207 information should be printed.
208 .TP
209 .B \-i
210 is used to specify inode numbers about which verbose information
211 should be printed.
212 .TP
213 .B \-n
214 is used to save pathnames for inodes visited, this is used to support the
215 .BR xfs_ncheck (8)
216 command. It also means that pathnames will be printed for inodes that have
217 problems. This option uses a lot of memory so is not enabled by default.
218 .TP
219 .B \-p
220 causes error messages to be prefixed with the filesystem name being
221 processed. This is useful if several copies of
222 .B xfs_db
223 are run in parallel.
224 .TP
225 .B \-s
226 restricts output to severe errors only. This is useful if the output is
227 too long otherwise.
228 .TP
229 .B \-v
230 enables verbose output. Messages will be printed for every block and
231 inode processed.
232 .RE
233 .TP
234 .BI "blocktrash [\-n " count "] [\-x " min "] [\-y " max "] [\-s " seed "] [\-0|1|2|3] [\-t " type "] ..."
235 Trash randomly selected filesystem metadata blocks.
236 Trashing occurs to randomly selected bits in the chosen blocks.
237 This command is available only in debugging versions of
238 .BR xfs_db .
239 It is useful for testing
240 .BR xfs_repair "(8) and " xfs_check (8).
241 .RS 1.0i
242 .TP 0.4i
243 .BR \-0 " | " -1 " | " -2 " | " -3
244 These are used to set the operating mode for
245 .BR blocktrash .
246 Only one can be used:
247 .B \-0
248 changed bits are cleared;
249 .B \-1
250 changed bits are set;
251 .B -2
252 changed bits are inverted;
253 .B -3
254 changed bits are randomized.
255 .TP
256 .B \-n
257 supplies the
258 .I count
259 of block-trashings to perform (default 1).
260 .TP
261 .B \-s
262 supplies a
263 .I seed
264 to the random processing.
265 .TP
266 .B \-t
267 gives a
268 .I type
269 of blocks to be selected for trashing. Multiple
270 .B \-t
271 options may be given. If no
272 .B \-t
273 options are given then all metadata types can be trashed.
274 .TP
275 .B \-x
276 sets the
277 .I minimum
278 size of bit range to be trashed. The default value is 1.
279 .TP
280 .B \-y
281 sets the
282 .I maximum
283 size of bit range to be trashed. The default value is 1024.
284 .RE
285 .TP
286 .BI "blockuse [\-n] [\-c " count ]
287 Print usage for current filesystem block(s).
288 For each block, the type and (if any) inode are printed.
289 .RS 1.0i
290 .TP 0.4i
291 .B \-c
292 specifies a
293 .I count
294 of blocks to process. The default value is 1 (the current block only).
295 .TP
296 .B \-n
297 specifies that file names should be printed. The prior
298 .B blockget
299 command must have also specified the
300 .B \-n
301 option.
302 .RE
303 .TP
304 .BI "bmap [\-a\] [\-d] [" block " [" len ]]
305 Show the block map for the current inode.
306 The map display can be restricted to an area of the file with the
307 .I block
308 and
309 .I len
310 arguments. If
311 .I block
312 is given and
313 .I len
314 is omitted then 1 is assumed for len.
315 .IP
316 The
317 .B \-a
318 and
319 .B \-d
320 options are used to select the attribute or data
321 area of the inode, if neither option is given then both areas are shown.
322 .TP
323 .B check
324 See the
325 .B blockget
326 command.
327 .TP
328 .BI "convert " "type number" " [" "type number" "] ... " type
329 Convert from one address form to another.
330 The known
331 .IR type s,
332 with alternate names, are:
333 .RS 1.0i
334 .PD 0
335 .HP
336 .B agblock
337 or
338 .B agbno
339 (filesystem block within an allocation group)
340 .HP
341 .B agino
342 or
343 .B aginode
344 (inode number within an allocation group)
345 .HP
346 .B agnumber
347 or
348 .B agno
349 (allocation group number)
350 .HP
351 .B bboff
352 or
353 .B daddroff
354 (byte offset in a
355 .BR daddr )
356 .HP
357 .B blkoff
358 or
359 .B fsboff or
360 .B agboff
361 (byte offset in a
362 .B agblock
363 or
364 .BR fsblock )
365 .HP
366 .B byte
367 or
368 .B fsbyte
369 (byte address in filesystem)
370 .HP
371 .B daddr
372 or
373 .B bb
374 (disk address, 512-byte blocks)
375 .HP
376 .B fsblock
377 or
378 .B fsb
379 or
380 .B fsbno
381 (filesystem block, see the
382 .B fsblock
383 command)
384 .HP
385 .B ino
386 or
387 .B inode
388 (inode number)
389 .HP
390 .B inoidx
391 or
392 .B offset
393 (index of inode in filesystem block)
394 .HP
395 .B inooff
396 or
397 .B inodeoff
398 (byte offset in inode)
399 .PD
400 .RE
401 .IP
402 Only conversions that "make sense" are allowed.
403 The compound form (with more than three arguments) is useful for
404 conversions such as
405 .B convert agno
406 .I ag
407 .B agbno
408 .I agb
409 .BR fsblock .
410 .TP
411 .BI "daddr [" d ]
412 Set current address to the daddr (512 byte block) given by
413 .IR d .
414 If no value for
415 .I d
416 is given the current address is printed, expressed as a daddr.
417 The type is set to .
418 .B data
419 (uninterpreted).
420 .TP
421 .BI dblock " filoff"
422 Set current address to the offset
423 .I filoff
424 (a filesystem block number) in the data area of the current inode.
425 .TP
426 .BI "debug [" flagbits ]
427 Set debug option bits. These are used for debugging
428 .BR xfs_db .
429 If no value is given for
430 .IR flagbits ,
431 print the current debug option bits. These are for the use of the implementor.
432 .TP
433 .BI "dquot [" projectid_or_userid ]
434 Set current address to a project or user quota block.
435 .TP
436 .BI "echo [" arg "] ..."
437 Echo the arguments to the output.
438 .TP
439 .B f
440 See the
441 .B forward
442 command.
443 .TP
444 .B forward
445 Move forward to the next entry in the position ring.
446 .TP
447 .B frag [\-adflqRrv]
448 Get file fragmentation data. This prints information about fragmentation
449 of file data in the filesystem (as opposed to fragmentation of freespace,
450 for which see the
451 .B freesp
452 command). Every file in the filesystem is examined to see how far from ideal
453 its extent mappings are. A summary is printed giving the totals.
454 .RS 1.0i
455 .TP 0.4i
456 .B \-v
457 sets verbosity, every inode has information printed for it.
458 The remaining options select which inodes and extents are examined.
459 If no options are given then all are assumed set,
460 otherwise just those given are enabled.
461 .TP
462 .B \-a
463 enables processing of attribute data.
464 .TP
465 .B \-d
466 enables processing of directory data.
467 .TP
468 .B \-f
469 enables processing of regular file data.
470 .TP
471 .B \-l
472 enables processing of symbolic link data.
473 .TP
474 .B \-q
475 enables processing of quota file data.
476 .TP
477 .B \-R
478 enables processing of realtime control file data.
479 .TP
480 .B \-r
481 enables processing of realtime file data.
482 .RE
483 .TP
484 .BI "freesp [\-bcds] [\-a " ag "] ... [\-e " i "] [\-h " h1 "] ... [\-m " m ]
485 Summarize free space for the filesystem. The free blocks are examined
486 and totalled, and displayed in the form of a histogram, with a count
487 of extents in each range of free extent sizes.
488 .RS 1.0i
489 .TP 0.4i
490 .B \-a
491 adds
492 .I ag
493 to the list of allocation groups to be processed. If no
494 .B \-a
495 options are given then all allocation groups are processed.
496 .TP
497 .B \-b
498 specifies that the histogram buckets are binary-sized, with the starting
499 sizes being the powers of 2.
500 .TP
501 .B \-c
502 specifies that
503 .B freesp
504 will search the by-size (cnt) space Btree instead of the default
505 by-block (bno) space Btree.
506 .TP
507 .B \-d
508 specifies that every free extent will be displayed.
509 .TP
510 .B \-e
511 specifies that the histogram buckets are
512 equal-sized, with the size specified as
513 .IR i .
514 .TP
515 .B \-h
516 specifies a starting block number for a histogram bucket as
517 .IR h1 .
518 Multiple
519 .BR \-h 's
520 are given to specify the complete set of buckets.
521 .TP
522 .B \-m
523 specifies that the histogram starting block numbers are powers of
524 .IR m .
525 This is the general case of
526 .BR \-b .
527 .TP
528 .B \-s
529 specifies that a final summary of total free extents,
530 free blocks, and the average free extent size is printed.
531 .RE
532 .TP
533 .B fsb
534 See the
535 .B fsblock
536 command.
537 .TP
538 .BI "fsblock [" fsb ]
539 Set current address to the fsblock value given by
540 .IR fsb .
541 If no value for
542 .I fsb
543 is given the current address is printed, expressed as an fsb.
544 The type is set to
545 .B data
546 (uninterpreted). XFS filesystem block numbers are computed
547 .RI (( agno " << " agshift ") | " agblock )
548 where
549 .I agshift
550 depends on the size of an allocation group. Use the
551 .B convert
552 command to convert to and from this form. Block numbers given for file blocks
553 (for instance from the
554 .B bmap
555 command) are in this form.
556 .TP
557 .BI hash " string
558 Prints the hash value of
559 .I string
560 using the hash function of the XFS directory and attribute implementation.
561 .TP
562 .BI "help [" command ]
563 Print help for one or all commands.
564 .TP
565 .BI "inode [" inode# ]
566 Set the current inode number. If no
567 .I inode#
568 is given, print the current inode number.
569 .TP
570 .BI "label [" label ]
571 Set the filesystem label. The filesystem label can be used by
572 .BR mount (8)
573 instead of using a device special file.
574 The maximum length of an XFS label is 12 characters \- use of a longer
575 .I label
576 will result in truncation and a warning will be issued. If no
577 .I label
578 is given, the current filesystem label is printed.
579 .TP
580 .BI "log [stop | start " filename ]
581 Start logging output to
582 .IR filename ,
583 stop logging, or print the current logging status.
584 .TP
585 .BI "metadump [\-egow] " filename
586 Dumps metadata to a file. See
587 .BR xfs_metadump (8)
588 for more information.
589 .TP
590 .BI "ncheck [\-s] [\-i " ino "] ..."
591 Print name-inode pairs. A
592 .B blockget \-n
593 command must be run first to gather the information.
594 .RS 1.0i
595 .TP 0.4i
596 .B \-i
597 specifies an inode number to be printed. If no
598 .B \-i
599 options are given then all inodes are printed.
600 .TP
601 .B \-s
602 specifies that only setuid and setgid files are printed.
603 .RE
604 .TP
605 .B p
606 See the
607 .B print
608 command.
609 .TP
610 .B pop
611 Pop location from the stack.
612 .TP
613 .BI "print [" field-expression "] ..."
614 Print field values.
615 If no argument is given, print all fields in the current structure.
616 .TP
617 .BI "push [" command ]
618 Push location to the stack. If
619 .I command
620 is supplied, set the current location to the results of
621 .I command
622 after pushing the old location.
623 .TP
624 .B q
625 See the
626 .B quit
627 command.
628 .TP
629 .B quit
630 Exit
631 .BR xfs_db .
632 .TP
633 .BI "ring [" index ]
634 Show position ring (if no
635 .I index
636 argument is given), or move to a specific entry in the position ring given by
637 .IR index .
638 .TP
639 .BI "sb [" agno ]
640 Set current address to SB header in allocation group
641 .IR agno .
642 If no
643 .I agno
644 is given use the current allocation group number.
645 .TP
646 .BI "source " source-file
647 Process commands from
648 .IR source-file .
649 .B source
650 commands can be nested.
651 .TP
652 .B stack
653 View the location stack.
654 .TP
655 .BI "type [" type ]
656 Set the current data type to
657 .IR type .
658 If no argument is given, show the current data type.
659 The possible data types are:
660 .BR agf ", " agfl ", " agi ", " attr ", " bmapbta ", " bmapbtd ,
661 .BR bnobt ", " cntbt ", " data ", " dir ", " dir2 ", " dqblk ,
662 .BR inobt ", " inode ", " log ", " rtbitmap ", " rtsummary ,
663 .BR sb ", " symlink " and " text .
664 See the TYPES section below for more information on these data types.
665 .TP
666 .BI "uuid [" uuid " | generate | rewrite]"
667 Set the filesystem universally unique identifier (UUID).
668 The filesystem UUID can be used by
669 .BR mount (8)
670 instead of using a device special file.
671 The
672 .I uuid
673 can be set directly to the desired UUID, or it can
674 be automatically generated using the
675 .B generate
676 option. These options will both write the UUID into every copy of the
677 superblock in the filesystem.
678 .B rewrite
679 copies the current UUID from the primary superblock
680 to all secondary copies of the superblock.
681 If no argument is given, the current filesystem UUID is printed.
682 .TP
683 .BI "version [" feature " | " "versionnum features2" ]
684 Enable selected features for a filesystem (certain features can
685 be enabled on an unmounted filesystem, after
686 .BR mkfs.xfs (8)
687 has created the filesystem).
688 Support for unwritten extents can be enabled using the
689 .B extflg
690 option. Support for version 2 log format can be enabled using the
691 .B log2
692 option. Support for extended attributes can be enabled using the
693 .B attr1
694 or
695 .B attr2
696 option. Once enabled, extended attributes cannot be disabled, but the user
697 may toggle between
698 .B attr1
699 and
700 .B attr2
701 at will (older kernels may not support the newer version).
702 .IP
703 If no argument is given, the current version and feature bits are printed.
704 With one argument, this command will write the updated version number
705 into every copy of the superblock in the filesystem.
706 If two arguments are given, they will be used as numeric values for the
707 .I versionnum
708 and
709 .I features2
710 bits respectively, and their string equivalent reported
711 (but no modifications are made).
712 .TP
713 .BI "write [" "field value" "] ..."
714 Write a value to disk.
715 Specific fields can be set in structures (struct mode),
716 or a block can be set to data values (data mode),
717 or a block can be set to string values (string mode, for symlink blocks).
718 The operation happens immediately: there is no buffering.
719 .IP
720 Struct mode is in effect when the current type is structural,
721 i.e. not data. For struct mode, the syntax is "\c
722 .B write
723 .I field value\c
724 ".
725 .IP
726 Data mode is in effect when the current type is data. In this case the
727 contents of the block can be shifted or rotated left or right, or filled
728 with a sequence, a constant value, or a random value. In this mode
729 .B write
730 with no arguments gives more information on the allowed commands.
731 .SH TYPES
732 This section gives the fields in each structure type and their meanings.
733 Note that some types of block cover multiple actual structures,
734 for instance directory blocks.
735 .TP 1.0i
736 .B agf
737 The AGF block is the header for block allocation information;
738 it is in the second 512-byte block of each allocation group.
739 The following fields are defined:
740 .RS 1.4i
741 .PD 0
742 .TP 1.2i
743 .B magicnum
744 AGF block magic number, 0x58414746 ('XAGF').
745 .TP
746 .B versionnum
747 version number, currently 1.
748 .TP
749 .B seqno
750 sequence number starting from 0.
751 .TP
752 .B length
753 size in filesystem blocks of the allocation group. All allocation
754 groups except the last one of the filesystem have the superblock's
755 .B agblocks
756 value here.
757 .TP
758 .B bnoroot
759 block number of the root of the Btree holding free space
760 information sorted by block number.
761 .TP
762 .B cntroot
763 block number of the root of the Btree holding free space
764 information sorted by block count.
765 .TP
766 .B bnolevel
767 number of levels in the by-block-number Btree.
768 .TP
769 .B cntlevel
770 number of levels in the by-block-count Btree.
771 .TP
772 .B flfirst
773 index into the AGFL block of the first active entry.
774 .TP
775 .B fllast
776 index into the AGFL block of the last active entry.
777 .TP
778 .B flcount
779 count of active entries in the AGFL block.
780 .TP
781 .B freeblks
782 count of blocks represented in the freespace Btrees.
783 .TP
784 .B longest
785 longest free space represented in the freespace Btrees.
786 .TP
787 .B btreeblks
788 number of blocks held in the AGF Btrees.
789 .PD
790 .RE
791 .TP
792 .B agf
793 The AGFL block contains block numbers for use of the block allocator;
794 it is in the fourth 512-byte block of each allocation group.
795 Each entry in the active list is a block number within the allocation group
796 that can be used for any purpose if space runs low.
797 The AGF block fields
798 .BR flfirst ", " fllast ", and " flcount
799 designate which entries are currently active.
800 Entry space is allocated in a circular manner within the AGFL block.
801 Fields defined:
802 .RS 1.4i
803 .PD 0
804 .TP 1.2i
805 .B bno
806 array of all block numbers. Even those which are not active are printed.
807 .PD
808 .RE
809 .TP
810 .B agi
811 The AGI block is the header for inode allocation information;
812 it is in the third 512-byte block of each allocation group.
813 Fields defined:
814 .RS 1.4i
815 .PD 0
816 .TP 1.2i
817 .B magicnum
818 AGI block magic number, 0x58414749 ('XAGI').
819 .TP
820 .B versionnum
821 version number, currently 1.
822 .TP
823 .B seqno
824 sequence number starting from 0.
825 .TP
826 .B length
827 size in filesystem blocks of the allocation group.
828 .TP
829 .B count
830 count of inodes allocated.
831 .TP
832 .B root
833 block number of the root of the Btree holding inode allocation information.
834 .TP
835 .B level
836 number of levels in the inode allocation Btree.
837 .TP
838 .B freecount
839 count of allocated inodes that are not in use.
840 .TP
841 .B newino
842 last inode number allocated.
843 .TP
844 .B dirino
845 unused.
846 .TP
847 .B unlinked
848 an array of inode numbers within the allocation group. The entries
849 in the AGI block are the heads of lists which run through the inode
850 .B next_unlinked
851 field. These inodes are to be unlinked the next time the filesystem is mounted.
852 .PD
853 .RE
854 .TP
855 .B attr
856 An attribute fork is organized as a Btree with the actual data embedded
857 in the leaf blocks. The root of the Btree is found in block 0 of the fork.
858 The index (sort order) of the Btree is the hash value of the attribute name.
859 All the blocks contain a
860 .B blkinfo
861 structure at the beginning, see type
862 .B dir
863 for a description. Nonleaf blocks are identical in format to those for
864 version 1 and version 2 directories, see type
865 .B dir
866 for a description. Leaf blocks can refer to "local" or "remote" attribute
867 values. Local values are stored directly in the leaf block.
868 Remote values are stored in an independent block in the attribute fork
869 (with no structure). Leaf blocks contain the following fields:
870 .RS 1.4i
871 .PD 0
872 .TP 1.2i
873 .B hdr
874 header containing a
875 .B blkinfo
876 structure
877 .B info
878 (magic number 0xfbee), a
879 .B count
880 of active entries,
881 .B usedbytes
882 total bytes of names and values, the
883 .B firstused
884 byte in the name area,
885 .B holes
886 set if the block needs compaction, and array
887 .B freemap
888 as for
889 .B dir
890 leaf blocks.
891 .TP
892 .B entries
893 array of structures containing a
894 .BR hashval ,
895 .B nameidx
896 (index into the block of the name), and flags
897 .BR incomplete ,
898 .BR root ,
899 and
900 .BR local .
901 .TP
902 .B nvlist
903 array of structures describing the attribute names and values. Fields
904 always present:
905 .B valuelen
906 (length of value in bytes),
907 .BR namelen ,
908 and
909 .BR name .
910 Fields present for local values:
911 .B value
912 (value string). Fields present for remote values:
913 .B valueblk
914 (fork block number of containing the value).
915 .PD
916 .RE
917 .TP
918 .B bmapbt
919 Files with many extents in their data or attribute fork will have the
920 extents described by the contents of a Btree for that fork,
921 instead of being stored directly in the inode.
922 Each bmap Btree starts with a root block contained within the inode.
923 The other levels of the Btree are stored in filesystem blocks.
924 The blocks are linked to sibling left and right blocks at each level,
925 as well as by pointers from parent to child blocks.
926 Each block contains the following fields:
927 .RS 1.4i
928 .PD 0
929 .TP 1.2i
930 .B magic
931 bmap Btree block magic number, 0x424d4150 ('BMAP').
932 .TP
933 .B level
934 level of this block above the leaf level.
935 .TP
936 .B numrecs
937 number of records or keys in the block.
938 .TP
939 .B leftsib
940 left (logically lower) sibling block, 0 if none.
941 .TP
942 .B rightsib
943 right (logically higher) sibling block, 0 if none.
944 .TP
945 .B recs
946 [leaf blocks only] array of extent records.
947 Each record contains
948 .BR startoff ,
949 .BR startblock ,
950 .BR blockcount ,
951 and
952 .B extentflag
953 (1 if the extent is unwritten).
954 .TP
955 .B keys
956 [nonleaf blocks only] array of key records. These are the first key
957 value of each block in the level below this one. Each record contains
958 .BR startoff .
959 .TP
960 .B ptrs
961 [nonleaf blocks only] array of child block pointers.
962 Each pointer is a filesystem block number to the next level in the Btree.
963 .PD
964 .RE
965 .TP
966 .B bnobt
967 There is one set of filesystem blocks forming the by-block-number
968 allocation Btree for each allocation group. The root block of this
969 Btree is designated by the
970 .B bnoroot
971 field in the coresponding AGF block.
972 The blocks are linked to sibling left and right blocks at each level,
973 as well as by pointers from parent to child blocks.
974 Each block has the following fields:
975 .RS 1.4i
976 .PD 0
977 .TP 1.2i
978 .B magic
979 BNOBT block magic number, 0x41425442 ('ABTB').
980 .TP
981 .B level
982 level number of this block, 0 is a leaf.
983 .TP
984 .B numrecs
985 number of data entries in the block.
986 .TP
987 .B leftsib
988 left (logically lower) sibling block, 0 if none.
989 .TP
990 .B rightsib
991 right (logically higher) sibling block, 0 if none.
992 .TP
993 .B recs
994 [leaf blocks only] array of freespace records. Each record contains
995 .B startblock
996 and
997 .BR blockcount .
998 .TP
999 .B keys
1000 [nonleaf blocks only] array of key records. These are the first value
1001 of each block in the level below this one. Each record contains
1002 .B startblock
1003 and
1004 .BR blockcount .
1005 .TP
1006 .B ptrs
1007 [nonleaf blocks only] array of child block pointers. Each pointer is a
1008 block number within the allocation group to the next level in the Btree.
1009 .PD
1010 .RE
1011 .TP
1012 .B cntbt
1013 There is one set of filesystem blocks forming the by-block-count
1014 allocation Btree for each allocation group. The root block of this
1015 Btree is designated by the
1016 .B cntroot
1017 field in the coresponding AGF block. The blocks are linked to sibling
1018 left and right blocks at each level, as well as by pointers from parent
1019 to child blocks. Each block has the following fields:
1020 .RS 1.4i
1021 .PD 0
1022 .TP 1.2i
1023 .B magic
1024 CNTBT block magic number, 0x41425443 ('ABTC').
1025 .TP
1026 .B level
1027 level number of this block, 0 is a leaf.
1028 .TP
1029 .B numrecs
1030 number of data entries in the block.
1031 .TP
1032 .B leftsib
1033 left (logically lower) sibling block, 0 if none.
1034 .TP
1035 .B rightsib
1036 right (logically higher) sibling block, 0 if none.
1037 .TP
1038 .B recs
1039 [leaf blocks only] array of freespace records. Each record contains
1040 .B startblock
1041 and
1042 .BR blockcount .
1043 .TP
1044 .B keys
1045 [nonleaf blocks only] array of key records. These are the first value
1046 of each block in the level below this one. Each record contains
1047 .B blockcount
1048 and
1049 .BR startblock .
1050 .TP
1051 .B ptrs
1052 [nonleaf blocks only] array of child block pointers. Each pointer is a
1053 block number within the allocation group to the next level in the Btree.
1054 .PD
1055 .RE
1056 .TP
1057 .B data
1058 User file blocks, and other blocks whose type is unknown, have this
1059 type for display purposes in
1060 .BR xfs_db .
1061 The block data is displayed in hexadecimal format.
1062 .TP
1063 .B dir
1064 A version 1 directory is organized as a Btree with the directory data
1065 embedded in the leaf blocks. The root of the Btree is found in block 0
1066 of the file. The index (sort order) of the Btree is the hash value of
1067 the entry name. All the blocks contain a
1068 .B blkinfo
1069 structure at the beginning with the following fields:
1070 .RS 1.4i
1071 .PD 0
1072 .TP 1.2i
1073 .B forw
1074 next sibling block.
1075 .TP
1076 .B back
1077 previous sibling block.
1078 .TP
1079 .B magic
1080 magic number for this block type.
1081 .RE
1082 .IP
1083
1084 The non-leaf (node) blocks have the following fields:
1085 .RS 1.4i
1086 .TP 1.2i
1087 .B hdr
1088 header containing a
1089 .B blkinfo
1090 structure
1091 .B info
1092 (magic number 0xfebe), the
1093 .B count
1094 of active entries, and the
1095 .B level
1096 of this block above the leaves.
1097 .TP
1098 .B btree
1099 array of entries containing
1100 .B hashval
1101 and
1102 .B before
1103 fields. The
1104 .B before
1105 value is a block number within the directory file to the child block, the
1106 .B hashval
1107 is the last hash value in that block.
1108 .RE
1109 .IP
1110
1111 The leaf blocks have the following fields:
1112 .RS 1.4i
1113 .TP 1.2i
1114 .B hdr
1115 header containing a
1116 .B blkinfo
1117 structure
1118 .B info
1119 (magic number 0xfeeb), the
1120 .B count
1121 of active entries,
1122 .B namebytes
1123 (total name string bytes),
1124 .B holes
1125 flag (block needs compaction), and
1126 .B freemap
1127 (array of
1128 .BR base ", " size
1129 entries for free regions).
1130 .TP
1131 .B entries
1132 array of structures containing
1133 .BR hashval ,
1134 .B nameidx
1135 (byte index into the block of the name string), and
1136 .BR namelen .
1137 .TP
1138 .B namelist
1139 array of structures containing
1140 .B inumber
1141 and
1142 .BR name .
1143 .RE
1144 .PD
1145 .TP
1146 .B dir2
1147 A version 2 directory has four kinds of blocks.
1148 Data blocks start at offset 0 in the file.
1149 There are two kinds of data blocks: single-block directories have
1150 the leaf information embedded at the end of the block, data blocks
1151 in multi-block directories do not.
1152 Node and leaf blocks start at offset 32GiB (with either a single
1153 leaf block or the root node block).
1154 Freespace blocks start at offset 64GiB.
1155 The node and leaf blocks form a Btree, with references to the data
1156 in the data blocks.
1157 The freespace blocks form an index of longest free spaces within the
1158 data blocks.
1159 .IP
1160 A single-block directory block contains the following fields:
1161 .RS 1.4i
1162 .PD 0
1163 .TP 1.2i
1164 .B bhdr
1165 header containing
1166 .B magic
1167 number 0x58443242 ('XD2B') and an array
1168 .B bestfree
1169 of the longest 3 free spaces in the block
1170 .RB ( offset ", " length ).
1171 .TP
1172 .B bu
1173 array of union structures. Each element is either an entry or a freespace.
1174 For entries, there are the following fields:
1175 .BR inumber ,
1176 .BR namelen ,
1177 .BR name ,
1178 and
1179 .BR tag .
1180 For freespace, there are the following fields:
1181 .B freetag
1182 (0xffff),
1183 .BR length ,
1184 and
1185 .BR tag .
1186 The
1187 .B tag
1188 value is the byte offset in the block of the start of the entry it
1189 is contained in.
1190 .TP
1191 .B bleaf
1192 array of leaf entries containing
1193 .B hashval
1194 and
1195 .BR address .
1196 The
1197 .B address
1198 is a 64-bit word offset into the file.
1199 .TP
1200 .B btail
1201 tail structure containing the total
1202 .B count
1203 of leaf entries and
1204 .B stale
1205 count of unused leaf entries.
1206 .RE
1207 .IP
1208
1209 A data block contains the following fields:
1210 .RS 1.4i
1211 .TP 1.2i
1212 .B dhdr
1213 header containing
1214 .B magic
1215 number 0x58443244 ('XD2D') and an array
1216 .B bestfree
1217 of the longest 3 free spaces in the block
1218 .RB ( offset ", " length ).
1219 .TP
1220 .B du
1221 array of union structures as for
1222 .BR bu .
1223 .RE
1224 .IP
1225
1226 Leaf blocks have two possible forms. If the Btree consists of a single
1227 leaf then the freespace information is in the leaf block,
1228 otherwise it is in separate blocks and the root of the Btree is
1229 a node block. A leaf block contains the following fields:
1230 .RS 1.4i
1231 .TP 1.2i
1232 .B lhdr
1233 header containing a
1234 .B blkinfo
1235 structure
1236 .B info
1237 (magic number 0xd2f1 for the single leaf case, 0xd2ff for the true
1238 Btree case), the total
1239 .B count
1240 of leaf entries, and
1241 .B stale
1242 count of unused leaf entries.
1243 .TP
1244 .B lents
1245 leaf entries, as for
1246 .BR bleaf .
1247 .TP
1248 .B lbests
1249 [single leaf only] array of values which represent the longest freespace
1250 in each data block in the directory.
1251 .TP
1252 .B ltail
1253 [single leaf only] tail structure containing
1254 .B bestcount
1255 count of
1256 .BR lbests .
1257 .RE
1258 .IP
1259
1260 A node block is identical to that for types
1261 .B attr
1262 and
1263 .BR dir .
1264
1265 A freespace block contains the following fields:
1266 .RS 1.4i
1267 .TP 1.2i
1268 .B fhdr
1269 header containing
1270 .B magic
1271 number 0x58443246 ('XD2F'),
1272 .B firstdb
1273 first data block number covered by this freespace block,
1274 .B nvalid
1275 number of valid entries, and
1276 .B nused
1277 number of entries representing real data blocks.
1278 .TP
1279 .B fbests
1280 array of values as for
1281 .BR lbests .
1282 .PD
1283 .RE
1284 .TP
1285 .B dqblk
1286 The quota information is stored in files referred to by the superblock
1287 .B uquotino
1288 and
1289 .B pquotino
1290 fields. Each filesystem block in a quota file contains a constant number of
1291 quota entries. The quota entry size is currently 136 bytes, so with a 4KiB
1292 filesystem block size there are 30 quota entries per block. The
1293 .B dquot
1294 command is used to locate these entries in the filesystem.
1295 The file entries are indexed by the user or project identifier
1296 to determine the block and offset.
1297 Each quota entry has the following fields:
1298 .RS 1.4i
1299 .PD 0
1300 .TP 1.5i
1301 .B magic
1302 magic number, 0x4451 ('DQ').
1303 .TP
1304 .B version
1305 version number, currently 1.
1306 .TP
1307 .B flags
1308 flags, values include 0x01 for user quota, 0x02 for project quota.
1309 .TP
1310 .B id
1311 user or project identifier.
1312 .TP
1313 .B blk_hardlimit
1314 absolute limit on blocks in use.
1315 .TP
1316 .B blk_softlimit
1317 preferred limit on blocks in use.
1318 .TP
1319 .B ino_hardlimit
1320 absolute limit on inodes in use.
1321 .TP
1322 .B ino_softlimit
1323 preferred limit on inodes in use.
1324 .TP
1325 .B bcount
1326 blocks actually in use.
1327 .TP
1328 .B icount
1329 inodes actually in use.
1330 .TP
1331 .B itimer
1332 time when service will be refused if soft limit is violated for inodes.
1333 .TP
1334 .B btimer
1335 time when service will be refused if soft limit is violated for blocks.
1336 .TP
1337 .B iwarns
1338 number of warnings issued about inode limit violations.
1339 .TP
1340 .B bwarns
1341 number of warnings issued about block limit violations.
1342 .TP
1343 .B rtb_hardlimit
1344 absolute limit on realtime blocks in use.
1345 .TP
1346 .B rtb_softlimit
1347 preferred limit on realtime blocks in use.
1348 .TP
1349 .B rtbcount
1350 realtime blocks actually in use.
1351 .TP
1352 .B rtbtimer
1353 time when service will be refused if soft limit is violated for realtime blocks.
1354 .TP
1355 .B rtbwarns
1356 number of warnings issued about realtime block limit violations.
1357 .PD
1358 .RE
1359 .TP
1360 .B inobt
1361 There is one set of filesystem blocks forming the inode allocation Btree for
1362 each allocation group. The root block of this Btree is designated by the
1363 .B root
1364 field in the coresponding AGI block.
1365 The blocks are linked to sibling left and right blocks at each level,
1366 as well as by pointers from parent to child blocks.
1367 Each block has the following fields:
1368 .RS 1.4i
1369 .PD 0
1370 .TP 1.2i
1371 .B magic
1372 INOBT block magic number, 0x49414254 ('IABT').
1373 .TP
1374 .B level
1375 level number of this block, 0 is a leaf.
1376 .TP
1377 .B numrecs
1378 number of data entries in the block.
1379 .TP
1380 .B leftsib
1381 left (logically lower) sibling block, 0 if none.
1382 .TP
1383 .B rightsib
1384 right (logically higher) sibling block, 0 if none.
1385 .TP
1386 .B recs
1387 [leaf blocks only] array of inode records. Each record contains
1388 .B startino
1389 allocation-group relative inode number,
1390 .B freecount
1391 count of free inodes in this chunk, and
1392 .B free
1393 bitmap, LSB corresponds to inode 0.
1394 .TP
1395 .B keys
1396 [nonleaf blocks only] array of key records. These are the first value of each
1397 block in the level below this one. Each record contains
1398 .BR startino .
1399 .TP
1400 .B ptrs
1401 [nonleaf blocks only] array of child block pointers. Each pointer is a
1402 block number within the allocation group to the next level in the Btree.
1403 .PD
1404 .RE
1405 .TP
1406 .B inode
1407 Inodes are allocated in "chunks" of 64 inodes each. Usually a chunk is
1408 multiple filesystem blocks, although there are cases with large filesystem
1409 blocks where a chunk is less than one block. The inode Btree (see
1410 .B inobt
1411 above) refers to the inode numbers per allocation group. The inode numbers
1412 directly reflect the location of the inode block on disk. Use the
1413 .B inode
1414 command to point
1415 .B xfs_db
1416 to a specific inode. Each inode contains four regions:
1417 .BR core ,
1418 .BR next_unlinked ,
1419 .BR u ", and "
1420 .BR a .
1421 .B core
1422 contains the fixed information.
1423 .B next_unlinked
1424 is separated from the core due to journaling considerations, see type
1425 .B agi
1426 field
1427 .BR unlinked .
1428 .B u
1429 is a union structure that is different in size and format depending
1430 on the type and representation of the file data ("data fork").
1431 .B a
1432 is an optional union structure to describe attribute data,
1433 that is different in size, format, and location depending on the presence
1434 and representation of attribute data, and the size of the
1435 .B u
1436 data ("attribute fork").
1437 .B xfs_db
1438 automatically selects the proper union members based on information
1439 in the inode.
1440 .IP
1441 The following are fields in the inode core:
1442 .RS 1.4i
1443 .PD 0
1444 .TP 1.2i
1445 .B magic
1446 inode magic number, 0x494e ('IN').
1447 .TP
1448 .B mode
1449 mode and type of file, as described in
1450 .BR chmod (2),
1451 .BR mknod (2),
1452 and
1453 .BR stat (2).
1454 .TP
1455 .B version
1456 inode version, 1 or 2.
1457 .TP
1458 .B format
1459 format of
1460 .B u
1461 union data (0: xfs_dev_t, 1: local file \- in-inode directory or symlink,
1462 2: extent list, 3: Btree root, 4: unique id [unused]).
1463 .TP
1464 .B nlinkv1
1465 number of links to the file in a version 1 inode.
1466 .TP
1467 .B nlinkv2
1468 number of links to the file in a version 2 inode.
1469 .TP
1470 .B projid
1471 owner's project id (version 2 inode only).
1472 .TP
1473 .B uid
1474 owner's user id.
1475 .TP
1476 .B gid
1477 owner's group id.
1478 .TP
1479 .B atime
1480 time last accessed (seconds and nanoseconds).
1481 .TP
1482 .B mtime
1483 time last modified.
1484 .TP
1485 .B ctime
1486 time created or inode last modified.
1487 .TP
1488 .B size
1489 number of bytes in the file.
1490 .TP
1491 .B nblocks
1492 total number of blocks in the file including indirect and attribute.
1493 .TP
1494 .B extsize
1495 basic/minimum extent size for the file.
1496 .TP
1497 .B nextents
1498 number of extents in the data fork.
1499 .TP
1500 .B naextents
1501 number of extents in the attribute fork.
1502 .TP
1503 .B forkoff
1504 attribute fork offset in the inode, in 64-bit words from the start of
1505 .BR u .
1506 .TP
1507 .B aformat
1508 format of
1509 .B a
1510 data (1: local attribute data, 2: extent list, 3: Btree root).
1511 .TP
1512 .B dmevmask
1513 DMAPI event mask.
1514 .TP
1515 .B dmstate
1516 DMAPI state information.
1517 .TP
1518 .B newrtbm
1519 file is the realtime bitmap and is "new" format.
1520 .TP
1521 .B prealloc
1522 file has preallocated data space after EOF.
1523 .TP
1524 .B realtime
1525 file data is in the realtime subvolume.
1526 .TP
1527 .B gen
1528 inode generation number.
1529 .RE
1530 .IP
1531
1532 The following fields are in the
1533 .B u
1534 data fork union:
1535 .RS 1.4i
1536 .TP 1.2i
1537 .B bmbt
1538 bmap Btree root. This looks like a
1539 .B bmapbtd
1540 block with redundant information removed.
1541 .TP
1542 .B bmx
1543 array of extent descriptors.
1544 .TP
1545 .B dev
1546 dev_t for the block or character device.
1547 .TP
1548 .B sfdir
1549 shortform (in-inode) version 1 directory. This consists of a
1550 .B hdr
1551 containing the
1552 .B parent
1553 inode number and a
1554 .B count
1555 of active entries in the directory, followed by an array
1556 .B list
1557 of
1558 .B hdr.count
1559 entries. Each such entry contains
1560 .BR inumber ,
1561 .BR namelen ,
1562 and
1563 .B name
1564 string.
1565 .TP
1566 .B sfdir2
1567 shortform (in-inode) version 2 directory. This consists of a
1568 .B hdr
1569 containing a
1570 .B count
1571 of active entries in the directory, an
1572 .B i8count
1573 of entries with inumbers that don't fit in a 32-bit value, and the
1574 .B parent
1575 inode number, followed by an array
1576 .B list
1577 of
1578 .B hdr.count
1579 entries. Each such entry contains
1580 .BR namelen ,
1581 a saved
1582 .B offset
1583 used when the directory is converted to a larger form, a
1584 .B name
1585 string, and the
1586 .BR inumber .
1587 .TP
1588 .B symlink
1589 symbolic link string value.
1590 .RE
1591 .IP
1592
1593 The following fields are in the
1594 .B a
1595 attribute fork union if it exists:
1596 .RS 1.4i
1597 .TP 1.2i
1598 .B bmbt
1599 bmap Btree root, as above.
1600 .TP
1601 .B bmx
1602 array of extent descriptors.
1603 .TP
1604 .B sfattr
1605 shortform (in-inode) attribute values. This consists of a
1606 .B hdr
1607 containing a
1608 .B totsize
1609 (total size in bytes) and a
1610 .B count
1611 of active entries, followed by an array
1612 .B list
1613 of
1614 .B hdr.count
1615 entries. Each such entry contains
1616 .BR namelen ,
1617 .BR valuelen ,
1618 .BR root
1619 flag,
1620 .BR name ,
1621 and
1622 .BR value .
1623 .PD
1624 .RE
1625 .TP
1626 .B log
1627 Log blocks contain the journal entries for XFS.
1628 It's not useful to examine these with
1629 .BR xfs_db ,
1630 use
1631 .BR xfs_logprint (8)
1632 instead.
1633 .TP
1634 .B rtbitmap
1635 If the filesystem has a realtime subvolume, then the
1636 .B rbmino
1637 field in the superblock refers to a file that contains the realtime bitmap.
1638 Each bit in the bitmap file controls the allocation of a single realtime extent
1639 (set == free). The bitmap is processed in 32-bit words, the LSB of a word is
1640 used for the first extent controlled by that bitmap word. The
1641 .B atime
1642 field of the realtime bitmap inode contains a counter
1643 that is used to control where the next new realtime file will start.
1644 .TP
1645 .B rtsummary
1646 If the filesystem has a realtime subvolume, then the
1647 .B rsumino
1648 field in the superblock refers to a file that contains the realtime summary
1649 data. The summary file contains a two-dimensional array of 16-bit values.
1650 Each value counts the number of free extent runs
1651 (consecutive free realtime extents)
1652 of a given range of sizes that starts in a given bitmap block.
1653 The size ranges are binary buckets (low size in the bucket is a power of 2).
1654 There are as many size ranges as are necessary given the size of the
1655 realtime subvolume.
1656 The first dimension is the size range,
1657 the second dimension is the starting bitmap block number
1658 (adjacent entries are for the same size, adjacent bitmap blocks).
1659 .TP
1660 .B sb
1661 There is one sb (superblock) structure per allocation group.
1662 It is the first disk block in the allocation group.
1663 Only the first one (block 0 of the filesystem) is actually used;
1664 the other blocks are redundant information for
1665 .BR xfs_repair (8)
1666 to use if the first superblock is damaged. Fields defined:
1667 .RS 1.4i
1668 .PD 0
1669 .TP 1.2i
1670 .B magicnum
1671 superblock magic number, 0x58465342 ('XFSB').
1672 .TP
1673 .B blocksize
1674 filesystem block size in bytes.
1675 .TP
1676 .B dblocks
1677 number of filesystem blocks present in the data subvolume.
1678 .TP
1679 .B rblocks
1680 number of filesystem blocks present in the realtime subvolume.
1681 .TP
1682 .B rextents
1683 number of realtime extents that
1684 .B rblocks
1685 contain.
1686 .TP
1687 .B uuid
1688 unique identifier of the filesystem.
1689 .TP
1690 .B logstart
1691 starting filesystem block number of the log (journal).
1692 If this value is 0 the log is "external".
1693 .TP
1694 .B rootino
1695 root inode number.
1696 .TP
1697 .B rbmino
1698 realtime bitmap inode number.
1699 .TP
1700 .B rsumino
1701 realtime summary data inode number.
1702 .TP
1703 .B rextsize
1704 realtime extent size in filesystem blocks.
1705 .TP
1706 .B agblocks
1707 size of an allocation group in filesystem blocks.
1708 .TP
1709 .B agcount
1710 number of allocation groups.
1711 .TP
1712 .B rbmblocks
1713 number of realtime bitmap blocks.
1714 .TP
1715 .B logblocks
1716 number of log blocks (filesystem blocks).
1717 .TP
1718 .B versionnum
1719 filesystem version information.
1720 This value is currently 1, 2, 3, or 4 in the low 4 bits.
1721 If the low bits are 4 then the other bits have additional meanings.
1722 1 is the original value.
1723 2 means that attributes were used.
1724 3 means that version 2 inodes (large link counts) were used.
1725 4 is the bitmask version of the version number.
1726 In this case, the other bits are used as flags
1727 (0x0010: attributes were used,
1728 0x0020: version 2 inodes were used,
1729 0x0040: quotas were used,
1730 0x0080: inode cluster alignment is in force,
1731 0x0100: data stripe alignment is in force,
1732 0x0200: the
1733 .B shared_vn
1734 field is used,
1735 0x1000: unwritten extent tracking is on,
1736 0x2000: version 2 directories are in use).
1737 .TP
1738 .B sectsize
1739 sector size in bytes, currently always 512.
1740 This is the size of the superblock and the other header blocks.
1741 .TP
1742 .B inodesize
1743 inode size in bytes.
1744 .TP
1745 .B inopblock
1746 number of inodes per filesystem block.
1747 .TP
1748 .B fname
1749 obsolete, filesystem name.
1750 .TP
1751 .B fpack
1752 obsolete, filesystem pack name.
1753 .TP
1754 .B blocklog
1755 log2 of
1756 .BR blocksize .
1757 .TP
1758 .B sectlog
1759 log2 of
1760 .BR sectsize .
1761 .TP
1762 .B inodelog
1763 log2 of
1764 .BR inodesize .
1765 .TP
1766 .B inopblog
1767 log2 of
1768 .BR inopblock .
1769 .TP
1770 .B agblklog
1771 log2 of
1772 .B agblocks
1773 (rounded up).
1774 .TP
1775 .B rextslog
1776 log2 of
1777 .BR rextents .
1778 .TP
1779 .B inprogress
1780 .BR mkfs.xfs (8)
1781 or
1782 .BR xfs_copy (8)
1783 aborted before completing this filesystem.
1784 .TP
1785 .B imax_pct
1786 maximum percentage of filesystem space used for inode blocks.
1787 .TP
1788 .B icount
1789 number of allocated inodes.
1790 .TP
1791 .B ifree
1792 number of allocated inodes that are not in use.
1793 .TP
1794 .B fdblocks
1795 number of free data blocks.
1796 .TP
1797 .B frextents
1798 number of free realtime extents.
1799 .TP
1800 .B uquotino
1801 user quota inode number.
1802 .TP
1803 .B pquotino
1804 project quota inode number; this is currently unused.
1805 .TP
1806 .B qflags
1807 quota status flags
1808 (0x01: user quota accounting is on,
1809 0x02: user quota limits are enforced,
1810 0x04: quotacheck has been run on user quotas,
1811 0x08: project quota accounting is on,
1812 0x10: project quota limits are enforced,
1813 0x20: quotacheck has been run on project quotas).
1814 .TP
1815 .B flags
1816 random flags. 0x01: only read-only mounts are allowed.
1817 .TP
1818 .B shared_vn
1819 shared version number (shared readonly filesystems).
1820 .TP
1821 .B inoalignmt
1822 inode chunk alignment in filesystem blocks.
1823 .TP
1824 .B unit
1825 stripe or RAID unit.
1826 .TP
1827 .B width
1828 stripe or RAID width.
1829 .TP
1830 .B dirblklog
1831 log2 of directory block size (filesystem blocks).
1832 .PD
1833 .RE
1834 .TP
1835 .B symlink
1836 Symbolic link blocks are used only when the symbolic link value does
1837 not fit inside the inode. The block content is just the string value.
1838 Bytes past the logical end of the symbolic link value have arbitrary values.
1839 .TP
1840 .B text
1841 User file blocks, and other blocks whose type is unknown,
1842 have this type for display purposes in
1843 .BR xfs_db .
1844 The block data is displayed in two columns: Hexadecimal format
1845 and printable ASCII chars.
1846 .SH DIAGNOSTICS
1847 Many messages can come from the
1848 .B check
1849 .RB ( blockget )
1850 command; these are documented in
1851 .BR xfs_check (8).
1852 .SH SEE ALSO
1853 .BR mkfs.xfs (8),
1854 .BR xfs_admin (8),
1855 .BR xfs_check (8),
1856 .BR xfs_copy (8),
1857 .BR xfs_logprint (8),
1858 .BR xfs_metadump (8),
1859 .BR xfs_ncheck (8),
1860 .BR xfs_repair (8),
1861 .BR mount (8),
1862 .BR chmod (2),
1863 .BR mknod (2),
1864 .BR stat (2),
1865 .BR xfs (5).