Skip to content

Commit ebb16d0

Browse files
josefbacikaxboe
authored andcommitted
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 <[email protected]> Reviewed-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 6af3847 commit ebb16d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/block/nbd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,7 @@ static int nbd_dev_add(int index)
14691469
queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, disk->queue);
14701470
disk->queue->limits.discard_granularity = 512;
14711471
blk_queue_max_discard_sectors(disk->queue, UINT_MAX);
1472+
blk_queue_max_segment_size(disk->queue, UINT_MAX);
14721473
blk_queue_max_hw_sectors(disk->queue, 65536);
14731474
disk->queue->limits.max_sectors = 256;
14741475

0 commit comments

Comments
 (0)