diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-12-30 22:12:30 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-05 19:48:17 -0700 |
commit | 73b1da4e88e7ce788151f3d263b309f20d7c1824 (patch) | |
tree | 8dbf34b927dfb583be214a60421e526a94b3ce0a /lib | |
parent | 5590315b11557aa48999d09700631ad9239ce03b (diff) |
rebuildnodes: Optimize: Avoid unnescessary disk access for existence-check
Diffstat (limited to 'lib')
-rw-r--r-- | lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go b/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go index 4f5990e..7f428f3 100644 --- a/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go +++ b/lib/btrfsprogs/btrfsinspect/rebuildnodes/rebuild.go @@ -440,7 +440,7 @@ func (o *rebuilder) _wantOff(ctx context.Context, treeID btrfsprim.ObjID, tgt bt // check if we already have it - if _, ok := o.rebuilt.Load(ctx, treeID, tgt); ok { + if _, ok := o.rebuilt.Search(ctx, treeID, tgt.Cmp); ok { return true } |