Re: [PATCH] scsi: mq queue stall during command requeue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> ---
>  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.--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux