@@ -195,12 +195,20 @@ void blk_mq_unfreeze_queue(struct request_queue *q)
EXPORT_SYMBOL_GPL(blk_mq_unfreeze_queue);
/*
- * non_owner variant of blk_freeze_queue_start
+ * non_owner variant of blk_mq_freeze_queue
*
- * Unlike blk_freeze_queue_start, the queue doesn't need to be unfrozen
- * by the same task. This is fragile and should not be used if at all
+ * Unlike blk_mq_freeze_queue, the queue doesn't need to be unfrozen by
+ * the same task. This is fragile and should not be used if at all
* possible.
*/
+void blk_mq_freeze_queue_non_owner(struct request_queue *q)
+{
+ __blk_freeze_queue_start(q);
+ blk_mq_freeze_queue_wait(q);
+}
+EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_non_owner);
+
+/* non_owner variant of blk_freeze_queue_start */
void blk_freeze_queue_start_non_owner(struct request_queue *q)
{
__blk_freeze_queue_start(q);
@@ -919,6 +919,7 @@ void blk_freeze_queue_start(struct request_queue *q);
void blk_mq_freeze_queue_wait(struct request_queue *q);
int blk_mq_freeze_queue_wait_timeout(struct request_queue *q,
unsigned long timeout);
+void blk_mq_freeze_queue_non_owner(struct request_queue *q);
void blk_mq_unfreeze_queue_non_owner(struct request_queue *q);
void blk_freeze_queue_start_non_owner(struct request_queue *q);
Add non_owner variant of blk_mq_freeze_queue API for rbd. Signed-off-by: Ming Lei <ming.lei@redhat.com> --- block/blk-mq.c | 14 +++++++++++--- include/linux/blk-mq.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-)