提交 6bae363e 编写于 作者: K Keith Busch 提交者: Jens Axboe

blk-mq: Export blk_mq_freeze_queue_wait

Drivers can start a freeze, so this provides a way to wait for frozen.
Signed-off-by: NKeith Busch <keith.busch@intel.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 6a8a2154
...@@ -75,10 +75,11 @@ void blk_mq_freeze_queue_start(struct request_queue *q) ...@@ -75,10 +75,11 @@ void blk_mq_freeze_queue_start(struct request_queue *q)
} }
EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_start); 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)); 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 * Guarantee no request is in use, so we can change any data structure of
......
...@@ -245,6 +245,7 @@ void blk_mq_tagset_busy_iter(struct blk_mq_tag_set *tagset, ...@@ -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_freeze_queue(struct request_queue *q);
void blk_mq_unfreeze_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_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_reinit_tagset(struct blk_mq_tag_set *set);
int blk_mq_map_queues(struct blk_mq_tag_set *set); int blk_mq_map_queues(struct blk_mq_tag_set *set);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册