path: root/block/blk-mq-tag.c
diff options
authorJens Axboe <>2014-04-29 20:49:48 -0600
committerJens Axboe <>2014-04-29 20:49:48 -0600
commit5810d903fa3459e703ce82a1d45136813c6afad8 (patch)
treeef916e48f6bced5a29de12ce29da9fa7e7b13ac4 /block/blk-mq-tag.c
parentbdcfa3e57c9d92b082d2378bc9a64a3a8750fa8d (diff)
blk-mq: fix waiting for reserved tags
blk_mq_wait_for_tags() is only able to wait for "normal" tags, not reserved tags. Pass in which one we should attempt to get a tag for, so that waiting for reserved tags will work. Reserved tags are used for internal commands, which are usually serialized. Hence no waiting generally takes place, but we should ensure that it actually works if users need that functionality. Signed-off-by: Jens Axboe <>
Diffstat (limited to 'block/blk-mq-tag.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 7a799c46c32d..1f43d6ee956f 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -6,9 +6,9 @@
#include "blk-mq.h"
#include "blk-mq-tag.h"
-void blk_mq_wait_for_tags(struct blk_mq_tags *tags)
+void blk_mq_wait_for_tags(struct blk_mq_tags *tags, bool reserved)
- int tag = blk_mq_get_tag(tags, __GFP_WAIT, false);
+ int tag = blk_mq_get_tag(tags, __GFP_WAIT, reserved);
blk_mq_put_tag(tags, tag);