linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 1/2] blk-mq: Export blk_mq_freeze_queue_wait
@ 2017-02-24  0:36 Keith Busch
  2017-02-24  0:36 ` [PATCHv2 2/2] nvme: Complete all stuck requests Keith Busch
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Keith Busch @ 2017-02-24  0:36 UTC (permalink / raw)
  To: linux-block, linux-nvme, Jens Axboe, Christoph Hellwig,
	Sagi Grimberg
  Cc: Marc MERLIN, Keith Busch

Drivers can start a freeze, so this provides a way to wait for frozen.

Signed-off-by: Keith Busch <keith.busch@intel.com>
---
 block/blk-mq.c         | 3 ++-
 include/linux/blk-mq.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 9e6b064..d5b9a15 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -75,10 +75,11 @@ void blk_mq_freeze_queue_start(struct request_queue *q)
 }
 EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_start);
 
-static void blk_mq_freeze_queue_wait(struct request_queue *q)
+void blk_mq_freeze_queue_wait(struct request_queue *q)
 {
 	wait_event(q->mq_freeze_wq, percpu_ref_is_zero(&q->q_usage_counter));
 }
+EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_wait);
 
 /*
  * Guarantee no request is in use, so we can change any data structure of
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 001d30d..8dacf68 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -245,6 +245,7 @@ void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset,
 void blk_mq_freeze_queue(struct request_queue *q);
 void blk_mq_unfreeze_queue(struct request_queue *q);
 void blk_mq_freeze_queue_start(struct request_queue *q);
+void blk_mq_freeze_queue_wait(struct request_queue *q);
 int blk_mq_reinit_tagset(struct blk_mq_tag_set *set);
 
 int blk_mq_map_queues(struct blk_mq_tag_set *set);
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-03-01  8:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-24  0:36 [PATCHv2 1/2] blk-mq: Export blk_mq_freeze_queue_wait Keith Busch
2017-02-24  0:36 ` [PATCHv2 2/2] nvme: Complete all stuck requests Keith Busch
2017-02-24  6:50   ` Christoph Hellwig
2017-02-27 13:46   ` Sagi Grimberg
2017-02-27 15:01     ` Keith Busch
2017-02-27 17:27       ` Sagi Grimberg
2017-02-27 19:15         ` Keith Busch
2017-02-28  7:42           ` Artur Paszkiewicz
2017-02-28 11:45             ` Sagi Grimberg
2017-02-28 16:57             ` Keith Busch
2017-03-01  8:54               ` Artur Paszkiewicz
2017-02-24  6:49 ` [PATCHv2 1/2] blk-mq: Export blk_mq_freeze_queue_wait Christoph Hellwig
2017-02-27 13:38 ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).