]> Gentwo Git Trees - linux/.git/commit
btrfs: raid56: prepare set_bio_pages_uptodate() to support bs > ps cases
authorQu Wenruo <wqu@suse.com>
Mon, 17 Nov 2025 03:27:55 +0000 (13:57 +1030)
committerDavid Sterba <dsterba@suse.com>
Tue, 25 Nov 2025 00:47:31 +0000 (01:47 +0100)
commit05ddf35a5d3d8d58323d6353f2bad026e9838af8
tree50b16322665f09d1ccad3cea4a691d821070845c
parent64e7b8c7c5873ad03e108d775fa1c0063a320070
btrfs: raid56: prepare set_bio_pages_uptodate() to support bs > ps cases

The function set_bio_pages_uptodate() assume each fs block can be mapped by
one page, blocking bs > ps support for raid56.

Prepare it for bs > ps cases by:

- Update find_stripe_sector_nr() to check only the first step paddr
  We don't need to check each paddr, as the bios are still aligned to fs
  block size, thus checking the first step is enough.

- Use step size to iterate the bio
  This means we only need to find the sector number for the first step
  of each fs block, and skip the remaining part.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c