From: Damien Le Moal <dlemoal@kernel.org>
To: raoxu <raoxu@uniontech.com>
Cc: axboe@kernel.dk, hch@lst.de, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] Documentation: block: zloop: clarify capacity alignment
Date: Tue, 4 Aug 2026 13:29:09 +0900 [thread overview]
Message-ID: <8da2a239-e074-41f8-8d8d-552b1652edfd@kernel.org> (raw)
In-Reply-To: <8100621B7A58105B+20260804034121.1036479-1-raoxu@uniontech.com>
On 8/4/26 12:41, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
>
> zloop divides the requested capacity by the zone size to determine the
> number of zones. Since it uses one zone size for all zones, a smaller last
> zone is not supported and an unaligned capacity is rounded down.
>
> The capacity_mb description incorrectly states that the capacity is rounded
> up. Correct it to document the actual behavior.
>
> Fixes: 9e4f11c1228c ("Documentation: Document the new zoned loop block device driver")
> Suggested-by: Damien Le Moal <dlemoal@kernel.org>
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
> ---
> Changes in v2:
> - Replace the code change with a documentation correction.
> - State that a smaller last zone is unsupported and that an unaligned
> capacity is rounded down.
>
> Documentation/admin-guide/blockdev/zoned_loop.rst | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/admin-guide/blockdev/zoned_loop.rst b/Documentation/admin-guide/blockdev/zoned_loop.rst
> index f4f1f31..fd99e5c 100644
> --- a/Documentation/admin-guide/blockdev/zoned_loop.rst
> +++ b/Documentation/admin-guide/blockdev/zoned_loop.rst
> @@ -71,8 +71,9 @@ follows.
> =================== =========================================================
> id Device number (the X in /dev/zloopX).
> Default: automatically assigned.
> -capacity_mb Device total capacity in MiB. This is always rounded up
> - to the nearest higher multiple of the zone size.
> +capacity_mb Device total capacity in MiB. A smaller last zone is not
> + supported, so an unaligned value is rounded down to a
> + zone-size multiple.
Let's make this a proper sentence:
capacity_mb Device total capacity in MiB. A smaller last zone is not
supported, so a capacity value that is not multiple of
the zone size is rounded down to the closest multiple of
the zone-size.
With that,
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> Default: 16384 MiB (16 GiB).
> zone_size_mb Device zone size in MiB. Default: 256 MiB.
> zone_capacity_mb Device zone capacity (must always be equal to or lower
> --
> 2.47.3
>
>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-08-04 4:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 9:58 [PATCH] zloop: round capacity up to a zone-size multiple raoxu
2026-08-03 13:02 ` Damien Le Moal
2026-08-04 3:41 ` [PATCH v2] Documentation: block: zloop: clarify capacity alignment raoxu
2026-08-04 4:29 ` Damien Le Moal [this message]
2026-08-04 5:29 ` [PATCH v3] " raoxu
2026-08-04 13:05 ` Christoph Hellwig
2026-08-04 13:21 ` Jens Axboe
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=8da2a239-e074-41f8-8d8d-552b1652edfd@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raoxu@uniontech.com \
--cc=stable@vger.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