From: Boris Burkov <boris@bur.io>
To: Naohiro Aota <naohiro.aota@wdc.com>
Cc: linux-btrfs@vger.kernel.org, dlemoal@kernel.org
Subject: Re: [PATCH] btrfs: fix buffer index in wait_eb_writebacks()
Date: Mon, 11 Aug 2025 16:13:30 -0700 [thread overview]
Message-ID: <aJp5DFDRpiX9yUWn@devvm12410.ftw0.facebook.com> (raw)
In-Reply-To: <20250811225840.501895-1-naohiro.aota@wdc.com>
On Tue, Aug 12, 2025 at 07:58:40AM +0900, Naohiro Aota wrote:
> The commit f2cb97ee964a ("btrfs: index buffer_tree using node size")
> changed the index of buffer_tree from "start >> sectorsize_bits" to "start
> >> nodesize_bits". However, the change is not applied for
> wait_eb_writebacks() and caused IO failures by writing in a full zone. Use
> the index properly.
>
> Fixes: f2cb97ee964a ("btrfs: index buffer_tree using node size")
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Boris Burkov <boris@bur.io>
> ---
> fs/btrfs/zoned.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
> index d9b26a48cb48..e264310b8d6b 100644
> --- a/fs/btrfs/zoned.c
> +++ b/fs/btrfs/zoned.c
> @@ -2260,7 +2260,7 @@ static void wait_eb_writebacks(struct btrfs_block_group *block_group)
> struct btrfs_fs_info *fs_info = block_group->fs_info;
> const u64 end = block_group->start + block_group->length;
> struct extent_buffer *eb;
> - unsigned long index, start = (block_group->start >> fs_info->sectorsize_bits);
> + unsigned long index, start = (block_group->start >> fs_info->nodesize_bits);
>
> rcu_read_lock();
> xa_for_each_start(&fs_info->buffer_tree, index, eb, start) {
> --
> 2.50.1
>
prev parent reply other threads:[~2025-08-11 23:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 22:58 [PATCH] btrfs: fix buffer index in wait_eb_writebacks() Naohiro Aota
2025-08-11 23:11 ` Qu Wenruo
2025-08-11 23:13 ` Boris Burkov [this message]
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=aJp5DFDRpiX9yUWn@devvm12410.ftw0.facebook.com \
--to=boris@bur.io \
--cc=dlemoal@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=naohiro.aota@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