Home
last modified time | relevance | path

Searched hist:eb3570607c8c7c9263005c47c71edeb12fc9fbcd (Results 1 – 1 of 1) sorted by relevance

/linux/fs/btrfs/
H A Draid56.cdiff eb3570607c8c7c9263005c47c71edeb12fc9fbcd Fri Apr 01 13:23:19 CEST 2022 Qu Wenruo <wqu@suse.com> btrfs: raid56: introduce btrfs_raid_bio::stripe_sectors

The new member is an array of sector_ptr pointers, they will represent
all sectors inside a full stripe (including P/Q).

They co-operate with btrfs_raid_bio::stripe_pages:

stripe_pages: | Page 0, range [0, 64K) | Page 1 ...
stripe_sectors: | | | ... | |
| | \- sector 15, page 0, pgoff=60K
| \- sector 1, page 0, pgoff=4K
\---- sector 0, page 0, pfoff=0

With such structure, we can represent subpage sectors without using
extra pages.

Here we introduce a new helper, index_stripe_sectors(), to update
stripe_sectors[] to point to correct page and pgoff.

So every time rbio::stripe_pages[] pointer gets updated, the new helper
should be called.

The following functions have to call the new helper:

- steal_rbio()
- alloc_rbio_pages()
- alloc_rbio_parity_pages()
- alloc_rbio_essential_pages()

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>