diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-05 11:18:11 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-13 13:18:40 -0600 |
commit | 05456e5ffe328c975529645f8e1588ef89f49da0 (patch) | |
tree | 4306edfe012ed0e38c0d0f862932349e137091ee /cmd/btrfs-rec | |
parent | f37ad3c90dab9b77e7c2796e963f5992458ad4a4 (diff) |
btrfsutil: RebuiltForrest: Simplify by taking a btrfs.ReadableFS
Diffstat (limited to 'cmd/btrfs-rec')
-rw-r--r-- | cmd/btrfs-rec/inspect/rebuildtrees/rebuild.go | 2 | ||||
-rw-r--r-- | cmd/btrfs-rec/inspect/rebuildtrees/scan.go | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/cmd/btrfs-rec/inspect/rebuildtrees/rebuild.go b/cmd/btrfs-rec/inspect/rebuildtrees/rebuild.go index e6345ae..4787dbf 100644 --- a/cmd/btrfs-rec/inspect/rebuildtrees/rebuild.go +++ b/cmd/btrfs-rec/inspect/rebuildtrees/rebuild.go @@ -85,7 +85,7 @@ func NewRebuilder(ctx context.Context, fs *btrfs.FS, nodeList []btrfsvol.Logical o := &rebuilder{ scan: scanData, } - o.rebuilt = btrfsutil.NewRebuiltForrest(fs, scanData.Superblock, scanData.Graph, forrestCallbacks{o}) + o.rebuilt = btrfsutil.NewRebuiltForrest(fs, scanData.Graph, forrestCallbacks{o}) return o, nil } diff --git a/cmd/btrfs-rec/inspect/rebuildtrees/scan.go b/cmd/btrfs-rec/inspect/rebuildtrees/scan.go index b1469ff..7518896 100644 --- a/cmd/btrfs-rec/inspect/rebuildtrees/scan.go +++ b/cmd/btrfs-rec/inspect/rebuildtrees/scan.go @@ -32,8 +32,6 @@ type FlagsAndErr struct { } type ScanDevicesResult struct { - Superblock btrfstree.Superblock - Graph btrfsutil.Graph Flags map[btrfsutil.ItemPtr]FlagsAndErr // INODE_ITEM @@ -53,8 +51,6 @@ func ScanDevices(_ctx context.Context, fs *btrfs.FS, nodeList []btrfsvol.Logical // read-roots ////////////////////////////////////////////////////////////////// ctx = dlog.WithField(_ctx, "btrfs.inspect.rebuild-trees.read.substep", "read-roots") ret := ScanDevicesResult{ - Superblock: *sb, - Graph: btrfsutil.NewGraph(ctx, *sb), Flags: make(map[btrfsutil.ItemPtr]FlagsAndErr), Names: make(map[btrfsutil.ItemPtr][]byte), |