diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-07-22 21:18:40 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-07-23 00:46:56 -0600 |
commit | 1624c2ef8c5f95e428ad185278c3cba576f9dcb0 (patch) | |
tree | bb4acda0402efc9ad548fe16a9348ffeda2f7598 | |
parent | c57cc3d4739ffa0346350c63fb4ec59a63b56e46 (diff) |
btrfs: Export SuperBlockSize
-rw-r--r-- | lib/btrfs/io1_pv.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/btrfs/io1_pv.go b/lib/btrfs/io1_pv.go index 3b13f73..46eb24d 100644 --- a/lib/btrfs/io1_pv.go +++ b/lib/btrfs/io1_pv.go @@ -30,19 +30,18 @@ var SuperblockAddrs = []btrfsvol.PhysicalAddr{ 0x40_0000_0000, // 256GiB } -var superblockSize = binstruct.StaticSize(btrfstree.Superblock{}) +var SuperblockSize = btrfsvol.PhysicalAddr(binstruct.StaticSize(btrfstree.Superblock{})) func (dev *Device) Superblocks() ([]*diskio.Ref[btrfsvol.PhysicalAddr, btrfstree.Superblock], error) { if dev.cacheSuperblocks != nil { return dev.cacheSuperblocks, nil } - superblockSize := btrfsvol.PhysicalAddr(superblockSize) sz := dev.Size() var ret []*diskio.Ref[btrfsvol.PhysicalAddr, btrfstree.Superblock] for i, addr := range SuperblockAddrs { - if addr+superblockSize <= sz { + if addr+SuperblockSize <= sz { superblock := &diskio.Ref[btrfsvol.PhysicalAddr, btrfstree.Superblock]{ File: dev, Addr: addr, |