[PATCH] blk-mq: clarify blk_mq_quiesce_queue_nowait() comment

kensanya@163.com posted 1 patch 6 days, 2 hours ago
block/blk-mq.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
[PATCH] blk-mq: clarify blk_mq_quiesce_queue_nowait() comment
Posted by kensanya@163.com 6 days, 2 hours ago
From: TanZheng <tanzheng@kylinos.cn>

The FIXME added in 2017 suggested removing this function once mpt3sas
stopped using scsi_internal_device_*block_nowait().  That is no longer
accurate: blk_mq_quiesce_queue_nowait() is now a fundamental building
block used by blk_mq_quiesce_queue(), blk_mq_quiesce_tagset(),
scsi_host_block() and others for batched quiesce without sleeping per
queue.Replace the FIXME with a comment.

Signed-off-by: TanZheng <tanzheng@kylinos.cn>
---
 block/blk-mq.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index a24175441380..b9a96d922baf 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -255,8 +255,14 @@ void blk_mq_unfreeze_queue_non_owner(struct request_queue *q)
 EXPORT_SYMBOL_GPL(blk_mq_unfreeze_queue_non_owner);
 
 /*
- * FIXME: replace the scsi_internal_device_*block_nowait() calls in the
- * mpt3sas driver such that this function can be removed.
+ * Mark a request queue as quiesced without waiting for in-flight dispatches
+ * to finish.  Callers that need to ensure dispatch has drained must follow
+ * this with blk_mq_wait_quiesce_done() on the queue's tag_set, or use
+ * blk_mq_quiesce_queue() which combines both steps.
+ *
+ * This split exists so multiple queues (e.g. all LUNs on a SCSI host, or all
+ * queues in a tag_set) can be quiesced without sleeping per queue, then
+ * waited on once at tag_set scope.
  */
 void blk_mq_quiesce_queue_nowait(struct request_queue *q)
 {
-- 
2.25.1