summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-07-17 20:49:17 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-07-17 20:49:17 -0600
commit705941183fbbf8e53c7dc13b2aab38855e6cb210 (patch)
treef883b9db4b8b16e38360a207309e1c558ed31b01 /lib
parent519d34d23ae94db067494eb0b2e5b536904d353b (diff)
more logging
Diffstat (limited to 'lib')
-rw-r--r--lib/btrfsprogs/btrfsinspect/scanforextents/scan.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/scanforextents/scan.go b/lib/btrfsprogs/btrfsinspect/scanforextents/scan.go
index d2ef95f..9ccde7c 100644
--- a/lib/btrfsprogs/btrfsinspect/scanforextents/scan.go
+++ b/lib/btrfsprogs/btrfsinspect/scanforextents/scan.go
@@ -77,8 +77,13 @@ func ScanForExtents(ctx context.Context, fs *btrfs.FS, blockgroups map[btrfsvol.
}); err != nil {
return err
}
- dlog.Infof(ctx, "... (%v/%v) blockgroup[laddr=%v] has %v matches",
- i+1, len(bgSums), bgLAddr, len(bgMatches[bgLAddr]))
+
+ lvl := dlog.LogLevelInfo
+ if len(bgMatches[bgLAddr]) == 0 {
+ lvl = dlog.LogLevelError
+ }
+ dlog.Logf(ctx, lvl, "... (%v/%v) blockgroup[laddr=%v] has %v matches based on %v%% coverage",
+ i+1, len(bgSums), bgLAddr, len(bgMatches[bgLAddr]), int(100*bgRun.PctFull()))
}
dlog.Info(ctx, "... done searching")