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 /cmd | |
parent | ba8fd9042ad4a5da3f5d2e3db6350793666ea403 (diff) |
btrfs: Subvolume: Use LookupTreeRoot
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/btrfs-rec/inspect/lsfiles/lsfiles.go | 3 | ||||
-rw-r--r-- | cmd/btrfs-rec/inspect/mount/mount.go | 1 | ||||
-rw-r--r-- | cmd/btrfs-rec/inspect_lsfiles.go | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/cmd/btrfs-rec/inspect/lsfiles/lsfiles.go b/cmd/btrfs-rec/inspect/lsfiles/lsfiles.go index a713b8a..e42050f 100644 --- a/cmd/btrfs-rec/inspect/lsfiles/lsfiles.go +++ b/cmd/btrfs-rec/inspect/lsfiles/lsfiles.go @@ -8,6 +8,7 @@ package lsfiles import ( + "context" "errors" "fmt" "io" @@ -27,6 +28,7 @@ import ( ) func LsFiles( + ctx context.Context, out io.Writer, fs interface { btrfstree.TreeOperator @@ -42,6 +44,7 @@ func LsFiles( }() printSubvol(out, "", true, "/", btrfs.NewSubvolume( + ctx, fs, btrfsprim.FS_TREE_OBJECTID, false, diff --git a/cmd/btrfs-rec/inspect/mount/mount.go b/cmd/btrfs-rec/inspect/mount/mount.go index 4049393..d4d2e0a 100644 --- a/cmd/btrfs-rec/inspect/mount/mount.go +++ b/cmd/btrfs-rec/inspect/mount/mount.go @@ -53,6 +53,7 @@ func MountRO(ctx context.Context, fs *btrfs.FS, mountpoint string, noChecksums b rootSubvol := &subvolume{ Subvolume: btrfs.NewSubvolume( + ctx, btrfsutil.NewOldRebuiltForrest(ctx, fs), btrfsprim.FS_TREE_OBJECTID, noChecksums, diff --git a/cmd/btrfs-rec/inspect_lsfiles.go b/cmd/btrfs-rec/inspect_lsfiles.go index 04b5ec5..00a4873 100644 --- a/cmd/btrfs-rec/inspect_lsfiles.go +++ b/cmd/btrfs-rec/inspect_lsfiles.go @@ -30,6 +30,7 @@ func init() { }() return lsfiles.LsFiles( + cmd.Context(), out, btrfsutil.NewOldRebuiltForrest(cmd.Context(), fs)) }), |