From 5520c20c493d52d83288bc2e321117006e38fd1a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 22 Mar 2023 21:28:59 -0400 Subject: btrfsutil: RebuiltTree: Allow nodes with .Gen == .ParentGen --- lib/btrfs/btrfsitem/item_root.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/btrfs') diff --git a/lib/btrfs/btrfsitem/item_root.go b/lib/btrfs/btrfsitem/item_root.go index 4ffad9a..8bdc3df 100644 --- a/lib/btrfs/btrfsitem/item_root.go +++ b/lib/btrfs/btrfsitem/item_root.go @@ -22,6 +22,11 @@ import ( // key.offset = one of: // - 0 if objectid is one of the BTRFS_*_TREE_OBJECTID defines or a non-snapshot volume; or // - transaction_id of when this snapshot was created +// +// This tree might contain nodes with node.Head.Owner set to the +// root.ParentUUID tree, *if* the node.Head.Generation is +// less-than-or-equal-to the root's key.offset. The "or-equal-to" +// part of that might be surprising, which is why I called it out. type Root struct { // trivial ROOT_ITEM=132 Inode Inode `bin:"off=0x000, siz=0xa0"` // ??? Generation btrfsprim.Generation `bin:"off=0x0a0, siz=0x08"` -- cgit v1.2.3-2-g168b