Message ID | 1492436677-11209-1-git-send-email-jbacik@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 04/17/2017 07:44 AM, Josef Bacik wrote: > 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.
On 04/17/2017 09:55 AM, Jens Axboe wrote: > On 04/17/2017 07:44 AM, Josef Bacik wrote: >> 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.
On 04/17/2017 09:57 AM, Jens Axboe wrote: > On 04/17/2017 09:55 AM, Jens Axboe wrote: >> On 04/17/2017 07:44 AM, Josef Bacik wrote: >>> 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.
> On Apr 17, 2017, at 11:59 AM, Jens Axboe <axboe@fb.com> wrote: > > On 04/17/2017 09:57 AM, Jens Axboe wrote: >> On 04/17/2017 09:55 AM, Jens Axboe wrote: >>> On 04/17/2017 07:44 AM, Josef Bacik wrote: >>>> 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. Sorry I'll rebase onto the latest 4.12 branch, it was based on whatever 4.12 was two weeks ago + my nbd series. Thanks, Josef
> On 17 Apr 2017, at 15:44, Josef Bacik <josef@toxicpanda.com> wrote: > > 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. 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.
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index d220045..0f62d86 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -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;
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> --- drivers/block/nbd.c | 2 ++ 1 file changed, 2 insertions(+)