Re: [dm-devel] [PATCH 03/11] null_blk: 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 03/11] null_blk: don't set the discard_alignment queue limit
- From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
- Date: Mon, 18 Apr 2022 17:01:00 +0900
- Message-id: <[🔎] fb5baf81-fa19-bb48-865c-e13277a0952a@opensource.wdc.com>
- In-reply-to: <[🔎] 20220418045314.360785-4-hch@lst.de>
- References: <[🔎] 20220418045314.360785-1-hch@lst.de> <[🔎] 20220418045314.360785-4-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 null_blk is mostly
> harmless but also useless.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/block/null_blk/main.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
> index 5cb4c92cdffea..a521e914a9843 100644
> --- a/drivers/block/null_blk/main.c
> +++ b/drivers/block/null_blk/main.c
> @@ -1765,7 +1765,6 @@ static void null_config_discard(struct nullb *nullb)
> }
>
> nullb->q->limits.discard_granularity = nullb->dev->blocksize;
> - nullb->q->limits.discard_alignment = nullb->dev->blocksize;
> blk_queue_max_discard_sectors(nullb->q, UINT_MAX >> 9);
> }
>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
Reply to: