]> git.baikalelectronics.ru Git - kernel.git/commit
block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fri, 28 Feb 2020 14:51:48 +0000 (17:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:01 +0000 (10:50 +0200)
commit46515096a66ba54b88945ba24d3f3c932c44596a
tree3d40e9e2140cfdfc9b7d2b53fbc9e72644639a85
parent301717354c8df9b766a68445c74ea1dc2196c59a
block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices

[ Upstream commit 0ad03e39fbfa7aaa652961dc64fd6ff3d8161e1a ]

Field bdi->io_pages added in commit 22cebe959493 ("mm: don't cap request
size based on read-ahead setting") removes unneeded split of read requests.

Stacked drivers do not call blk_queue_max_hw_sectors(). Instead they set
limits of their devices by blk_set_stacking_limits() + disk_stack_limits().
Field bio->io_pages stays zero until user set max_sectors_kb via sysfs.

This patch updates io_pages after merging limits in disk_stack_limits().

Commit 6fe5e94f5cac ("dm: do not allow readahead to limit IO size") fixed
the same problem for device-mapper devices, this one fixes MD RAIDs.

Fixes: 22cebe959493 ("mm: don't cap request size based on read-ahead setting")
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/blk-settings.c