Skip to content
Commit 0000f2f7 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

xen-blkback: use bdev_discard_alignment



Use bdev_discard_alignment to calculate the correct discard alignment
offset even for partitions instead of just looking at the queue limit.

Also switch to use bdev_discard_granularity to get rid of the last direct
queue reference in xen_blkbk_discard.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220418045314.360785-12-hch@lst.de


[axboe: fold in 'q' removal as it's now unused]
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 18292faa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment