scsi: scsi-mq: Wait for .queue_rq() if necessary
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> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
d2a145252c
commit
7dbbf0fa1b
@ -2893,7 +2893,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);
|
||||
|
Loading…
Reference in New Issue
Block a user