From: Josef Bacik <josef@toxicpanda.com>
To: axboe@kernel.dk, nbd-general@lists.sourceforge.net,
linux-block@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH] nbd: set the max segment size to UINT_MAX
Date: Mon, 17 Apr 2017 09:44:37 -0400 [thread overview]
Message-ID: <1492436677-11209-1-git-send-email-jbacik@fb.com> (raw)
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
next reply other threads:[~2017-04-17 13:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-17 13:44 Josef Bacik [this message]
2017-04-17 15:55 ` [PATCH] nbd: set the max segment size to UINT_MAX Jens Axboe
2017-04-17 15:57 ` Jens Axboe
2017-04-17 15:59 ` Jens Axboe
2017-04-17 21:46 ` [Nbd] " Alex Bligh
-- strict thread matches above, loose matches on Subject: below --
2017-04-18 20:22 Josef Bacik
2017-04-19 0:54 ` Ming Lei
2017-04-19 14:16 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492436677-11209-1-git-send-email-jbacik@fb.com \
--to=josef@toxicpanda.com \
--cc=axboe@kernel.dk \
--cc=kernel-team@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=nbd-general@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox