Skip to content

Commit

Permalink
btrfs: scrub: move logical/physical/dev/mirror_num from scrub_sector …
Browse files Browse the repository at this point in the history
…to scrub_block

Currently we store the following members in scrub_sector:

- logical
- physical
- physical_for_dev_replace
- dev
- mirror_num

However the current scrub code has ensured that scrub_blocks never cross
stripe boundary.
This is caused by the entry functions (scrub_simple_mirror,
scrub_simple_stripe), thus every scrub_block will not cross stripe
boundary.

Thus this makes it possible to move those members into scrub_block other
than putting them into scrub_sector.

This should save quite some memory, as a scrub_block can be as large as 64
sectors, even for metadata it's 16 sectors byte default.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Qu Wenruo authored and David Sterba committed Sep 26, 2022
1 parent eb2fad3 commit 8686c40
Showing 1 changed file with 92 additions and 73 deletions.
Loading

0 comments on commit 8686c40

Please sign in to comment.