btrfs-progs/Documentation
David Sterba 9f6c055e38 btrfs-progs: dump-tree: add options to dump checksums
Add new options to dumps checksums in node headers and in the checksum
items:

  $ btrfs inspect dump-tree --csum-headers image
  root tree
  leaf 471515136 items 19 free space 12186 generation 15 owner ROOT_TREE
  leaf 471515136 flags 0x1(WRITTEN) backref revision 1 csum 0x756b2d54
  fs uuid df0348df-5773-47dd-81e9-a18221461239

For nodes/leaves it's appended on the 2nd line of the header.

Checksum items are stored in leaves as EXTENT_CSUM key type, with offset
value as the logical offset starting. As the array would be hard to
parse or match, each offset value is printed with the checksum. For
crc32c it's 4 values on a line, for xxhash it's 2 and for the long
256bit checksums it's one checksum per line.

  $ btrfs inspect dump-tree --csum-items image
  leaf 5423104 items 1 free space 30 generation 6 owner CSUM_TREE
  leaf 5423104 flags 0x1(WRITTEN) backref revision 1
  fs uuid bd7c981e-16ff-4081-a734-3ef5d50cafc1
  chunk uuid 13f4c76c-7845-4984-88ed-f01b52e05cf8
	  item 0 key (EXTENT_CSUM EXTENT_CSUM 22020096) itemoff 55 itemsize 16228
		  range start 22020096 end 38637568 length 16617472
		  [22020096] 0x8941f998 [22024192] 0x8941f998 [22028288] 0x8941f998 [22032384] 0x8941f998
		  [22036480] 0x8941f998 [22040576] 0x8941f998 [22044672] 0x8941f998 [22048768] 0x8941f998
		  ...

  $ btrfs inspect dump-tree --csum-items image
  leaf 5718016 items 1 free space 7746 generation 6 owner CSUM_TREE
  leaf 5718016 flags 0x1(WRITTEN) backref revision 1
  fs uuid f453a5b4-8b4a-4fbf-90a2-2925e4fe2335
  chunk uuid eb1da63b-248b-44c2-82da-71b2564bf50e
	  item 0 key (EXTENT_CSUM EXTENT_CSUM 52387840) itemoff 7771 itemsize 8512
		  range start 52387840 end 53477376 length 1089536
		  [52387840] 0x686ede9288c391e7e05026e56f2f91bfd879987a040ea98445dabc76f55b8e5f
		  [52391936] 0x686ede9288c391e7e05026e56f2f91bfd879987a040ea98445dabc76f55b8e5f
		  ...

The options are not on by default, the header checksum is not important
for the structures. Data checksums can be quite big so that would make
the dump long and without any actual data to match against.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-06-19 22:07:49 +02:00
..
asciidoc.conf btrfs-progs: docs: fix rendering of exponents in manual pages 2018-11-20 11:16:02 +01:00
btrfs-balance.asciidoc btrfs-progs: docs: add raid1c34 profiles to balance convert 2021-03-04 21:14:41 +01:00
btrfs-check.asciidoc btrfs-progs: docs: grammar and typo fix for btrfs check 2021-01-18 17:49:23 +01:00
btrfs-convert.asciidoc btrfs-progs: docs: change wording about required fsck 2021-03-23 17:04:22 +01:00
btrfs-device.asciidoc btrfs-progs: add enqueue parameter for exclusive ops 2020-12-16 17:08:12 +01:00
btrfs-filesystem.asciidoc btrfs-progs: add enqueue parameter for exclusive ops 2020-12-16 17:08:12 +01:00
btrfs-find-root.asciidoc btrfs-progs: docs: annual typo, clarity, & grammar review & fixups 2018-01-03 17:29:19 +01:00
btrfs-image.asciidoc
btrfs-inspect-internal.asciidoc btrfs-progs: dump-tree: add options to dump checksums 2021-06-19 22:07:49 +02:00
btrfs-ioctl.asciidoc btrfs-progs: docs: add more general ioctl description 2021-03-24 22:20:19 +01:00
btrfs-man5.asciidoc btrfs-prog: docs: add recent new mount options and features 2021-05-08 00:58:51 +02:00
btrfs-map-logical.asciidoc btrfs-progs: docs: annual typo, clarity, & grammar review & fixups 2018-01-03 17:29:19 +01:00
btrfs-property.asciidoc btrfs-progs: docs: fix label property description 2019-09-04 16:06:36 +02:00
btrfs-qgroup.asciidoc btrfs-progs: docs: add qgroup examples 2020-10-02 20:12:09 +02:00
btrfs-quota.asciidoc btrfs-progs: docs: annual typo, clarity, & grammar review & fixups 2018-01-03 17:29:19 +01:00
btrfs-receive.asciidoc btrfs-progs: deprecate subcommand specific verbose/quiet options 2020-06-29 17:45:40 +02:00
btrfs-replace.asciidoc btrfs-progs: add enqueue parameter for exclusive ops 2020-12-16 17:08:12 +01:00
btrfs-rescue.asciidoc btrfs-progs: deprecate subcommand specific verbose/quiet options 2020-06-29 17:45:40 +02:00
btrfs-restore.asciidoc btrfs-progs: deprecate subcommand specific verbose/quiet options 2020-06-29 17:45:40 +02:00
btrfs-scrub.asciidoc btrfs-progs: docs: clarify scrub requiring mounted filesystem 2021-01-29 15:12:34 +01:00
btrfs-select-super.asciidoc btrfs-progs: Remove deprecated btrfs-show-super 2018-04-24 13:00:10 +02:00
btrfs-send.asciidoc btrfs-progs: deprecate subcommand specific verbose/quiet options 2020-06-29 17:45:40 +02:00
btrfs-subvolume.asciidoc btrfs-progs: doc: snapshot -r and -i can be used together 2021-02-19 20:14:35 +01:00
btrfs.asciidoc btrfs-progs: document the new all-in-one binary 2019-07-04 15:36:00 +02:00
btrfsck.8 btrfs-progs: docs: use manual page link instead of symlink 2018-10-23 14:48:39 +02:00
btrfstune.asciidoc btrfs-progs: docs: add section about seeding device 2021-03-01 16:47:15 +01:00
CmdLineConventions btrfs-progs: docs: document command line conventions 2021-01-18 20:53:23 +01:00
CodingConventions btrfs-progs: docs: document conventions 2017-07-03 13:35:10 +02:00
DocConventions.asciidoc btrfs-progs: docs: update conventions 2020-06-09 22:19:09 +02:00
fsck.btrfs.asciidoc btrfs-progs: docs: fix minor typos 2020-03-03 19:58:55 +01:00
Makefile.in btrfs-progs: docs: Don't erase XMLTO_EXTRA contents, fix docbook5 build 2020-01-09 14:28:52 +01:00
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
mkfs.btrfs.asciidoc btrfs-progs: docs: add section about raid56 2021-03-04 21:14:41 +01:00
ReleaseChecklist btrfs-progs: Update README and other docs 2016-11-23 11:07:05 +01:00