* [PATCH] nbd: set the max segment size to UINT_MAX
@ 2017-04-18 20:22 Josef Bacik
2017-04-19 0:54 ` Ming Lei
2017-04-19 14:16 ` Jens Axboe
0 siblings, 2 replies; 7+ messages in thread
From: Josef Bacik @ 2017-04-18 20:22 UTC (permalink / raw)
To: axboe, nbd-general, linux-block, kernel-team
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 | 1 +
1 file changed, 1 insertion(+)
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;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] nbd: set the max segment size to UINT_MAX
2017-04-18 20:22 [PATCH] nbd: set the max segment size to UINT_MAX Josef Bacik
@ 2017-04-19 0:54 ` Ming Lei
2017-04-19 14:16 ` Jens Axboe
1 sibling, 0 replies; 7+ messages in thread
From: Ming Lei @ 2017-04-19 0:54 UTC (permalink / raw)
To: Josef Bacik
Cc: Jens Axboe, nbd-general@lists.sourceforge.net, linux-block,
FB Kernel Team
On Wed, Apr 19, 2017 at 4:22 AM, 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.
>
> Signed-off-by: Josef Bacik <jbacik@fb.com>
> ---
> drivers/block/nbd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
The change is fine, since the segment size limit should be from hw itself.
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Thanks,
Ming Lei
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] nbd: set the max segment size to UINT_MAX
2017-04-18 20:22 [PATCH] nbd: set the max segment size to UINT_MAX Josef Bacik
2017-04-19 0:54 ` Ming Lei
@ 2017-04-19 14:16 ` Jens Axboe
1 sibling, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2017-04-19 14:16 UTC (permalink / raw)
To: Josef Bacik, axboe, nbd-general, linux-block, kernel-team
On 04/18/2017 02:22 PM, 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.
Thanks Josef, applied for 4.12.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] nbd: set the max segment size to UINT_MAX
@ 2017-04-17 13:44 Josef Bacik
2017-04-17 15:55 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Josef Bacik @ 2017-04-17 13:44 UTC (permalink / raw)
To: axboe, nbd-general, linux-block, kernel-team
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(+)
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;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] nbd: set the max segment size to UINT_MAX
2017-04-17 13:44 Josef Bacik
@ 2017-04-17 15:55 ` Jens Axboe
2017-04-17 15:57 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2017-04-17 15:55 UTC (permalink / raw)
To: Josef Bacik, axboe, nbd-general, linux-block, kernel-team
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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] nbd: set the max segment size to UINT_MAX
2017-04-17 15:55 ` Jens Axboe
@ 2017-04-17 15:57 ` Jens Axboe
2017-04-17 15:59 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2017-04-17 15:57 UTC (permalink / raw)
To: Josef Bacik, axboe, nbd-general, linux-block, kernel-team
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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] nbd: set the max segment size to UINT_MAX
2017-04-17 15:57 ` Jens Axboe
@ 2017-04-17 15:59 ` Jens Axboe
0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2017-04-17 15:59 UTC (permalink / raw)
To: Josef Bacik, axboe, nbd-general, linux-block, kernel-team
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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-04-19 14:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-18 20:22 [PATCH] nbd: set the max segment size to UINT_MAX Josef Bacik
2017-04-19 0:54 ` Ming Lei
2017-04-19 14:16 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2017-04-17 13:44 Josef Bacik
2017-04-17 15:55 ` Jens Axboe
2017-04-17 15:57 ` Jens Axboe
2017-04-17 15:59 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox