From 84f4db04edaf98234019aa973f9b499c47aab5f8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 14 Mar 2023 11:16:54 -0600 Subject: rebuildnodes: Turn the logging down a bit --- lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go') 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)) } } -- cgit v1.2.3-2-g168b