summaryrefslogtreecommitdiff
path: root/lib/btrfsutil/scan.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-04-03 15:06:31 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2023-04-04 14:08:38 -0600
commit83886d4925e3d1d9c2c5d9cca4dd165597e54864 (patch)
treec1e3c66d8a2ea34ffa2ac17263db439dd7db2dbd /lib/btrfsutil/scan.go
parentb7e24934c062017fd50fff5d3416b2729c99bc4e (diff)
btrfsutil: Rename unexported types to be clearer about which system they belong to
- nodeInfo → oldRebuiltNodeInfo (old_rebuilt_forrest.go) - itemStats → rebuiltItemStats (rebuilt_tree.go) - rootStats → rebuiltRootStats (rebuilt_tree.go) - nodeScanner → nodeLister (listnodes.go) - nodeStats → nodeListStats (listnodes.go) - scanStats → devScanStats (scan.go)
Diffstat (limited to 'lib/btrfsutil/scan.go')
-rw-r--r--lib/btrfsutil/scan.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/btrfsutil/scan.go b/lib/btrfsutil/scan.go
index 0e268e5..bf848ee 100644
--- a/lib/btrfsutil/scan.go
+++ b/lib/btrfsutil/scan.go
@@ -33,12 +33,12 @@ type DeviceScanner[Stats comparable, Result any] interface {
ScanDone(ctx context.Context) (Result, error)
}
-type scanStats[T comparable] struct {
+type devScanStats[T comparable] struct {
portion textui.Portion[btrfsvol.PhysicalAddr]
stats T
}
-func (s scanStats[T]) String() string {
+func (s devScanStats[T]) String() string {
return textui.Sprintf("scanned %v (%v)",
s.portion, s.stats)
}
@@ -91,8 +91,8 @@ func ScanOneDevice[Stats comparable, Result any](ctx context.Context, dev *btrfs
scanner := newScanner(ctx, *sb, numBytes, numSectors)
- progressWriter := textui.NewProgress[scanStats[Stats]](ctx, dlog.LogLevelInfo, textui.Tunable(1*time.Second))
- var stats scanStats[Stats]
+ progressWriter := textui.NewProgress[devScanStats[Stats]](ctx, dlog.LogLevelInfo, textui.Tunable(1*time.Second))
+ var stats devScanStats[Stats]
stats.portion.D = numBytes
var minNextNode btrfsvol.PhysicalAddr