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_forrest.go | |
parent | c88331692ea676acf67eb489a600688cf0c62fc6 (diff) |
btrfsutil: RebuiltForrest: Allow skipping the .AddedItem loop
Diffstat (limited to 'lib/btrfsutil/rebuilt_forrest.go')
-rw-r--r-- | lib/btrfsutil/rebuilt_forrest.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/btrfsutil/rebuilt_forrest.go b/lib/btrfsutil/rebuilt_forrest.go index 29a5210..4249396 100644 --- a/lib/btrfsutil/rebuilt_forrest.go +++ b/lib/btrfsutil/rebuilt_forrest.go @@ -73,8 +73,11 @@ type RebuiltForrest struct { rebuiltSharedCache } -// NewRebuiltForrest returns a new RebuiltForrest instance. The -// RebuiltForrestCallbacks may be nil. +// NewRebuiltForrest returns a new RebuiltForrest instance. +// +// The `cb` RebuiltForrestCallbacks may be nil. If `cb` also +// implements RebuiltForrestExtendedCallbacks, then a series of +// .AddedItem() calls will be made before each call to .AddedRoot(). func NewRebuiltForrest(fs btrfs.ReadableFS, graph Graph, cb RebuiltForrestCallbacks) *RebuiltForrest { ret := &RebuiltForrest{ inner: fs, |