From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs: raid56: fully support stripe_len < PAGE_SIZE
Date: Thu, 22 Oct 2026 20:09:26 +1030 [thread overview]
Message-ID: <cover.1792661955.git.wqu@suse.com> (raw)
Previously the variable stripe_len support for RAID56 intentionally
skips the stripe_len < PAGE_SIZE for partial rbio page allocation and
steal.
The reason is that the existing code assumes a stripe_len can never be
smaller than PAGE_SIZE, thus a page can either either data or P/Q
blocks, not both.
But it turns out that the original code is not unnecessarily complex,
especially for steal_rbio().
We can easily calculate the number of pages to steal/allocate without
any special assumption on stripe_len and PAGE_SIZE.
So add back the proper support for steal_rbio() and partial rbio page
allocation, which also slightly cleanup the steal_rbio() related to
helpers.
Qu Wenruo (3):
btrfs: introduce rbio_nr_data_sectors() helper
btrfs: add stripe_len < PAGE_SIZE support for steal_rbio()
btrfs: add stripe_len < PAGE_SIZE support for alloc_rbio_*_pages()
fs/btrfs/raid56.c | 182 +++++++++++++---------------------------------
1 file changed, 51 insertions(+), 131 deletions(-)
--
2.56.0
next reply other threads:[~2026-10-22 9:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 9:39 Qu Wenruo [this message]
2026-10-22 9:39 ` [PATCH 1/3] btrfs: introduce rbio_nr_data_sectors() helper Qu Wenruo
2026-10-26 15:22 ` Johannes Thumshirn
2026-10-22 9:39 ` [PATCH 2/3] btrfs: add stripe_len < PAGE_SIZE support for steal_rbio() Qu Wenruo
2026-10-26 15:33 ` Johannes Thumshirn
2026-10-22 9:39 ` [PATCH 3/3] btrfs: add stripe_len < PAGE_SIZE support for alloc_rbio_*_pages() Qu Wenruo
2026-10-26 15:36 ` Johannes Thumshirn
2026-10-26 20:56 ` Qu Wenruo
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=cover.1792661955.git.wqu@suse.com \
--to=wqu@suse.com \
--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 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.