@@ -2952,15 +2952,15 @@ scsi_host_block(struct Scsi_Host *shost)
}
}
- /*
- * SCSI never enables blk-mq's BLK_MQ_F_BLOCKING flag so
- * calling synchronize_rcu() once is enough.
- */
- WARN_ON_ONCE(shost->tag_set.flags & BLK_MQ_F_BLOCKING);
-
- if (!ret)
- synchronize_rcu();
+ if (!ret) {
+ shost_for_each_device(sdev, shost) {
+ struct request_queue *q = sdev->request_queue;
+ blk_mq_wait_quiesce_done(q);
+ if (blk_mq_shared_quiesce_wait(q))
+ break;
+ }
+ }
return ret;
}
EXPORT_SYMBOL_GPL(scsi_host_block);
scsi_host_block() calls synchronize_rcu() directly to wait for quiesce done, this way is ugly since it exposes blk-mq quiesce's implementation details. Instead apply blk_mq_wait_quiesce_done() and blk_mq_shared_quiesce_wait() for scsi_host_block(). Signed-off-by: Ming Lei <ming.lei@redhat.com> --- drivers/scsi/scsi_lib.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)