blk-mq: abstract tag allocation out into sbitmap library
[linux-2.6-block.git] / include / linux / blk-mq.h
index 60ef14cbcd2da8dfe001fb78e2905c5acd7a7962..2575779cf13f168671b25e210566c247854702d5 100644 (file)
@@ -2,6 +2,7 @@
 #define BLK_MQ_H
 
 #include <linux/blkdev.h>
+#include <linux/sbitmap.h>
 
 struct blk_mq_tags;
 struct blk_flush_queue;
@@ -12,12 +13,6 @@ struct blk_mq_cpu_notifier {
        int (*notify)(void *data, unsigned long action, unsigned int cpu);
 };
 
-struct blk_mq_ctxmap {
-       unsigned int size;
-       unsigned int bits_per_word;
-       struct blk_align_bitmap *map;
-};
-
 struct blk_mq_hw_ctx {
        struct {
                spinlock_t              lock;
@@ -37,7 +32,7 @@ struct blk_mq_hw_ctx {
 
        void                    *driver_data;
 
-       struct blk_mq_ctxmap    ctx_map;
+       struct sbitmap          ctx_map;
 
        struct blk_mq_ctx       **ctxs;
        unsigned int            nr_ctx;