summaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2017-04-20 21:47:01 +0200
committerJens Axboe <axboe@fb.com>2017-04-21 03:53:24 +0200
commit1cc1f17aab7e596d0a7373fc1ed11dbddfa82bc9 (patch)
tree49992c745eb4b25f4e6e2831ddcf3e6784b9e33f /drivers/block/nbd.c
parentblk-mq: Remove blk_mq_sched_move_to_dispatch() (diff)
downloadlinux-1cc1f17aab7e596d0a7373fc1ed11dbddfa82bc9.tar.xz
linux-1cc1f17aab7e596d0a7373fc1ed11dbddfa82bc9.zip
nbd: set the max segments to USHRT_MAX
I lack the basic understanding of what segments mean, so we were being limited to 512kib requests even with higher max_sectors sizes set. Setting the maximum number of segments to unlimited allows us to actually have arbitrarily large IO's go through NBD. Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r--drivers/block/nbd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index d387bef07fcc..5583dc4ff941 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -1470,6 +1470,7 @@ static int nbd_dev_add(int index)
disk->queue->limits.discard_granularity = 512;
blk_queue_max_discard_sectors(disk->queue, UINT_MAX);
blk_queue_max_segment_size(disk->queue, UINT_MAX);
+ blk_queue_max_segments(disk->queue, USHRT_MAX);
blk_queue_max_hw_sectors(disk->queue, 65536);
disk->queue->limits.max_sectors = 256;