summaryrefslogtreecommitdiff
path: root/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go')
-rw-r--r--lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go b/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go
deleted file mode 100644
index 9d91f23..0000000
--- a/lib/btrfsprogs/btrfsinspect/rebuildnodes/util.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com>
-//
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-package rebuildnodes
-
-import (
- "golang.org/x/exp/constraints"
-
- "git.lukeshu.com/btrfs-progs-ng/lib/btrfsprogs/btrfsinspect"
-)
-
-func countNodes(nodeScanResults btrfsinspect.ScanDevicesResult) int {
- var cnt int
- for _, devResults := range nodeScanResults {
- cnt += len(devResults.FoundNodes)
- }
- return cnt
-}
-
-func roundDown[T constraints.Integer](n, d T) T {
- return (n / d) * d
-}
-
-func roundUp[T constraints.Integer](n, d T) T {
- return ((n + d - 1) / d) * d
-}
-
-func discardOK[T any](val T, _ bool) T {
- return val
-}