Merge tag 'mmc-v4.3' of git://git.linaro.org/people/ulf.hansson/mmc
[firefly-linux-kernel-4.4.55.git] / block / blk-mq-tag.h
index 90767b370308daab9bdd7efe3903dd72af2a6dad..9eb2cf4f01cb874706d64af87a01e94e0121f7e4 100644 (file)
@@ -44,6 +44,7 @@ struct blk_mq_tags {
        struct list_head page_list;
 
        int alloc_policy;
+       cpumask_var_t cpumask;
 };
 
 
@@ -88,4 +89,16 @@ static inline void blk_mq_tag_idle(struct blk_mq_hw_ctx *hctx)
        __blk_mq_tag_idle(hctx);
 }
 
+/*
+ * This helper should only be used for flush request to share tag
+ * with the request cloned from, and both the two requests can't be
+ * in flight at the same time. The caller has to make sure the tag
+ * can't be freed.
+ */
+static inline void blk_mq_tag_set_rq(struct blk_mq_hw_ctx *hctx,
+               unsigned int tag, struct request *rq)
+{
+       hctx->tags->rqs[tag] = rq;
+}
+
 #endif