summaryrefslogtreecommitdiff
path: root/lib/btrfsutil/rebuilt_forrest.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-04-17 08:09:05 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2023-04-17 19:52:26 -0600
commiteb19c7c4d4a1a8b49ea4423b706edff651768447 (patch)
tree0aec03605440b55e6d96b3228c8cb264eb16d5be /lib/btrfsutil/rebuilt_forrest.go
parent1efce3f90371d12bbb429b1810ce3a5c53e4d4f6 (diff)
btrfsutil: RebuiltTree: Don't have laxAncestors hide UUID errors
Diffstat (limited to 'lib/btrfsutil/rebuilt_forrest.go')
-rw-r--r--lib/btrfsutil/rebuilt_forrest.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/btrfsutil/rebuilt_forrest.go b/lib/btrfsutil/rebuilt_forrest.go
index 900e725..5741072 100644
--- a/lib/btrfsutil/rebuilt_forrest.go
+++ b/lib/btrfsutil/rebuilt_forrest.go
@@ -223,8 +223,11 @@ func (ts *RebuiltForrest) rebuildTree(ctx context.Context, treeID btrfsprim.ObjI
ts.trees[treeID].ParentGen = rootOff
parentID, ok := ts.cb.LookupUUID(ctx, rootItem.ParentUUID)
if !ok {
- if !ts.laxAncestors {
- ts.trees[treeID].rootErr = fmt.Errorf("failed to look up UUID: %v", rootItem.ParentUUID)
+ err := fmt.Errorf("failed to look up UUID: %v", rootItem.ParentUUID)
+ if ts.laxAncestors {
+ ts.trees[treeID].parentErr = err
+ } else {
+ ts.trees[treeID].rootErr = err
}
return
}