On Mon, Mar 30, 2026 at 01:41:34PM -0400, Benjamin Marzinski wrote:
> INVALID:
> # modprobe scsi_debug dev_size_mb=1024 lbpu=1 sector_size=4096
> # integritysetup format -s 1024 /dev/sda
> # integritysetup open --allow-discards /dev/sda integrity-test
> # cat /sys/block/sda/queue/discard_granularity
> 2048
> # cat /sys/block/dm-1/queue/discard_granularity
> 1024
> # blkdiscard -o 1024 -l 16384 /dev/mapper/integrity-test

This patch fixes that already since it overrides the physical_block_size
to match the backing device's, and blk_validate_limits() will update
dma_granularity to be at least that size as well.

But dm-integrity probably should unconditionally set it to at least the
backing device's too, just in case the backing device wants a larger
granularity than the physical block size.

Reply via email to