rnbd-srv: use bdev_discard_alignment
authorChristoph Hellwig <hch@lst.de>
Mon, 18 Apr 2022 04:53:13 +0000 (06:53 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 May 2022 16:38:50 +0000 (10:38 -0600)
commit18292faa89d2bff3bdd33ab9c065f45fb6710e47
treef5f2e35713afa905fe2877e34674a0f6b58ce31d
parent4e7f0ece41e1be8f876f320a0972a715daec0a50
rnbd-srv: 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.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220418045314.360785-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-srv-dev.h