Skip to content

btrfs: raid56: fully support stripe_len < PAGE_SIZE

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: introduce rbio_nr_data_sectors() helperfs/btrfs/raid56.c+16 -111 reply
2/3btrfs: add stripe_len < PAGE_SIZE support for steal_rbio()fs/btrfs/raid56.c+23 -1041 reply
3/3btrfs: add stripe_len < PAGE_SIZE support for alloc_rbio_*_pages()fs/btrfs/raid56.c+13 -172 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchJohannes Thumshirn
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs: raid56: fully support stripe_len < PAGE_SIZE

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(-)
Signature · 1 line
2.56.0