• Qu Wenruo's avatar
    btrfs: only require sector size alignment for page read · 8b8bbd46
    Qu Wenruo authored
    If we're reading partial page, btrfs will warn about this as read/write
    is always done in sector size, which now equals page size.
    
    But for the upcoming subpage read-only support, our data read is only
    aligned to sectorsize, which can be smaller than page size.
    
    Thus here we change the warning condition to check it against
    sectorsize, the behavior is not changed for regular sectorsize ==
    PAGE_SIZE case, and won't report error for subpage read.
    
    Also, pass the proper start/end with bv_offset for check_data_csum() to
    handle.
    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>
    8b8bbd46
extent_io.c 157 KB