summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfsvol/lvm.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-09-05 12:43:46 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-09-05 12:43:46 -0600
commit7fba10e5be51a3fe565a6f69a946ece9f0e59a67 (patch)
tree91bc89b8d1e5dba3ead0319daeef3181ccc6da4d /lib/btrfs/btrfsvol/lvm.go
parentabdc8394bcb7080f01859cbfe367beecf5aef06f (diff)
Try to uniformly use containers.Set
Diffstat (limited to 'lib/btrfs/btrfsvol/lvm.go')
-rw-r--r--lib/btrfs/btrfsvol/lvm.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/btrfs/btrfsvol/lvm.go b/lib/btrfs/btrfsvol/lvm.go
index 8003466..e12e53e 100644
--- a/lib/btrfs/btrfsvol/lvm.go
+++ b/lib/btrfs/btrfsvol/lvm.go
@@ -256,6 +256,8 @@ func (lv *LogicalVolume[PhysicalVolume]) Mappings() []Mapping {
return ret
}
+// paddrs isn't a containers.Set because QualifiedPhysicalAddr is not
+// an ordered type.
func (lv *LogicalVolume[PhysicalVolume]) Resolve(laddr LogicalAddr) (paddrs map[QualifiedPhysicalAddr]struct{}, maxlen AddrDelta) {
node := lv.logical2physical.Search(func(chunk chunkMapping) int {
return chunkMapping{LAddr: laddr, Size: 1}.cmpRange(chunk)