• Qu Wenruo's avatar
    btrfs: make btrfs_verify_data_csum() to return a bitmap · 08508fea
    Qu Wenruo authored
    
    
    This will provide the basis for later per-sector repair for subpage,
    while still keeping the existing code happy.
    
    As if all csums match, the return value will be 0, same as now.
    Only when csum mismatches, the return value is different.
    
    The new return value will be a bitmap, for 4K sectorsize and 4K page
    size, it will be either 1, instead of the -EIO (which is not used
    directly by the callers, no effective change).
    
    But for 4K sectorsize and 64K page size, aka subpage case, since the
    bvec can contain multiple sectors, knowing which sectors are corrupted
    will allow us to submit repair only for corrupted sectors.
    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>
    08508fea
inode.c 297 KB