summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-14 11:16:54 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-14 19:44:15 -0600
commit84f4db04edaf98234019aa973f9b499c47aab5f8 (patch)
treedcb5ac8b1ee9103fee372ba37e2989c264c1a193
parent397173fa67eb36796d5f435496f3f1ebdd980406 (diff)
rebuildnodes: Turn the logging down a bit
-rw-r--r--lib/btrfsprogs/btrfsinspect/rebuildnodes/keyio/keyio.go2
-rw-r--r--lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go11
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildnodes/keyio/keyio.go b/lib/btrfsprogs/btrfsinspect/rebuildnodes/keyio/keyio.go
index 04df2b6..56da32d 100644
--- a/lib/btrfsprogs/btrfsinspect/rebuildnodes/keyio/keyio.go
+++ b/lib/btrfsprogs/btrfsinspect/rebuildnodes/keyio/keyio.go
@@ -130,7 +130,7 @@ func (o *Handle) readNode(ctx context.Context, laddr btrfsvol.LogicalAddr) *disk
panic(fmt.Errorf("should not happen: node@%v is not mentioned in the in-memory graph", laddr))
}
- dlog.Infof(ctx, "cache-miss node@%v, reading...", laddr)
+ dlog.Debugf(ctx, "cache-miss node@%v, reading...", laddr)
ref, err := btrfstree.ReadNode(o.rawFile, o.sb, laddr, btrfstree.NodeExpectations{
LAddr: containers.Optional[btrfsvol.LogicalAddr]{OK: true, Val: laddr},
Level: containers.Optional[uint8]{OK: true, Val: graphInfo.Level},
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go b/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go
index bc36485..cf334a0 100644
--- a/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go
+++ b/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go
@@ -499,10 +499,13 @@ func (o *rebuilder) resolveTreeAugments(ctx context.Context, treeID btrfsprim.Ob
list = containers.NewSet[btrfsvol.LogicalAddr](o.augmentQueue[treeID].single[wantKey])
}
chose := list.Intersection(ret)
- if len(chose) == 0 {
+ switch {
+ case len(chose) == 0:
dlog.Infof(ctx, "lists[%q]: chose (none) from %v", wantKey, maps.SortedKeys(list))
- } else {
+ case len(list) > 1:
dlog.Infof(ctx, "lists[%q]: chose %v from %v", wantKey, chose.TakeOne(), maps.SortedKeys(list))
+ default:
+ dlog.Debugf(ctx, "lists[%q]: chose %v from %v", wantKey, chose.TakeOne(), maps.SortedKeys(list))
}
}
@@ -571,10 +574,10 @@ func (o *rebuilder) wantAugment(ctx context.Context, wantKey WantWithTree, choic
}
o.augmentQueue[wantKey.TreeID].store(wantKey.Key, choices)
if len(choices) == 0 {
- dlog.Error(ctx, "could not find wanted item")
o.numAugmentFailures++
+ dlog.Debug(ctx, "ERR: could not find wanted item")
} else {
- dlog.Infof(ctx, "choices=%v", maps.SortedKeys(choices))
o.numAugments++
+ dlog.Debugf(ctx, "choices=%v", maps.SortedKeys(choices))
}
}