From: Naohiro Aota <Naohiro.Aota@wdc.com>
To: Johannes Thumshirn <jth@kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Cc: Naohiro Aota <Naohiro.Aota@wdc.com>,
Damien Le Moal <dlemoal@kernel.org>,
David Sterba <dsterba@suse.com>,
Josef Bacik <josef@toxicpanda.com>,
Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Subject: Re: [PATCH v3] btrfs: zoned: fix alloc_offset calculation for partly conventional block groups
Date: Thu, 12 Jun 2025 21:59:35 +0000 [thread overview]
Message-ID: <DAKW4NWC8B4G.1VPELYQWGAJWW@wdc.com> (raw)
In-Reply-To: <20250606071741.409240-1-jth@kernel.org>
On Fri Jun 6, 2025 at 4:17 PM JST, Johannes Thumshirn wrote:
> From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
>
> When one of two zones composing a DUP block group is a conventional zone,
> we have the zone_info[i]->alloc_offset = WP_CONVENTIONAL. That will, of
> course, not match the write pointer of the other zone, and fails that
> block group.
>
> This commit solves that issue by properly recovering the emulated write
> pointer from the last allocated extent. The offset for the SINGLE, DUP,
> and RAID1 are straight-forward: it is same as the end of last allocated
> extent. The RAID0 and RAID10 are a bit tricky that we need to do the math
> of striping.
>
> This is the kernel equivalent of Naohiro's user-space commit:
> 1e85aa96e107 ("btrfs-progs: zoned: fix alloc_offset calculation for partly conventional block groups")
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Thanks,
prev parent reply other threads:[~2025-06-12 21:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 7:17 [PATCH v3] btrfs: zoned: fix alloc_offset calculation for partly conventional block groups Johannes Thumshirn
2025-06-12 8:22 ` Johannes Thumshirn
2025-06-12 21:59 ` Naohiro Aota [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=DAKW4NWC8B4G.1VPELYQWGAJWW@wdc.com \
--to=naohiro.aota@wdc.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=dlemoal@kernel.org \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=jth@kernel.org \
--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