diff options
Diffstat (limited to 'cmd/btrfs-rec/inspect_scanforextents.go')
-rw-r--r-- | cmd/btrfs-rec/inspect_scanforextents.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/cmd/btrfs-rec/inspect_scanforextents.go b/cmd/btrfs-rec/inspect_scanforextents.go index 698b3b6..5f763d9 100644 --- a/cmd/btrfs-rec/inspect_scanforextents.go +++ b/cmd/btrfs-rec/inspect_scanforextents.go @@ -19,8 +19,8 @@ import ( func init() { inspectors = append(inspectors, subcommand{ Command: cobra.Command{ - Use: "scan-for-extents SCAN_RESULT.json", - Args: cliutil.WrapPositionalArgs(cobra.ExactArgs(1)), + Use: "scan-for-extents NODESCAN.json DUMPSUMS.gob", + Args: cliutil.WrapPositionalArgs(cobra.ExactArgs(2)), }, RunE: func(fs *btrfs.FS, cmd *cobra.Command, args []string) error { ctx := cmd.Context() @@ -33,7 +33,14 @@ func init() { runtime.GC() dlog.Infof(ctx, "... done reading %q", args[0]) - if err := scanforextents.ScanForExtents(ctx, fs, bgs); err != nil { + dlog.Infof(ctx, "Reading %q...", args[1]) + sums, err := scanforextents.ReadAllSums(args[1]) + if err != nil { + return err + } + dlog.Infof(ctx, "... done reading %q", args[1]) + + if err := scanforextents.ScanForExtents(ctx, fs, bgs, sums); err != nil { return err } |