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] zloop: truncate finished zones to zone capacity
Date: Tue, 4 Aug 2026 13:26:24 +0900 [thread overview]
Message-ID: <3a6a55c1-65c1-4fc3-a511-b962b4d29190@kernel.org> (raw)
In-Reply-To: <B39E5FD81D1A07F4+20260804023403.939767-1-raoxu@uniontech.com>
On 8/4/26 11:34, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
>
> The size of a sequential zone backing file records the amount of data
> written and is used to restore the zone state. A backing file whose size
> is equal to the zone capacity is restored as a full zone, while a file
> larger than the zone capacity is rejected as invalid.
>
> However, zloop_finish_zone() currently truncates the backing file to the
> zone size. For devices with a reduced zone capacity, finishing a zone
> therefore creates a backing file larger than the zone capacity. After the
> device is removed and later re-added, that zone file is rejected instead
> of being restored as a full zone.
>
> Truncate finished sequential zones to the zone capacity, matching the
> persistent representation accepted by zloop_update_seq_zone() for a full
> zone.
>
> Suggested-by: Damien Le Moal <dlemoal@kernel.org>
> Fixes: eb0570c7df23 ("block: new zoned loop block device driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
Looks good.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-08-04 4:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 6:11 [PATCH] zloop: restore finished zones with reduced capacity raoxu
2026-08-03 13:04 ` Damien Le Moal
2026-08-04 2:34 ` [PATCH v2] zloop: truncate finished zones to zone capacity raoxu
2026-08-04 4:26 ` Damien Le Moal [this message]
2026-08-04 12:36 ` Christoph Hellwig
2026-08-04 12:37 ` Christoph Hellwig
2026-08-04 13:00 ` 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=3a6a55c1-65c1-4fc3-a511-b962b4d29190@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