diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-20 12:29:20 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-23 18:24:47 -0600 |
commit | bbabc9ab42accbd37072735419cc0552dc8917ee (patch) | |
tree | c4c5cb71e673d4f8a194013ce31123f98d52a20c /lib/btrfs/btrfstree/btree_forrest.go | |
parent | ba8fd9042ad4a5da3f5d2e3db6350793666ea403 (diff) |
btrfs: Subvolume: Use LookupTreeRoot
Diffstat (limited to 'lib/btrfs/btrfstree/btree_forrest.go')
-rw-r--r-- | lib/btrfs/btrfstree/btree_forrest.go | 3 |
1 files changed, 3 insertions, 0 deletions
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) |