From: Miroslav Cimerman <mc@raidlab.org>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>, Chris Mason <mason@kernel.org>,
Naohiro Aota <naohiro.aota@wdc.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
Qu Wenruo <wqu@suse.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/5] btrfs: zoned: RAID1 block groups with missing or stale stripes
Date: Sat, 21 Nov 2026 13:45:44 +0000 [thread overview]
Message-ID: <20261121134550.216217-1-mc@raidlab.org> (raw)
btrfs_load_block_group_raid1() compares the active state and the write
pointer of each present stripe with stripe 0's, and takes the zone
capacity from stripes 0 and 1. But stripe 0 can be missing, any stripe
can be behind the others on a degraded mount, and the full zones of a
block group can report different capacities.
- 1/5 compares the active state with the first present stripe. With
stripe 0 missing, such block groups were left off the active list, and
writes to them could hang.
- 2/5 takes the zone capacity from all present stripes. RAID1C3 and
RAID1C4 block groups failed to load with stripes 0 and 1 missing, once
they held data, and were written past a smaller third or fourth stripe.
- 3/5 takes a full zone with more capacity than the block group as
written up to the block group's capacity, unless an extent ends past
it. Before, a regular mount failed on such block groups.
- 4/5 allocates from the highest write pointer on degraded mounts.
Stripe 0's can be behind, and new extents then went over committed
ones. It also lets a regular mount load a block group whose stripe 0
is on an offline or read-only zone.
- 5/5 adds self-test cases.
v2:
- 2/5: was 3/4, moved before 3/5, which needs the block group's
capacity. It takes the capacity from all present stripes now
- 3/5: new. v1 failed a degraded mount with all devices present and full
zones of different capacities, which loaded before when stripe 0 had
the smallest one (found in an LLM review). Zones with an extent past
the capacity are not capped
- 4/5 (was 2/4): mark a metadata block group with a mismatch active if
any of its zones is. With an empty first zone, it stayed inactive and
warned at its next write (reported by Sashiko)
- 5/5: add cases with an empty first zone, with different zone
capacities and with a failed zone report, and a capacity per stripe.
Renamed, as 6 of the 14 new cases are on a regular mount
- rebased on for-next 184fa2c40f5c
v1: https://lore.kernel.org/linux-btrfs/20261119213835.103131-1-mc@raidlab.org/
Miroslav Cimerman (5):
btrfs: zoned: take the RAID1 active state from the first present
stripe
btrfs: zoned: take the RAID1 zone capacity from all present stripes
btrfs: zoned: cap full RAID1 zones at the block group's capacity
btrfs: zoned: use the highest RAID1 write pointer on degraded mounts
btrfs: tests: zoned: add RAID1 cases with missing or stale stripes
fs/btrfs/tests/zoned-tests.c | 203 ++++++++++++++++++++++++++++++++++-
fs/btrfs/zoned.c | 102 +++++++++++++++---
2 files changed, 291 insertions(+), 14 deletions(-)
base-commit: 184fa2c40f5c50afb1d8bf900eafadf450db392e
--
2.53.0
next reply other threads:[~2026-11-21 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 13:45 Miroslav Cimerman [this message]
2026-11-21 13:45 ` [PATCH v2 1/5] btrfs: zoned: take the RAID1 active state from the first present stripe Miroslav Cimerman
2026-11-21 13:45 ` [PATCH v2 2/5] btrfs: zoned: take the RAID1 zone capacity from all present stripes Miroslav Cimerman
2026-11-21 13:45 ` [PATCH v2 3/5] btrfs: zoned: cap full RAID1 zones at the block group's capacity Miroslav Cimerman
2026-11-21 13:45 ` [PATCH v2 4/5] btrfs: zoned: use the highest RAID1 write pointer on degraded mounts Miroslav Cimerman
2026-11-21 13:45 ` [PATCH v2 5/5] btrfs: tests: zoned: add RAID1 cases with missing or stale stripes Miroslav Cimerman
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=20261121134550.216217-1-mc@raidlab.org \
--to=mc@raidlab.org \
--cc=dsterba@suse.com \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mason@kernel.org \
--cc=naohiro.aota@wdc.com \
--cc=wqu@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.