public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] btrfs: zoned: don't zone append to conventional zone
@ 2025-12-04 12:42 Johannes Thumshirn
  2025-12-04 12:42 ` [PATCH v3 1/5] " Johannes Thumshirn
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Johannes Thumshirn @ 2025-12-04 12:42 UTC (permalink / raw)
  To: linux-btrfs
  Cc: Christoph Hellwig, Naohiro Aota, Qu Wenruo, Johannes Thumshirn

When in a zoned mirrored RAID setup a block-group is backed by a
conventional and a sequential write required zone, btrfs will write the
data using REQ_OP_ZONE_APPEND. As this is illegal an ASSERT() in
btrfs_submit_dev_bio() will catch it beforehand.

Fix it by only setting REQ_OP_ZONE_APPEND btrfs_submit_dev_bio() if the
actual zone is a sequential write required zone.

To avoid multiple block-group lookups, cache the ability to use zone
append in btrfs_bio.

Afterwards convert the sprinkled booleans in btrfs_bio into a 'flags'
member and set them accordingly. This is deliberately done after the fix
to ease potential backporting.

Changes to v2:
- Rename to can_use_append
- Add patches to move booleans into new flags member

Johannes Thumshirn (5):
  btrfs: zoned: don't zone append to conventional zone
  btrfs: move btrfs_bio::csum_search_commit_root into flags
  btrfs: move btrfs_bio::is_scrub into flags
  btrfs: move btrfs_bio::async_csum into flags
  btrfs: move btrfs_bio::can_use_append into flags

 fs/btrfs/bio.c         | 32 ++++++++++++++++++--------------
 fs/btrfs/bio.h         | 24 +++++++++++++-----------
 fs/btrfs/compression.c |  4 +++-
 fs/btrfs/extent_io.c   |  7 ++++---
 fs/btrfs/file-item.c   |  8 ++++----
 fs/btrfs/scrub.c       |  2 +-
 6 files changed, 43 insertions(+), 34 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-01-26 20:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04 12:42 [PATCH v3 0/5] btrfs: zoned: don't zone append to conventional zone Johannes Thumshirn
2025-12-04 12:42 ` [PATCH v3 1/5] " Johannes Thumshirn
2025-12-04 13:04   ` Christoph Hellwig
2025-12-09  2:42   ` Naohiro Aota
2026-01-25 13:12   ` Chris Mason
2026-01-26  7:51     ` Johannes Thumshirn
2026-01-26 20:16       ` Chris Mason
2025-12-04 12:42 ` [PATCH v3 2/5] btrfs: move btrfs_bio::csum_search_commit_root into flags Johannes Thumshirn
2025-12-04 13:30   ` Filipe Manana
2025-12-04 18:04     ` Johannes Thumshirn
2025-12-04 22:11   ` Qu Wenruo
2025-12-05  6:39     ` Johannes Thumshirn
2025-12-05  7:07       ` Qu Wenruo
2025-12-05  7:08         ` Johannes Thumshirn
2025-12-04 12:42 ` [PATCH v3 3/5] btrfs: move btrfs_bio::is_scrub " Johannes Thumshirn
2025-12-04 12:42 ` [PATCH v3 4/5] btrfs: move btrfs_bio::async_csum " Johannes Thumshirn
2025-12-04 12:42 ` [PATCH v3 5/5] btrfs: move btrfs_bio::can_use_append " Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox