• Qu Wenruo's avatar
    btrfs: update SCRUB_MAX_PAGES_PER_BLOCK · 0bb3acdc
    Qu Wenruo authored
    Use BTRFS_MAX_METADATA_BLOCKSIZE and SZ_4K (minimal sectorsize) to
    calculate this value.
    
    And remove one stale comment on the value, in fact with recent subpage
    support, BTRFS_MAX_METADATA_BLOCKSIZE * PAGE_SIZE is already beyond
    BTRFS_STRIPE_LEN, just we don't use the full page.
    
    Also since we're here, update the BUG_ON() related to
    SCRUB_MAX_PAGES_PER_BLOCK to ASSERT().
    
    As those ASSERT() are really only for developers to catch early obvious
    bugs, not to let end users suffer.
    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>
    0bb3acdc
scrub.c 114 KB