summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfsitem
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-22 21:28:59 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-23 18:35:19 -0600
commit5520c20c493d52d83288bc2e321117006e38fd1a (patch)
tree7018dad5481473878808a3159381deca74150b7b /lib/btrfs/btrfsitem
parentbbabc9ab42accbd37072735419cc0552dc8917ee (diff)
btrfsutil: RebuiltTree: Allow nodes with .Gen == .ParentGen
Diffstat (limited to 'lib/btrfs/btrfsitem')
-rw-r--r--lib/btrfs/btrfsitem/item_root.go5
1 files changed, 5 insertions, 0 deletions
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"`