diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-08-09 16:01:20 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-08-17 22:50:57 -0600 |
commit | 286db83409b56de7b0ac3a74709018c01de43f44 (patch) | |
tree | 147229cdaebb3fa8681bc6e07e3cce6fd40300ae /lib/btrfsprogs/btrfsinspect/rebuildmappings/blockgroups.go | |
parent | 51659255af92e050ce0d2bca65629512a833eae4 (diff) |
cli: wip: Rethink the "scan" CLI commands
Diffstat (limited to 'lib/btrfsprogs/btrfsinspect/rebuildmappings/blockgroups.go')
-rw-r--r-- | lib/btrfsprogs/btrfsinspect/rebuildmappings/blockgroups.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildmappings/blockgroups.go b/lib/btrfsprogs/btrfsinspect/rebuildmappings/blockgroups.go index 2621c44..a98bf3f 100644 --- a/lib/btrfsprogs/btrfsinspect/rebuildmappings/blockgroups.go +++ b/lib/btrfsprogs/btrfsinspect/rebuildmappings/blockgroups.go @@ -5,9 +5,7 @@ package rebuildmappings import ( - "encoding/json" "fmt" - "os" "sort" "git.lukeshu.com/btrfs-progs-ng/lib/btrfs" @@ -22,25 +20,6 @@ type BlockGroup struct { Flags btrfsvol.BlockGroupFlags } -func ReadNodeScanResults(fs *btrfs.FS, filename string) (map[btrfsvol.LogicalAddr]BlockGroup, error) { - scanResultsBytes, err := os.ReadFile(filename) - if err != nil { - return nil, err - } - - var scanResults btrfsinspect.ScanDevicesResult - if err := json.Unmarshal(scanResultsBytes, &scanResults); err != nil { - return nil, err - } - - bgTree, err := ReduceScanResults(fs, scanResults) - if err != nil { - return nil, err - } - - return bgTree, nil -} - func ReduceScanResults(fs *btrfs.FS, scanResults btrfsinspect.ScanDevicesResult) (map[btrfsvol.LogicalAddr]BlockGroup, error) { // Reduce bgSet := make(map[BlockGroup]struct{}) |