Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christoph Hellwig and committed by
Jens Axboe
18292faa 4e7f0ece

+1 -1
+1 -1
drivers/block/rnbd/rnbd-srv-dev.h
··· 59 59 60 60 static inline int rnbd_dev_get_discard_alignment(const struct rnbd_dev *dev) 61 61 { 62 - return bdev_get_queue(dev->bdev)->limits.discard_alignment; 62 + return bdev_discard_alignment(dev->bdev); 63 63 } 64 64 65 65 #endif /* RNBD_SRV_DEV_H */