From: Josef Bacik Date: Tue, 18 Apr 2017 20:22:51 +0000 (-0400) Subject: nbd: set the max segment size to UINT_MAX X-Git-Tag: v4.14-rc1~1015^2~127 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebb16d0d1b326c252fef9f339a7322ee44ed104f;p=platform%2Fkernel%2Flinux-rpi3.git 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 Reviewed-by: Ming Lei Signed-off-by: Jens Axboe --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index b78f23c..6e592c2 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;