summaryrefslogtreecommitdiff
path: root/cmd/btrfs-fsck
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-06-06 13:32:44 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-06-06 13:32:52 -0600
commit9c1afdeecd3412b40c0b4973cb375cb9c71adbb1 (patch)
tree172cbba1a997f520d8b20aea79df5a4bdff6c371 /cmd/btrfs-fsck
parentb35032f7aa821ec48612ccc78bc36f30c589c9b9 (diff)
more fix, more progress
Diffstat (limited to 'cmd/btrfs-fsck')
-rw-r--r--cmd/btrfs-fsck/main.go9
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",