]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
nbd: set the max segment size to UINT_MAX
authorJosef Bacik <josef@toxicpanda.com>
Tue, 18 Apr 2017 20:22:51 +0000 (16:22 -0400)
committerJens Axboe <axboe@fb.com>
Wed, 19 Apr 2017 14:16:06 +0000 (08:16 -0600)
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>
drivers/block/nbd.c

index b78f23ce2395e66521624d06741d8e647156d8eb..6e592c2ba8fd0c60c4cc0a3dc1d2e7f74aee7771 100644 (file)
@@ -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;