From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, dm-devel@lists.linux.dev,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>,
Christoph Hellwig <hch@lst.de>,
Benjamin Marzinski <bmarzins@redhat.com>
Subject: Re: [PATCH v5 2/4] dm: Call dm_revalidate_zones() after setting the queue limits
Date: Thu, 6 Jun 2024 09:54:25 +0200 [thread overview]
Message-ID: <20240606075425.GA14059@lst.de> (raw)
In-Reply-To: <20240606073721.88621-3-dlemoal@kernel.org>
On Thu, Jun 06, 2024 at 04:37:19PM +0900, Damien Le Moal wrote:
> dm_revalidate_zones() is called from dm_set_zone_restrictions() when the
> mapped device queue limits are not yet set. However,
> dm_revalidate_zones() calls blk_revalidate_disk_zones() and this
> function consults and modifies the mapped device queue limits. Thus,
> currently, blk_revalidate_disk_zones() operates on limits that are not
> yet initialized.
>
> Fix this by moving the call to dm_revalidate_zones() out of
> dm_set_zone_restrictions() and into dm_table_set_restrictions() after
> executing queue_limits_set().
>
> To further cleanup dm_set_zones_restrictions(), the message about the
> type of zone append (native or emulated) is also moved inside
> dm_revalidate_zones().
>
> Fixes: 1c0e720228ad ("dm: use queue_limits_set")
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> drivers/md/dm-table.c | 15 +++++++++++----
> drivers/md/dm-zone.c | 25 ++++++++++---------------
> drivers/md/dm.h | 1 +
> 3 files changed, 22 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
> index b2d5246cff21..f0c27d5a738b 100644
> --- a/drivers/md/dm-table.c
> +++ b/drivers/md/dm-table.c
> @@ -2028,10 +2028,7 @@ int dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
> dm_table_any_dev_attr(t, device_is_not_random, NULL))
> blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q);
>
> - /*
> - * For a zoned target, setup the zones related queue attributes
> - * and resources necessary for zone append emulation if necessary.
> - */
> + /* For a zoned table, setup the zones related queue attributes. */
s/zones/zone/ ? Or is my grammar dector way off?
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2024-06-06 7:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 7:37 [PATCH v5 0/4] Fix DM zone resource limits stacking Damien Le Moal
2024-06-06 7:37 ` [PATCH v5 1/4] block: Improve checks on zone resource limits Damien Le Moal
2024-06-06 7:37 ` [PATCH v5 2/4] dm: Call dm_revalidate_zones() after setting the queue limits Damien Le Moal
2024-06-06 7:54 ` Christoph Hellwig [this message]
2024-06-06 7:57 ` Damien Le Moal
2024-06-06 7:37 ` [PATCH v5 3/4] dm: Improve zone resource limits handling Damien Le Moal
2024-06-06 7:58 ` Christoph Hellwig
2024-06-06 8:03 ` Damien Le Moal
2024-06-06 7:37 ` [PATCH v5 4/4] dm: Remove unused macro DM_ZONE_INVALID_WP_OFST Damien Le Moal
2024-06-06 7:59 ` [PATCH v5 0/4] Fix DM zone resource limits stacking Christoph Hellwig
2024-06-06 8:02 ` Damien Le Moal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240606075425.GA14059@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=bmarzins@redhat.com \
--cc=dlemoal@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox