From: Niklas Cassel <cassel@kernel.org>
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 v6 1/4] block: Improve checks on zone resource limits
Date: Mon, 10 Jun 2024 09:15:53 +0200 [thread overview]
Message-ID: <ZmaoKbULhbb8sIdE@ryzen.lan> (raw)
In-Reply-To: <20240606082147.96422-2-dlemoal@kernel.org>
On Thu, Jun 06, 2024 at 05:21:44PM +0900, Damien Le Moal wrote:
> Make sure that the zone resource limits of a zoned block device are
> correct by checking that:
> (a) If the device has a max active zones limit, make sure that the max
> open zones limit is lower than the max active zones limit.
> (b) If the device has zone resource limits, check that the limits
> values are lower than the number of sequential zones of the device.
> If it is not, assume that the zoned device has no limits by setting
> the limits to 0.
>
> For (a), a check is added to blk_validate_zoned_limits() and an error
> returned if the max open zones limit exceeds the value of the max active
> zone limit (if there is one).
>
> For (b), given that we need the number of sequential zones of the zoned
> device, this check is added to disk_update_zone_resources(). This is
> safe to do as that function is executed with the disk queue frozen and
> the check executed after queue_limits_start_update() which takes the
> queue limits lock. Of note is that the early return in this function
> for zoned devices that do not use zone write plugging (e.g. DM devices
> using native zone append) is moved to after the new check and adjustment
> of the zone resource limits so that the check applies to any zoned
> device.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
Reviewed-by: Niklas Cassel <cassel@kernel.org>
next prev parent reply other threads:[~2024-06-10 7:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 8:21 [PATCH v6 0/4] Fix DM zone resource limits stacking Damien Le Moal
2024-06-06 8:21 ` [PATCH v6 1/4] block: Improve checks on zone resource limits Damien Le Moal
2024-06-10 7:15 ` Niklas Cassel [this message]
2024-06-06 8:21 ` [PATCH v6 2/4] dm: Call dm_revalidate_zones() after setting the queue limits Damien Le Moal
2024-06-06 19:40 ` Benjamin Marzinski
2024-06-10 7:16 ` Niklas Cassel
2024-06-06 8:21 ` [PATCH v6 3/4] dm: Improve zone resource limits handling Damien Le Moal
2024-06-06 19:41 ` Benjamin Marzinski
2024-06-10 7:18 ` Niklas Cassel
2024-06-06 8:21 ` [PATCH v6 4/4] dm: Remove unused macro DM_ZONE_INVALID_WP_OFST Damien Le Moal
2024-06-10 7:19 ` Niklas Cassel
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=ZmaoKbULhbb8sIdE@ryzen.lan \
--to=cassel@kernel.org \
--cc=axboe@kernel.dk \
--cc=bmarzins@redhat.com \
--cc=dlemoal@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.