diff options
author | Minwoo Im <minwoo.im.dev@gmail.com> | 2018-07-02 10:46:43 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-07-09 11:07:53 -0400 |
commit | 0da73d00ca111a6175825a00d94dbeae185f6d7e (patch) | |
tree | 9885b0b946b98ecf4b4ea37d62b8e507df5f8a52 /block/blk-mq-pci.c | |
parent | 5efac89c849849ad3a959224eb711f9c311e5bde (diff) |
blk-mq: code clean-up by adding an API to clear set->mq_map
set->mq_map is now currently cleared if something goes wrong when
establishing a queue map in blk-mq-pci.c. It's also cleared before
updating a queue map in blk_mq_update_queue_map().
This patch provides an API to clear set->mq_map to make it clear.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-pci.c')
-rw-r--r-- | block/blk-mq-pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-mq-pci.c b/block/blk-mq-pci.c index e233996bb76f..db644ec624f5 100644 --- a/block/blk-mq-pci.c +++ b/block/blk-mq-pci.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | 19 | ||
20 | #include "blk-mq.h" | ||
21 | |||
20 | /** | 22 | /** |
21 | * blk_mq_pci_map_queues - provide a default queue mapping for PCI device | 23 | * blk_mq_pci_map_queues - provide a default queue mapping for PCI device |
22 | * @set: tagset to provide the mapping for | 24 | * @set: tagset to provide the mapping for |
@@ -48,8 +50,7 @@ int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev, | |||
48 | 50 | ||
49 | fallback: | 51 | fallback: |
50 | WARN_ON_ONCE(set->nr_hw_queues > 1); | 52 | WARN_ON_ONCE(set->nr_hw_queues > 1); |
51 | for_each_possible_cpu(cpu) | 53 | blk_mq_clear_mq_map(set); |
52 | set->mq_map[cpu] = 0; | ||
53 | return 0; | 54 | return 0; |
54 | } | 55 | } |
55 | EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues); | 56 | EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues); |