From: Josef Bacik <jbacik@fb.com>
To: <axboe@kernel.dk>, <nbd-general@lists.sourceforge.net>,
<linux-block@vger.kernel.org>, <kernel-team@fb.com>
Subject: [PATCH 4/6] nbd: set queue timeout properly
Date: Tue, 28 Feb 2017 11:57:09 -0500 [thread overview]
Message-ID: <1488301031-3199-5-git-send-email-jbacik@fb.com> (raw)
In-Reply-To: <1488301031-3199-1-git-send-email-jbacik@fb.com>
We can't just set the timeout on the tagset, we have to set it on the
queue as it would have been setup already at this point.
Signed-off-by: Josef Bacik <jbacik@fb.com>
---
drivers/block/nbd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 059c80a..ac5a03a 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -909,7 +909,10 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
nbd_size_set(nbd, nbd->blksize, arg);
return 0;
case NBD_SET_TIMEOUT:
- nbd->tag_set.timeout = arg * HZ;
+ if (arg) {
+ nbd->tag_set.timeout = arg * HZ;
+ blk_queue_rq_timeout(nbd->disk->queue, arg * HZ);
+ }
return 0;
case NBD_SET_FLAGS:
--
2.7.4
next prev parent reply other threads:[~2017-02-28 16:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 16:57 [PATCH 0/6] Lots of NBD fixes and enhancements Josef Bacik
2017-02-28 16:57 ` [PATCH 1/6] nbd: handle single path failures gracefully Josef Bacik
2017-02-28 16:57 ` [PATCH 2/6] nbd: ref count the nbd device Josef Bacik
2017-02-28 16:57 ` [PATCH 3/6] nbd: stop using the bdev everywhere Josef Bacik
2017-02-28 16:57 ` Josef Bacik [this message]
2017-02-28 16:57 ` [PATCH 5/6] nbd: handle ERESTARTSYS properly Josef Bacik
2017-02-28 16:57 ` [PATCH 6/6] nbd: add a basic netlink interface Josef Bacik
2017-03-08 10:07 ` [Nbd] " Wouter Verhelst
2017-03-08 14:56 ` Josef Bacik
2017-03-08 20:44 ` Wouter Verhelst
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=1488301031-3199-5-git-send-email-jbacik@fb.com \
--to=jbacik@fb.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