aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-mq-tag.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-04-29 20:49:48 -0600
committerJens Axboe <axboe@fb.com>2014-04-29 20:49:48 -0600
commit5810d903fa3459e703ce82a1d45136813c6afad8 (patch)
treeef916e48f6bced5a29de12ce29da9fa7e7b13ac4 /block/blk-mq-tag.c
parentrandom: export add_disk_randomness (diff)
downloadlinux-dev-5810d903fa3459e703ce82a1d45136813c6afad8.tar.xz
linux-dev-5810d903fa3459e703ce82a1d45136813c6afad8.zip
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 <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-tag.c')
-rw-r--r--block/blk-mq-tag.c4
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);
}