]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: subpage: make readahead work properly
authorQu Wenruo <wqu@suse.com>
Mon, 15 Mar 2021 05:39:15 +0000 (13:39 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 16 Mar 2021 10:06:21 +0000 (11:06 +0100)
commitf242b17826d407be4f7a411a1b8adcf2334b3e6c
treed9fd8b21118ecfb047beb71c427fec8cffe0d475
parent59b80120ad3455db2ee1c673a603d38cec8cef7e
btrfs: subpage: make readahead work properly

In readahead infrastructure, we are using a lot of hard coded PAGE_SHIFT
while we're not doing anything specific to PAGE_SIZE.

One of the most affected part is the radix tree operation of
btrfs_fs_info::reada_tree.

If using PAGE_SHIFT, subpage metadata readahead is broken and does no
help reading metadata ahead.

Fix the problem by using btrfs_fs_info::sectorsize_bits so that
readahead could work for subpage.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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/reada.c