diff mbox

[2/2] SRP transport, scsi-mq: Wait for .queue_rq() if necessary

Message ID 7c9a22c1-9940-7a8d-a479-c8cc5d274c60@sandisk.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Bart Van Assche Nov. 23, 2016, 12:17 a.m. UTC
Ensure that if scsi-mq is enabled that scsi_internal_device_block()
waits until ongoing shost->hostt->queuecommand() calls have finished.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: James Bottomley <jejb@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Doug Ledford <dledford@redhat.com>
---
 drivers/scsi/scsi_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bart Van Assche Dec. 16, 2016, 12:39 p.m. UTC | #1
On 11/23/2016 01:17 AM, Bart Van Assche wrote:
> Ensure that if scsi-mq is enabled that scsi_internal_device_block()
> waits until ongoing shost->hostt->queuecommand() calls have finished.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
> Cc: James Bottomley <jejb@linux.vnet.ibm.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Doug Ledford <dledford@redhat.com>
> ---
>  drivers/scsi/scsi_lib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 84c9e61..11d082d 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -2872,7 +2872,7 @@ scsi_internal_device_block(struct scsi_device *sdev)
>  	 * request queue. 
>  	 */
>  	if (q->mq_ops) {
> -		blk_mq_stop_hw_queues(q);
> +		blk_mq_quiesce_queue(q);
>  	} else {
>  		spin_lock_irqsave(q->queue_lock, flags);
>  		blk_stop_queue(q);
> 

Hello Martin,

It seems like patch 1/2 of this series is already present in Linus' tree
but patch 2/2 not yet? Can you queue this patch for the next pull
request that will be sent to Linus?

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin K. Petersen Dec. 20, 2016, 10:14 p.m. UTC | #2
>>>>> "Bart" == Bart Van Assche <bart.vanassche@gmail.com> writes:

Bart> It seems like patch 1/2 of this series is already present in
Bart> Linus' tree but patch 2/2 not yet? Can you queue this patch for
Bart> the next pull request that will be sent to Linus?

Applied to 4.10/scsi-fixes.
diff mbox

Patch

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 84c9e61..11d082d 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2872,7 +2872,7 @@  scsi_internal_device_block(struct scsi_device *sdev)
 	 * request queue. 
 	 */
 	if (q->mq_ops) {
-		blk_mq_stop_hw_queues(q);
+		blk_mq_quiesce_queue(q);
 	} else {
 		spin_lock_irqsave(q->queue_lock, flags);
 		blk_stop_queue(q);