summaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorJosef Bacik2017-04-18 22:22:51 +0200
committerJens Axboe2017-04-19 16:16:06 +0200
commitebb16d0d1b326c252fef9f339a7322ee44ed104f (patch)
tree206d26bf0409d9bec425920f531da67bb659f9c4 /drivers/block/nbd.c
parentMerge branch 'stable/for-jens-4.12' of git://git.kernel.org/pub/scm/linux/ker... (diff)
downloadkernel-qcow2-linux-ebb16d0d1b326c252fef9f339a7322ee44ed104f.tar.gz
kernel-qcow2-linux-ebb16d0d1b326c252fef9f339a7322ee44ed104f.tar.xz
kernel-qcow2-linux-ebb16d0d1b326c252fef9f339a7322ee44ed104f.zip
nbd: set the max segment size to UINT_MAX
NBD doesn't care about limiting the segment size, let the user push the largest bio's they want. This allows us to control the request size solely through max_sectors_kb. Signed-off-by: Josef Bacik <jbacik@fb.com> Reviewed-by: Ming Lei <ming.lei@redhat.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 b78f23ce2395..6e592c2ba8fd 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -1469,6 +1469,7 @@ static int nbd_dev_add(int index)
queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, disk->queue);
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_hw_sectors(disk->queue, 65536);
disk->queue->limits.max_sectors = 256;