• Qu Wenruo's avatar
    btrfs: scrub: remove the old scrub recheck code · e9255d6c
    Qu Wenruo authored
    The old scrub code has different entrance to verify the content, and
    since we have removed the writeback path, now we can start removing the
    re-check part, including:
    
    - scrub_recover structure
    - scrub_sector::recover member
    - function scrub_setup_recheck_block()
    - function scrub_recheck_block()
    - function scrub_recheck_block_checksum()
    - function scrub_repair_block_group_good_copy()
    - function scrub_repair_sector_from_good_copy()
    - function scrub_is_page_on_raid56()
    
    - function full_stripe_lock()
    - function search_full_stripe_lock()
    - function get_full_stripe_logical()
    - function insert_full_stripe_lock()
    - function lock_full_stripe()
    - function unlock_full_stripe()
    - btrfs_block_group::full_stripe_locks_root member
    - btrfs_full_stripe_locks_tree structure
      This infrastructure is to ensure RAID56 scrub is properly handling
      recovery and P/Q scrub correctly.
    
      This is no longer needed, before P/Q scrub we will wait for all
      the involved data stripes to be scrubbed first, and RAID56 code has
      internal lock to ensure no race in the same full stripe.
    
    - function scrub_print_warning()
    - function scrub_get_recover()
    - function scrub_put_recover()
    - function scrub_handle_errored_block()
    - function scrub_setup_recheck_block()
    - function scrub_bio_wait_endio()
    - function scrub_submit_raid56_bio_wait()
    - function scrub_recheck_block_on_raid56()
    - function scrub_recheck_block()
    - function scrub_recheck_block_checksum()
    - function scrub_repair_block_from_good_copy()
    - function scrub_repair_sector_from_good_copy()
    
    And two more functions exported temporarily for later cleanup:
    
    - alloc_scrub_sector()
    - alloc_scrub_block()
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    e9255d6c
block-group.c 131 KB