diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-07 13:52:35 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-13 13:18:40 -0600 |
commit | 01d7bcfc588c5551e8ac387f62d2fc4468ba1f4c (patch) | |
tree | 6b4e58e4ffec6295ffe82086d8c37cbf0e39c609 /lib/btrfsutil/rebuilt_callbacks.go | |
parent | c88331692ea676acf67eb489a600688cf0c62fc6 (diff) |
btrfsutil: RebuiltForrest: Allow skipping the .AddedItem loop
Diffstat (limited to 'lib/btrfsutil/rebuilt_callbacks.go')
-rw-r--r-- | lib/btrfsutil/rebuilt_callbacks.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/btrfsutil/rebuilt_callbacks.go b/lib/btrfsutil/rebuilt_callbacks.go index fef16d4..3a7e6e6 100644 --- a/lib/btrfsutil/rebuilt_callbacks.go +++ b/lib/btrfsutil/rebuilt_callbacks.go @@ -14,17 +14,20 @@ import ( ) type RebuiltForrestCallbacks interface { - AddedItem(ctx context.Context, tree btrfsprim.ObjID, key btrfsprim.Key) AddedRoot(ctx context.Context, tree btrfsprim.ObjID, root btrfsvol.LogicalAddr) LookupRoot(ctx context.Context, tree btrfsprim.ObjID) (offset btrfsprim.Generation, item btrfsitem.Root, ok bool) LookupUUID(ctx context.Context, uuid btrfsprim.UUID) (id btrfsprim.ObjID, ok bool) } +type RebuiltForrestExtendedCallbacks interface { + RebuiltForrestCallbacks + AddedItem(ctx context.Context, tree btrfsprim.ObjID, key btrfsprim.Key) +} + type noopRebuiltForrestCallbacks struct { forrest *RebuiltForrest } -func (noopRebuiltForrestCallbacks) AddedItem(context.Context, btrfsprim.ObjID, btrfsprim.Key) {} func (noopRebuiltForrestCallbacks) AddedRoot(context.Context, btrfsprim.ObjID, btrfsvol.LogicalAddr) { } |