nbd: set the max segment size to UINT_MAX
Subsystems (2)
Josef Bacik
maintainerPATCH 1/1 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.
--- drivers/block/nbd.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/block/nbd.c +2 -0
@@ -1469,6 +1469,8 @@ 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 ); + disk->queue->limits.discard_zeroes_data =0 ;blk_queue_max_hw_sectors (disk->queue,65536 ); disk->queue->limits.max_sectors =256 ;
Signature · 1 line
2.7.4
Quoted 3 lines · Josef Bacik
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.
Doesn't apply to the 4.12 branch.
Signature · 1 line
Jens Axboe
Quoted 6 lines · Jens Axboe
Quoted 3 lines · Josef Bacik
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.Doesn't apply to the 4.12 branch.
Maybe it does on top of your previous series. I'll check.
Signature · 1 line
Jens Axboe
Quoted 9 lines · Jens Axboe
Quoted 6 lines · Jens Axboe
Quoted 3 lines · Josef Bacik
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.Doesn't apply to the 4.12 branch.
Maybe it does on top of your previous series. I'll check.
Nope, does not.
Signature · 1 line
Jens Axboe
Quoted 4 lines · Josef Bacik
=20
NBD doesn't care about limiting the segment size, let the user push =
the
Quoted 2 lines
largest bio's they want. This allows us to control the request size solely through
max_sectors_kb.
I'm a bit lost around the various knobs in the kernel for maximum block sizes, but note that the NBD protocol is (with an extension, soon to be made mainstream by the looks of it) capable of negotiating block size minima, maxima and preferred sizes - see here:
=
https://github.com/NetworkBlockDevice/nbd/blob/extension-info/doc/proto.md=
#block-size-constraints
These are server block sizes (obviously) which would normally be passed from userland client to kernel client via an ioctl. I suspect such ioctls may not be implemented at the moment, and kernel support for them would be much appreciated.
--=20
Alex Bligh