From bbabc9ab42accbd37072735419cc0552dc8917ee Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 20 Mar 2023 12:29:20 -0400 Subject: btrfs: Subvolume: Use LookupTreeRoot --- lib/btrfs/btrfstree/btree_forrest.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/btrfs/btrfstree') diff --git a/lib/btrfs/btrfstree/btree_forrest.go b/lib/btrfs/btrfstree/btree_forrest.go index 197edc2..38a2721 100644 --- a/lib/btrfs/btrfstree/btree_forrest.go +++ b/lib/btrfs/btrfstree/btree_forrest.go @@ -21,6 +21,8 @@ type TreeRoot struct { RootNode btrfsvol.LogicalAddr Level uint8 Generation btrfsprim.Generation + + RootInode btrfsprim.ObjID // only for subvolume trees } // LookupTreeRoot is a utility function to help with implementing the @@ -70,6 +72,7 @@ func LookupTreeRoot(_ context.Context, fs TreeOperator, sb Superblock, treeID bt RootNode: rootItemBody.ByteNr, Level: rootItemBody.Level, Generation: rootItemBody.Generation, + RootInode: rootItemBody.RootDirID, }, nil case *btrfsitem.Error: return nil, fmt.Errorf("malformed ROOT_ITEM for tree %v: %w", treeID, rootItemBody.Err) -- cgit v1.2.3-2-g168b