The Linux Kernel Mailing List
 help / color / mirror / Atom feed
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>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] btrfs: zoned: RAID1 block groups with missing or stale stripes
Date: Thu, 19 Nov 2026 21:38:31 +0000	[thread overview]
Message-ID: <20261119213835.103131-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, and on a
degraded mount any stripe can be behind the others.

1/4 compares the active state with the first present stripe, as with
stripe 0 missing such block groups were left off the active list and
could hang writes. 2/4 allocates from the highest write pointer on
degraded mounts, as stripe 0's can be behind and new extents then went
over committed ones, and lets a regular mount load a block group whose
stripe 0 is on an offline or read-only zone. 3/4 takes the zone capacity
from the other stripes when stripes 0 and 1 are missing, as RAID1C3 and
RAID1C4 block groups failed to load then. 4/4 adds self-test cases.

Miroslav Cimerman (4):
  btrfs: zoned: take the RAID1 active state from the first present
    stripe
  btrfs: zoned: use the highest RAID1 write pointer on degraded mounts
  btrfs: zoned: take the RAID1 zone capacity from a present stripe
  btrfs: tests: zoned: add degraded RAID1 cases

 fs/btrfs/tests/zoned-tests.c | 82 +++++++++++++++++++++++++++++++++++-
 fs/btrfs/zoned.c             | 50 +++++++++++++++++-----
 2 files changed, 120 insertions(+), 12 deletions(-)


base-commit: 04c9eb073c7c02bf041948ca35b3d8b3ef582974
-- 
2.53.0


             reply	other threads:[~2026-11-19 21:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 21:38 Miroslav Cimerman [this message]
2026-11-19 21:38 ` [PATCH 1/4] btrfs: zoned: take the RAID1 active state from the first present stripe Miroslav Cimerman
2026-11-19 21:38 ` [PATCH 2/4] btrfs: zoned: use the highest RAID1 write pointer on degraded mounts Miroslav Cimerman
2026-11-19 21:38 ` [PATCH 3/4] btrfs: zoned: take the RAID1 zone capacity from a present stripe Miroslav Cimerman
2026-11-19 21:38 ` [PATCH 4/4] btrfs: tests: zoned: add degraded RAID1 cases 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=20261119213835.103131-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 \
    /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