diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2015-10-07 16:09:35 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-10-16 16:48:36 +0200 |
commit | 0d9fde4fc8f59a6bd316559d267a936b0737d05a (patch) | |
tree | d359df593de941a87b8e35fed863f295fa38e7f3 /drivers/block/rbd.c | |
parent | 25cb62b76430a91cc6195f902e61c2cb84ade622 (diff) | |
download | linux-stable-0d9fde4fc8f59a6bd316559d267a936b0737d05a.tar.gz linux-stable-0d9fde4fc8f59a6bd316559d267a936b0737d05a.tar.bz2 linux-stable-0d9fde4fc8f59a6bd316559d267a936b0737d05a.zip |
rbd: set max_sectors explicitly
Commit 30e2bc08b2bb ("Revert "block: remove artifical max_hw_sectors
cap"") restored a clamp on max_sectors. It's now 2560 sectors instead
of 1024, but it's not good enough: we set max_hw_sectors to rbd object
size because we don't want object sized I/Os to be split, and the
default object size is 4M.
So, set max_sectors to max_hw_sectors in rbd at queue init time.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index d93a0372b37b..2968b0956bed 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -3760,6 +3760,7 @@ static int rbd_init_disk(struct rbd_device *rbd_dev) /* set io sizes to object size */ segment_size = rbd_obj_bytes(&rbd_dev->header); blk_queue_max_hw_sectors(q, segment_size / SECTOR_SIZE); + q->limits.max_sectors = queue_max_hw_sectors(q); blk_queue_max_segments(q, segment_size / SECTOR_SIZE); blk_queue_max_segment_size(q, segment_size); blk_queue_io_min(q, segment_size); |