diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-06 13:32:44 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-06 13:32:52 -0600 |
commit | 9c1afdeecd3412b40c0b4973cb375cb9c71adbb1 (patch) | |
tree | 172cbba1a997f520d8b20aea79df5a4bdff6c371 /cmd/btrfs-fsck/main.go | |
parent | b35032f7aa821ec48612ccc78bc36f30c589c9b9 (diff) |
more fix, more progress
Diffstat (limited to 'cmd/btrfs-fsck/main.go')
-rw-r--r-- | cmd/btrfs-fsck/main.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/btrfs-fsck/main.go b/cmd/btrfs-fsck/main.go index bb67556..8086904 100644 --- a/cmd/btrfs-fsck/main.go +++ b/cmd/btrfs-fsck/main.go @@ -112,8 +112,9 @@ func Main(imgfilename string) (err error) { } }, func(pos btrfs.PhysicalAddr) { pct := int(100 * float64(pos) / float64(devSize)) - if pct != lastProgress { - fmt.Printf("Pass 1: ... dev[%q] scanned %v%%\n", dev.Name(), pct) + if pct != lastProgress || pos == devSize { + fmt.Printf("Pass 1: ... dev[%q] scanned %v%% (found %d nodes)\n", + dev.Name(), pct, len(foundNodes)) lastProgress = pct } }); err != nil { @@ -265,10 +266,10 @@ func Main(imgfilename string) (err error) { fmt.Printf("Pass 1: ... new node checksum: error: %v\n", err) } if err := reconstructedNode.Write(); err != nil { - fmt.Printf("Pass 1: ... write new node: error:: %v\n", err) + fmt.Printf("Pass 1: ... write new node: error: %v\n", err) } - fmt.Printf("\nPass 2: ?????????????????????????\n") //////////////////////////////////////// + fmt.Printf("\nPass 2: orphaned nodes\n") /////////////////////////////////////////////////// /* fmt.Printf("node@%d: physical_addr=0x%0X logical_addr=0x%0X generation=%d owner=%v level=%d\n", |