From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "hare@suse.de" <hare@suse.de>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "hch@lst.de" <hch@lst.de>,
"james.bottomley@hansenpartnership.com"
<james.bottomley@hansenpartnership.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"jth@kernel.org" <jth@kernel.org>,
"hare@suse.com" <hare@suse.com>
Subject: Re: [PATCH] scsi: mq queue stall during command requeue
Date: Thu, 19 Jan 2017 16:11:56 +0000 [thread overview]
Message-ID: <1484842302.2634.3.camel@sandisk.com> (raw)
In-Reply-To: <1484835465-66514-1-git-send-email-hare@suse.de>
On Thu, 2017-01-19 at 15:17 +0100, Hannes Reinecke wrote:
> When we're hitting a busy condition in queuecommand() we need to
> stop the hardware queue before calling blk_mq_delay_queue(); if
> we don't blk_mq_delay_queue() will not do anything and requeue
> will never triggered.
>
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
> drivers/scsi/scsi_lib.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index e9e1e14..4b1cbc6 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1951,8 +1951,10 @@ static int scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
> switch (ret) {
> case BLK_MQ_RQ_QUEUE_BUSY:
> if (atomic_read(&sdev->device_busy) == 0 &&
> - !scsi_device_blocked(sdev))
> + !scsi_device_blocked(sdev)) {
> + blk_mq_stop_hw_queue(hctx);
> blk_mq_delay_queue(hctx, SCSI_QUEUE_DELAY);
> + }
> break;
> case BLK_MQ_RQ_QUEUE_ERROR:
> /*
You may want to add Fixes: 52d7f1b5c2f3 (blk-mq: Avoid that requeueing
starts stopped queues). See also
https://www.spinics.net/lists/linux-block/msg06144.html.
Bart.
next prev parent reply other threads:[~2017-01-19 16:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 14:17 [PATCH] scsi: mq queue stall during command requeue Hannes Reinecke
2017-01-19 14:46 ` Christoph Hellwig
2017-01-19 14:52 ` Hannes Reinecke
2017-01-19 14:58 ` Jens Axboe
2017-01-19 15:12 ` Christoph Hellwig
2017-01-19 16:11 ` Bart Van Assche [this message]
2017-01-20 7:24 ` Hannes Reinecke
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=1484842302.2634.3.camel@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=jth@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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).