I just found something really strange, it seems pointers for extent
tree and csum tree have somehow gotten swapped...

$ btrfs inspect dump-super -f /dev/sda | grep backup_extent_root
backup_extent_root:     21056867106816  gen: 2262737    level: 3
backup_extent_root:     21056867762176  gen: 2262738    level: 3
backup_extent_root:     21057133690880  gen: 2262740    level: 3 <<
points to CSUM_TREE
backup_extent_root:     21056854228992  gen: 2262736    level: 3

$ btrfs inspect dump-super -f /dev/sda | grep backup_csum_root
backup_csum_root:       21056868122624  gen: 2262737    level: 3
backup_csum_root:       21056944685056  gen: 2262738    level: 3
backup_csum_root:       21057139916800  gen: 2262740    level: 3 <<
points to EXTENT_TREE
backup_csum_root:       21056857341952  gen: 2262736    level: 3

$ btrfs inspect dump-tree -b 21057133690880 /dev/sda | head -n 2
btrfs-progs v5.10.1
node 21057133690880 level 1 items 316 free space 177 generation
2262698 owner CSUM_TREE

$ btrfs inspect dump-tree -b 21057139916800 /dev/sda | head -n 2
btrfs-progs v5.10.1
leaf 21057139916800 items 166 free space 6367 generation 2262696 owner
EXTENT_TREE


Previous gen is fine

$ btrfs inspect dump-tree -b 21056867762176 /dev/sda | head -n 2
btrfs-progs v5.10.1
node 21056867762176 level 3 items 2 free space 491 generation 2262738
owner EXTENT_TREE

$ btrfs inspect dump-tree -b 21056944685056 /dev/sda | head -n 2
btrfs-progs v5.10.1
node 21056944685056 level 3 items 5 free space 488 generation 2262738
owner CSUM_TREE

Also generation specified in backup root doesn't match with one in
block so seems like latest gen wasn't written to disk or something
like that.

In root tree there is different extent tree used than one specified in
backup root.
$ btrfs inspect dump-tree -b 21057011679232 /dev/sda | head -n 6
btrfs-progs v5.10.1
node 21057011679232 level 1 items 126 free space 367 generation
2262739 owner ROOT_TREE
node 21057011679232 flags 0x1(WRITTEN) backref revision 1
fs uuid 8aef11a9-beb6-49ea-9b2d-7876611a39e5
chunk uuid 4ffec48c-28ed-419d-ba87-229c0adb2ab9
key (EXTENT_TREE ROOT_ITEM 0) block 21057018363904 gen 2262739

Reply via email to