diff options
Diffstat (limited to 'block/blk-mq-tag.c')
-rw-r--r-- | block/blk-mq-tag.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 32e8dbb9ad1c..60c9d4a93fe4 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c | |||
@@ -68,9 +68,9 @@ bool __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * Wakeup all potentially sleeping on normal (non-reserved) tags | 71 | * Wakeup all potentially sleeping on tags |
72 | */ | 72 | */ |
73 | static void blk_mq_tag_wakeup_all(struct blk_mq_tags *tags) | 73 | void blk_mq_tag_wakeup_all(struct blk_mq_tags *tags, bool include_reserve) |
74 | { | 74 | { |
75 | struct blk_mq_bitmap_tags *bt; | 75 | struct blk_mq_bitmap_tags *bt; |
76 | int i, wake_index; | 76 | int i, wake_index; |
@@ -85,6 +85,12 @@ static void blk_mq_tag_wakeup_all(struct blk_mq_tags *tags) | |||
85 | 85 | ||
86 | wake_index = bt_index_inc(wake_index); | 86 | wake_index = bt_index_inc(wake_index); |
87 | } | 87 | } |
88 | |||
89 | if (include_reserve) { | ||
90 | bt = &tags->breserved_tags; | ||
91 | if (waitqueue_active(&bt->bs[0].wait)) | ||
92 | wake_up(&bt->bs[0].wait); | ||
93 | } | ||
88 | } | 94 | } |
89 | 95 | ||
90 | /* | 96 | /* |
@@ -100,7 +106,7 @@ void __blk_mq_tag_idle(struct blk_mq_hw_ctx *hctx) | |||
100 | 106 | ||
101 | atomic_dec(&tags->active_queues); | 107 | atomic_dec(&tags->active_queues); |
102 | 108 | ||
103 | blk_mq_tag_wakeup_all(tags); | 109 | blk_mq_tag_wakeup_all(tags, false); |
104 | } | 110 | } |
105 | 111 | ||
106 | /* | 112 | /* |
@@ -584,7 +590,7 @@ int blk_mq_tag_update_depth(struct blk_mq_tags *tags, unsigned int tdepth) | |||
584 | * static and should never need resizing. | 590 | * static and should never need resizing. |
585 | */ | 591 | */ |
586 | bt_update_count(&tags->bitmap_tags, tdepth); | 592 | bt_update_count(&tags->bitmap_tags, tdepth); |
587 | blk_mq_tag_wakeup_all(tags); | 593 | blk_mq_tag_wakeup_all(tags, false); |
588 | return 0; | 594 | return 0; |
589 | } | 595 | } |
590 | 596 | ||