]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: set max_segments to USHRT_MAX
authorIlya Dryomov <idryomov@gmail.com>
Thu, 21 Dec 2017 14:35:11 +0000 (15:35 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 9 Jan 2018 16:40:48 +0000 (17:40 +0100)
commit7c96ee68ccd5f6a35bffef07b7ea52b605801bf0
tree237bd2ed3d14ea13bef18f86874023c0c23893cc
parent2df5a83e584777c5b32b21b515687816b7504701
rbd: set max_segments to USHRT_MAX

Commit cad62a07cee1 ("rbd: bump queue_max_segments") bumped
max_segments (unsigned short) to max_hw_sectors (unsigned int).
max_hw_sectors is set to the number of 512-byte sectors in an object
and overflows unsigned short for 32M (largest possible) objects, making
the block layer resort to handing us single segment (i.e. single page
or even smaller) bios in that case.

Cc: stable@vger.kernel.org
Fixes: cad62a07cee1 ("rbd: bump queue_max_segments")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/block/rbd.c