cryptsetup status gives offset and size in wrong sector size
Issue description
The offset and size field in cryptsetup status
are always given in a sector size of 512 Bytes, even if the sector size is something different.
Steps for reproducing the issue
cryptsetup luksFormat --sector-size 4096 /dev/sdX1
cryptsetup open /dev/sdX1 mappedname
cryptsetup status mappedname
The output of the last command is something like
/dev/mapper/mappedname is active.
type: LUKS2
cipher: aes-xts-plain64
keysize: 512 bits
key location: keyring
device: /dev/sdX1
sector size: 4096
offset: 32768 sectors
size: 61403136 sectors
mode: read/write
The partition I've tried this on has a size of 31455182848 Bytes. (61403136 sectors + 32768 sectors) * 512 Bytes / sector = 31455182848 Bytes. So the size and offset are given in 512 Byte sectors, not 4096.
Additional info
Arch Linux 6.8.9-arch1-2
Debug log
Command is not failing, just showing wrong info.
Please correct me if I have a misunderstanding about sector size and what the unit sectors
means.