aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-mq-tag.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-05-19 09:17:48 -0600
committerJens Axboe <axboe@fb.com>2014-05-19 11:02:47 -0600
commite93ecf602beb8439f0bdcc1fa2cbc1f31fdfb8e2 (patch)
tree030ba8a90d4ebf1f9cd5d546066d12037402eda1 /block/blk-mq-tag.c
parentblock: move ioprio.c from fs/ to block/ (diff)
downloadlinux-dev-e93ecf602beb8439f0bdcc1fa2cbc1f31fdfb8e2.tar.xz
linux-dev-e93ecf602beb8439f0bdcc1fa2cbc1f31fdfb8e2.zip
blk-mq: move the cache friendly bitmap type of out blk-mq-tag
We will use it for the pending list in blk-mq core as well. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-tag.c')
-rw-r--r--block/blk-mq-tag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 8d526a3e02f6..03ce6a11ba79 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -21,7 +21,7 @@ static bool bt_has_free_tags(struct blk_mq_bitmap_tags *bt)
int i;
for (i = 0; i < bt->map_nr; i++) {
- struct blk_mq_bitmap *bm = &bt->map[i];
+ struct blk_align_bitmap *bm = &bt->map[i];
int ret;
ret = find_first_zero_bit(&bm->word, bm->depth);
@@ -40,7 +40,7 @@ bool blk_mq_has_free_tags(struct blk_mq_tags *tags)
return bt_has_free_tags(&tags->bitmap_tags);
}
-static int __bt_get_word(struct blk_mq_bitmap *bm, unsigned int last_tag)
+static int __bt_get_word(struct blk_align_bitmap *bm, unsigned int last_tag)
{
int tag, org_last_tag, end;
@@ -283,7 +283,7 @@ static void bt_for_each_free(struct blk_mq_bitmap_tags *bt,
int i;
for (i = 0; i < bt->map_nr; i++) {
- struct blk_mq_bitmap *bm = &bt->map[i];
+ struct blk_align_bitmap *bm = &bt->map[i];
int bit = 0;
do {
@@ -323,7 +323,7 @@ static unsigned int bt_unused_tags(struct blk_mq_bitmap_tags *bt)
unsigned int i, used;
for (i = 0, used = 0; i < bt->map_nr; i++) {
- struct blk_mq_bitmap *bm = &bt->map[i];
+ struct blk_align_bitmap *bm = &bt->map[i];
used += bitmap_weight(&bm->word, bm->depth);
}
@@ -361,7 +361,7 @@ static int bt_alloc(struct blk_mq_bitmap_tags *bt, unsigned int depth,
}
nr = ALIGN(depth, tags_per_word) / tags_per_word;
- bt->map = kzalloc_node(nr * sizeof(struct blk_mq_bitmap),
+ bt->map = kzalloc_node(nr * sizeof(struct blk_align_bitmap),
GFP_KERNEL, node);
if (!bt->map)
return -ENOMEM;