From: Mike Christie <mchristi@redhat.com>
To: josef@toxicpanda.com, linux-block@vger.kernel.org
Subject: Re: [PATCH 1/4] nbd: add set cmd timeout helper
Date: Fri, 9 Aug 2019 16:32:09 -0500 [thread overview]
Message-ID: <5D4DE659.5050909@redhat.com> (raw)
In-Reply-To: <20190809212610.19412-2-mchristi@redhat.com>
On 08/09/2019 04:26 PM, Mike Christie wrote:
>
> +static void nbd_set_cmd_timeout(struct nbd_device *nbd, u64 timeout)
> +{
> + nbd->tag_set.timeout = timeout * HZ;
> + blk_queue_rq_timeout(nbd->disk->queue, timeout * HZ);
> +}
> +
> /* Must be called with config_lock held */
> static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
> unsigned int cmd, unsigned long arg)
> @@ -1275,10 +1281,8 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
> nbd_size_set(nbd, config->blksize, arg);
> return 0;
> case NBD_SET_TIMEOUT:
> - if (arg) {
> - nbd->tag_set.timeout = arg * HZ;
> - blk_queue_rq_timeout(nbd->disk->queue, arg * HZ);
> - }
> + if (arg)
> + nbd_set_cmd_timeout(nbd, arg);
> return 0;
Josef,
These patches still leave one regression where you used to be able to
disable the timer after it has already been set. My patches did not fix
that yet. I will fix it on the resend after you give me your comments.
next prev parent reply other threads:[~2019-08-09 21:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 21:26 [PATCH 0/4] nbd: cmd timeout fixes Mike Christie
2019-08-09 21:26 ` [PATCH 1/4] nbd: add set cmd timeout helper Mike Christie
2019-08-09 21:32 ` Mike Christie [this message]
2019-08-13 13:11 ` Josef Bacik
2019-08-09 21:26 ` [PATCH 2/4] nbd: add function to convert blk req op to nbd cmd Mike Christie
2019-08-13 13:11 ` Josef Bacik
2019-08-09 21:26 ` [PATCH 3/4] nbd: add missing config put Mike Christie
2019-08-13 13:11 ` Josef Bacik
2019-08-09 21:26 ` [PATCH 4/4] nbd: fix zero cmd timeout handling Mike Christie
2019-08-13 13:13 ` Josef Bacik
2019-08-13 15:45 ` Mike Christie
2019-08-13 15:54 ` Mike Christie
2019-08-13 15:59 ` Mike Christie
2019-08-13 16:15 ` Josef Bacik
2019-08-13 16:39 [PATCH 0/4] nbd: cmd timeout fixes V2 Mike Christie
2019-08-13 16:39 ` [PATCH 1/4] nbd: add set cmd timeout helper Mike Christie
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=5D4DE659.5050909@redhat.com \
--to=mchristi@redhat.com \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).