Trying to mkfs a 4k sector device today fails w/o manually specifying
sector size:
# modprobe scsi_debug sector_size=4096 dev_size_mb=32
# mkfs.xfs -f /dev/sdc
mkfs.xfs: warning - cannot set blocksize on block device /dev/sdc: Invalid argument
Warning: the data subvolume sector size 512 is less than the sector size
reported by the device (4096).
... <fail>
add sectorsize to the device topology info, and use that if present.
Also check that explicitly requested sector sizes are not smaller
than the hardware size. This already fails today, but with the more
cryptic "cannot set blocksize" ioctl error above.
With a few more suggested comments & cleanups from Christoph.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>