diff options
Diffstat (limited to 'lib/btrfsprogs/btrfsutil')
-rw-r--r-- | lib/btrfsprogs/btrfsutil/broken_btree.go | 6 | ||||
-rw-r--r-- | lib/btrfsprogs/btrfsutil/walk.go | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/btrfsprogs/btrfsutil/broken_btree.go b/lib/btrfsprogs/btrfsutil/broken_btree.go index 6afaceb..7341d94 100644 --- a/lib/btrfsprogs/btrfsutil/broken_btree.go +++ b/lib/btrfsprogs/btrfsutil/broken_btree.go @@ -102,7 +102,7 @@ type brokenTrees struct { treeIndexes map[btrfsprim.ObjID]cachedIndex } -var _ btrfstree.Trees = (*brokenTrees)(nil) +var _ btrfstree.TreeOperator = (*brokenTrees)(nil) // NewBrokenTrees wraps a *btrfs.FS to support looking up information // from broken trees. @@ -123,7 +123,7 @@ var _ btrfstree.Trees = (*brokenTrees)(nil) // tree, and re-implements TreeLookup, TreeSearch, and TreeSearchAll // using that index. func NewBrokenTrees(ctx context.Context, inner *btrfs.FS) interface { - btrfstree.Trees + btrfstree.TreeOperator Superblock() (*btrfstree.Superblock, error) ReadAt(p []byte, off btrfsvol.LogicalAddr) (int, error) } { @@ -171,7 +171,7 @@ func (bt *brokenTrees) treeIndex(treeID btrfsprim.ObjID) cachedIndex { KeyFn: func(iv indexValue) btrfsprim.Key { return iv.Key }, } dlog.Infof(bt.ctx, "indexing tree %v...", treeID) - btrfstree.TreesImpl{NodeSource: bt.inner}.RawTreeWalk( + btrfstree.TreeOperatorImpl{NodeSource: bt.inner}.RawTreeWalk( bt.ctx, *treeRoot, func(err *btrfstree.TreeError) { diff --git a/lib/btrfsprogs/btrfsutil/walk.go b/lib/btrfsprogs/btrfsutil/walk.go index 2809737..355976a 100644 --- a/lib/btrfsprogs/btrfsutil/walk.go +++ b/lib/btrfsprogs/btrfsutil/walk.go @@ -8,7 +8,6 @@ import ( "context" "fmt" - "git.lukeshu.com/btrfs-progs-ng/lib/btrfs" "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsitem" "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsprim" "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfstree" @@ -37,7 +36,7 @@ type WalkAllTreesHandler struct { // WalkAllTrees walks all trees in a *btrfs.FS. Rather than returning // an error, it calls errCb each time an error is encountered. The // error will always be of type WalkError. -func WalkAllTrees(ctx context.Context, fs *btrfs.FS, cbs WalkAllTreesHandler) { +func WalkAllTrees(ctx context.Context, fs btrfstree.TreeOperator, cbs WalkAllTreesHandler) { var treeName string trees := []struct { |