diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-13 23:45:14 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-14 00:50:23 -0600 |
commit | 913acf193bfac666cec68e8c3fb13829a7a0c794 (patch) | |
tree | 9e26b25fa2ed2b966f256b0580c17c9291c29ba6 /lib | |
parent | b8c5940165399f9dc404c912aa455822347bb367 (diff) |
implement scan-for-nodes command
Diffstat (limited to 'lib')
-rw-r--r-- | lib/btrfsprogs/btrfsinspect/recoverchunks.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/recoverchunks.go b/lib/btrfsprogs/btrfsinspect/recoverchunks.go index 257a4fd..25794be 100644 --- a/lib/btrfsprogs/btrfsinspect/recoverchunks.go +++ b/lib/btrfsprogs/btrfsinspect/recoverchunks.go @@ -150,6 +150,8 @@ func (found ScanOneDevResult) AddToLV(ctx context.Context, fs *btrfs.FS, dev *bt } } +// ScanOneDev mostly mimics btrfs-progs +// cmds/rescue-chunk-recover.c:scan_one_device(). func ScanOneDev(ctx context.Context, dev *btrfs.Device, superblock btrfs.Superblock) (ScanOneDevResult, error) { result := ScanOneDevResult{ FoundNodes: make(map[btrfsvol.LogicalAddr][]btrfsvol.PhysicalAddr), |