[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dm-devel] [PATCH 10/11] rnbd-srv: use bdev_discard_alignment
- To: Christoph Hellwig <hch@xxxxxx>, Jens Axboe <axboe@xxxxxxxxx>
- From: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Apr 2022 17:02:41 +0900
- Authentication-results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com
- Cc: Jan Hoeppner <hoeppner@xxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, linux-nvme@xxxxxxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, Song Liu <song@xxxxxxxxxx>, dm-devel@xxxxxxxxxx, "Md. Haris Iqbal" <haris.iqbal@xxxxxxxxx>, Jack Wang <jinpu.wang@xxxxxxxxx>, linux-s390@xxxxxxxxxxxxxxx, Richard Weinberger <richard@xxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, Mike Snitzer <snitzer@xxxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxxxxxx>, nbd@xxxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, Stefan Haberland <sth@xxxxxxxxxxxxx>, linux-raid@xxxxxxxxxxxxxxx, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, Johannes Berg <johannes@xxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Mon, 18 Apr 2022 08:02:53 +0000
- Ironport-sdr: F6HphDK79lVKdJUEbCpaz0QQdl9N4jHR69ZKiLELdafpiwEuRMXq1uQD7mIGDkOsWFfj41mzZy 7LAJl96soOLOzMcZh3dWBqGLxaWHUy7jzEq+wYRVZAMxhGOaCVtxI7+tLFat5pGtPnLKUfJcmq iH/nuTrHKYaz4pqtkezoqkDxFbX0uM9L2V0D2DEUU4tfezBTXWJYezvPo2K2UxT41srZIxHIvm HGOkOTIK4yTKquMb1zC37Atg7imDvIzeHZjivp/kRZtiI6x6T9MFoDbOH9Ibku5U+YPaWOgVlE lLQWorfIzdti+TkM4gqFdUG5
- Ironport-sdr: ey49updTy2G5R496629lYGShk8E54BdpPbx50jXUcFVqlYiMdYxC38PlcBvu37dUWE2/A1aT45 NmwLfqkRAMPuflCOPpYdtLB8/HV2ElDeG+uLxM3hV2HJdzBc6P+94S2S7IhVwK5Oo9qzCC2O+0 3LBJdhDFuRSly8Z6fXvKS5bzUbuT6b1gpacDSw2RlnWFDraczhPwBSlAhetiWJ2SrXb0Cm3/l7 MeIGTmZARSNWmBeno0sKMzD39UVWEWurEw+2AYkJTn3Hqa/0r22o/Uz6FAsmk7HMvobI7jY5DI IMQ=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Wdcironportexception: Internal
On 4/18/22 13:53, Christoph Hellwig wrote:
> 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@xxxxxx>
> ---
> drivers/block/rnbd/rnbd-srv-dev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/rnbd/rnbd-srv-dev.h
> b/drivers/block/rnbd/rnbd-srv-dev.h
> index d080a0de59225..4309e52524691 100644
> --- a/drivers/block/rnbd/rnbd-srv-dev.h
> +++ b/drivers/block/rnbd/rnbd-srv-dev.h
> @@ -59,7 +59,7 @@ static inline int rnbd_dev_get_discard_granularity(const
> struct rnbd_dev *dev)
>
> static inline int rnbd_dev_get_discard_alignment(const struct rnbd_dev *dev)
> {
> - return bdev_get_queue(dev->bdev)->limits.discard_alignment;
> + return bdev_discard_alignment(dev->bdev);
> }
>
> #endif /* RNBD_SRV_DEV_H */
Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
--
Damien Le Moal
Western Digital Research
|