diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-15 14:36:47 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-15 15:51:32 -0600 |
commit | 5627aaea2c15a6fa8cca202614119f72972be37f (patch) | |
tree | 45e6199cb43fc0e64ca7714872cffd86a37d4959 /lib/btrfs/btrfsvol/addr.go | |
parent | d9cb7963948cfb1d705c35653f5237a5e8fee3f3 (diff) |
tidy up
Diffstat (limited to 'lib/btrfs/btrfsvol/addr.go')
-rw-r--r-- | lib/btrfs/btrfsvol/addr.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/btrfs/btrfsvol/addr.go b/lib/btrfs/btrfsvol/addr.go index 640a3e8..76b531d 100644 --- a/lib/btrfs/btrfsvol/addr.go +++ b/lib/btrfs/btrfsvol/addr.go @@ -43,6 +43,13 @@ type QualifiedPhysicalAddr struct { Addr PhysicalAddr } +func (a QualifiedPhysicalAddr) Add(b AddrDelta) QualifiedPhysicalAddr { + return QualifiedPhysicalAddr{ + Dev: a.Dev, + Addr: a.Addr.Add(b), + } +} + func (a QualifiedPhysicalAddr) Cmp(b QualifiedPhysicalAddr) int { if d := int(a.Dev - b.Dev); d != 0 { return d |