diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-12 11:30:13 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-12 11:43:25 -0600 |
commit | 68555944f694e941b9cac3f8349364ec965db2fb (patch) | |
tree | 3b966ca9c633a1cf9740c8ca17904cf31121eda3 /cmd/btrfs-fsck/pass2.go | |
parent | a0daaacdd61f196fbc0ca90ed996e7eeb4d4fcdd (diff) |
Don't let TreeWalk bail early, add TreeID in to TreePath
Diffstat (limited to 'cmd/btrfs-fsck/pass2.go')
-rw-r--r-- | cmd/btrfs-fsck/pass2.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/btrfs-fsck/pass2.go b/cmd/btrfs-fsck/pass2.go index 9256220..78bd2e5 100644 --- a/cmd/btrfs-fsck/pass2.go +++ b/cmd/btrfs-fsck/pass2.go @@ -19,12 +19,12 @@ func pass2(fs *btrfs.FS, foundNodes map[btrfsvol.LogicalAddr]struct{}) { visitedNodes := make(map[btrfsvol.LogicalAddr]struct{}) btrfsutil.WalkAllTrees(fs, btrfsutil.WalkAllTreesHandler{ TreeWalkHandler: btrfs.TreeWalkHandler{ - Node: func(path btrfs.TreePath, node *util.Ref[btrfsvol.LogicalAddr, btrfs.Node], err error) error { + Node: func(path btrfs.TreePath, node *util.Ref[btrfsvol.LogicalAddr, btrfs.Node]) error { visitedNodes[node.Addr] = struct{}{} return nil }, }, - Err: func(err error) { + Err: func(err *btrfsutil.WalkError) { fmt.Printf("Pass 2: walk FS: error: %v\n", err) }, }) |