Re: [dm-devel] [PATCH 05/11] dm-zoned: don't set the discard_alignment queue limit
- To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
- Cc: Jan Hoeppner <hoeppner@linux.ibm.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org, Song Liu <song@kernel.org>, dm-devel@redhat.com, "Md. Haris Iqbal" <haris.iqbal@ionos.com>, Jack Wang <jinpu.wang@ionos.com>, linux-s390@vger.kernel.org, Richard Weinberger <richard@nod.at>, xen-devel@lists.xenproject.org, linux-um@lists.infradead.org, Mike Snitzer <snitzer@kernel.org>, Josef Bacik <josef@toxicpanda.com>, nbd@other.debian.org, linux-block@vger.kernel.org, Stefan Haberland <sth@linux.ibm.com>, linux-raid@vger.kernel.org, "Martin K. Petersen" <martin.petersen@oracle.com>, Johannes Berg <johannes@sipsolutions.net>, Roger Pau Monné <roger.pau@citrix.com>
- Subject: Re: [dm-devel] [PATCH 05/11] dm-zoned: don't set the discard_alignment queue limit
- From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
- Date: Mon, 18 Apr 2022 17:00:11 +0900
- Message-id: <[🔎] fd915a51-035f-d5c6-42a1-c517e3d1f1b1@opensource.wdc.com>
- In-reply-to: <[🔎] 20220418045314.360785-6-hch@lst.de>
- References: <[🔎] 20220418045314.360785-1-hch@lst.de> <[🔎] 20220418045314.360785-6-hch@lst.de>
On 4/18/22 13:53, Christoph Hellwig wrote:
> The discard_alignment queue limit is named a bit misleading means the
> offset into the block device at which the discard granularity starts.
> Setting it to the discard granularity as done by dm-zoned is mostly
> harmless but also useless.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/md/dm-zoned-target.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-zoned-target.c b/drivers/md/dm-zoned-target.c
> index cac295cc8840e..0ec5d8b9b1a4e 100644
> --- a/drivers/md/dm-zoned-target.c
> +++ b/drivers/md/dm-zoned-target.c
> @@ -1001,7 +1001,7 @@ static void dmz_io_hints(struct dm_target *ti, struct queue_limits *limits)
> blk_limits_io_min(limits, DMZ_BLOCK_SIZE);
> blk_limits_io_opt(limits, DMZ_BLOCK_SIZE);
>
> - limits->discard_alignment = DMZ_BLOCK_SIZE;
> + limits->discard_alignment = 0;
> limits->discard_granularity = DMZ_BLOCK_SIZE;
> limits->max_discard_sectors = chunk_sectors;
> limits->max_hw_discard_sectors = chunk_sectors
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
Reply to: