]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: only require sector size alignment for page read
authorQu Wenruo <wqu@suse.com>
Wed, 21 Oct 2020 06:24:58 +0000 (14:24 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:53:56 +0000 (15:53 +0100)
commitc7b8b51fc81d8bf28c6c7107f8ebc49a05c97aac
tree708e2d3433a343c8631033ecdbcf4c6ac370025d
parent9e6fe77caf4036949b97fa462e3c316df0baa1f3
btrfs: only require sector size alignment for page read

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: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c