diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-09 12:13:58 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-09 12:13:58 -0600 |
commit | 825fe95475952b18fc586630de5ddaf3faacbde7 (patch) | |
tree | b642012aea806b794f6e7141dbc3a57d8f67bebc /lib/btrfsutil | |
parent | 86f83b75c73d9eb2e1f8733a02ce12c58f563530 (diff) |
btrfsutil: RebuiltForrest: Don't bother listing trees with no roots
Diffstat (limited to 'lib/btrfsutil')
-rw-r--r-- | lib/btrfsutil/rebuilt_forrest.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/btrfsutil/rebuilt_forrest.go b/lib/btrfsutil/rebuilt_forrest.go index ba88bbc..6231563 100644 --- a/lib/btrfsutil/rebuilt_forrest.go +++ b/lib/btrfsutil/rebuilt_forrest.go @@ -278,7 +278,7 @@ func (ts *RebuiltForrest) RebuiltListRoots(ctx context.Context) map[btrfsprim.Ob defer ts.treesMu.Unlock() ret := make(map[btrfsprim.ObjID]containers.Set[btrfsvol.LogicalAddr]) for treeID, tree := range ts.trees { - if tree != nil { + if tree != nil && len(tree.Roots) > 0 { ret[treeID] = tree.Roots } } |