All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: raid56: fully support stripe_len < PAGE_SIZE
@ 2026-10-22  9:39 Qu Wenruo
  2026-10-22  9:39 ` [PATCH 1/3] btrfs: introduce rbio_nr_data_sectors() helper Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Qu Wenruo @ 2026-10-22  9:39 UTC (permalink / raw)
  To: linux-btrfs

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


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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22  9:39 [PATCH 0/3] btrfs: raid56: fully support stripe_len < PAGE_SIZE Qu Wenruo
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

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.