]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
btrfs: raid56: extract scrub read bio list assembly code into a helper
authorQu Wenruo <wqu@suse.com>
Tue, 1 Nov 2022 11:16:10 +0000 (19:16 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:49 +0000 (18:00 +0100)
commitcb3450b7d7d0af6ed6ff60e174129938914083ab
treeab42b2c210dd7e731d391789d4d05d56f508f7e3
parent93723095b5d54b923abf07459998bcb9bbac8ba6
btrfs: raid56: extract scrub read bio list assembly code into a helper

Just like what we did for write/recovery, also extract the read bio
assembly code into a helper for scrub.

The difference between the three are:

- rmw_assemble_read_bios() only submit reads for missing sectors
  Thus it will skip cached sectors, but will also read sectors which
  is not covered by any full stripe. (For cache usage)

- recover_assemble_read_bios() reads every sector which has not failed

- scrub_assemble_read_bios() has extra check for vertical stripes
  It's mostly the same as rmw_assemble_read_bios(), but will skip
  sectors which is not covered by a vertical stripe.

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