From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Naohiro Aota <Naohiro.Aota@wdc.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] btrfs: zoned: fix write time activation failure for metadata block group
Date: Fri, 11 Jul 2025 08:16:27 +0000 [thread overview]
Message-ID: <8d296e0d-940c-4f4e-86d8-c074cabda68c@wdc.com> (raw)
In-Reply-To: <aefabcddbc2038246813704a1c8bb29a60eb1e9c.1752218199.git.naohiro.aota@wdc.com>
On 11.07.25 09:24, Naohiro Aota wrote:
> Since commit 13bb483d32ab ("btrfs: zoned: activate metadata block group on
> write time"), we activate a metadata block group at the write time. If the
s/the// ~^
> zone capacity is small enough, we can allocate the entire region before the
> first write. Then, we hit the btrfs_zoned_bg_is_full() in
+ condition? ~^
> btrfs_zone_activate() and the activation fails.
>
> For a data block group, we activate it at the allocation time and we should
s/the// ~^
> check the fullness condition in the caller side. Add, a WARN to check the
s/,// ~^
> fullness condition.
>
> For a metadata block group, we don't need the fullness check because we
> activate it at the write time. Instead, activating it once it is written
s/the// ~^
> should be invalid. Catch that with a WARN too.
>
> Fixes: 13bb483d32ab ("btrfs: zoned: activate metadata block group on write time")
> CC: stable@vger.kernel.org # 6.6+
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Otherwise looks good to me,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
next prev parent reply other threads:[~2025-07-11 8:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 7:23 [PATCH v2 0/3] btrfs: zoned: limitt active zones to max_open_zones Naohiro Aota
2025-07-11 7:23 ` [PATCH v2 1/3] btrfs: zoned: do not select metadata BG as finish target Naohiro Aota
2025-07-11 7:23 ` [PATCH v2 2/3] btrfs: zoned: fix write time activation failure for metadata block group Naohiro Aota
2025-07-11 8:16 ` Johannes Thumshirn [this message]
2025-07-11 10:52 ` Johannes Thumshirn
2025-07-14 0:50 ` Naohiro Aota
2025-07-11 7:23 ` [PATCH v2 3/3] btrfs: zoned: limit active zones to max_open_zones Naohiro Aota
2025-07-11 8:25 ` Johannes Thumshirn
2025-07-11 8:33 ` Johannes Thumshirn
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=8d296e0d-940c-4f4e-86d8-c074cabda68c@wdc.com \
--to=johannes.thumshirn@wdc.com \
--cc=Naohiro.Aota@wdc.com \
--cc=linux-btrfs@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