From: Damien Le Moal <dlemoal@kernel.org>
To: Naohiro Aota <naohiro.aota@wdc.com>, linux-btrfs@vger.kernel.org
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: Re: [PATCH 2/2] btrfs: zoned: skip reporting zone for new block group
Date: Wed, 12 Mar 2025 10:42:33 +0900 [thread overview]
Message-ID: <ba23e5fc-bf55-4e2c-a839-56d2d87a2529@kernel.org> (raw)
In-Reply-To: <ec6b55668686f77593f12c579832886294fc7310.1741596325.git.naohiro.aota@wdc.com>
On 3/12/25 10:31, Naohiro Aota wrote:
> There is a potential deadlock if we do report zones in an IO context. When one
> process do a report zones and another process freezes the block device, the
> report zones side cannot allocate a tag because the freeze is already started.
> This can thus result in new block group creation to hang forever, blocking the
> write path.
+Shin'ichiro
blktest has a failing test case due to a lockdep splat triggered by this. Would
be good to add that information (with the splat) here.
>
> Thankfully, a new block group should be created on empty zones. So, reporting
> the zones is not necessary and we can set the write pointer = 0 and load the
> zone capacity from the block layer using bdev_zone_capacity() helper.
>
> CC: stable@vger.kernel.org # 6.13+
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
With that fixed, looks good to me.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2025-03-12 1:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 1:31 [PATCH 0/2] btrfs: zoned: skip reporting zone for new block group Naohiro Aota
2025-03-12 1:31 ` [PATCH 1/2] block: introduce zone capacity helper Naohiro Aota
2025-03-12 1:39 ` Damien Le Moal
2025-03-12 2:07 ` Naohiro Aota
2025-03-12 5:27 ` Christoph Hellwig
2025-03-12 6:55 ` Damien Le Moal
2025-03-12 7:00 ` Christoph Hellwig
2025-03-12 7:11 ` Damien Le Moal
2025-03-12 1:31 ` [PATCH 2/2] btrfs: zoned: skip reporting zone for new block group Naohiro Aota
2025-03-12 1:42 ` Damien Le Moal [this message]
2025-03-13 2:24 ` Shinichiro Kawasaki
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=ba23e5fc-bf55-4e2c-a839-56d2d87a2529@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
--cc=shinichiro.kawasaki@wdc.com \
/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