|
9 | 9 | #include <trace/events/block.h> |
10 | 10 | #include "nvme.h" |
11 | 11 |
|
12 | | -bool multipath = true; |
13 | | -module_param(multipath, bool, 0444); |
14 | | -MODULE_PARM_DESC(multipath, |
15 | | - "turn on native support for multiple controllers per subsystem"); |
16 | | - |
17 | 12 | static const char *nvme_iopolicy_names[] = { |
18 | 13 | [NVME_IOPOLICY_NUMA] = "numa", |
19 | 14 | [NVME_IOPOLICY_RR] = "round-robin", |
@@ -626,9 +621,11 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head) |
626 | 621 | * We also do this for private namespaces as the namespace sharing flag |
627 | 622 | * could change after a rescan. |
628 | 623 | */ |
| 624 | +#ifdef CONFIG_NVME_MULTIPATH |
629 | 625 | if (!(ctrl->subsys->cmic & NVME_CTRL_CMIC_MULTI_CTRL) || |
630 | | - !nvme_is_unique_nsid(ctrl, head) || !multipath) |
| 626 | + !nvme_is_unique_nsid(ctrl, head)) |
631 | 627 | return 0; |
| 628 | +#endif |
632 | 629 |
|
633 | 630 | blk_set_stacking_limits(&lim); |
634 | 631 | lim.dma_alignment = 3; |
@@ -1033,10 +1030,11 @@ int nvme_mpath_init_identify(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) |
1033 | 1030 | size_t ana_log_size; |
1034 | 1031 | int error = 0; |
1035 | 1032 |
|
| 1033 | +#ifdef CONFIG_NVME_MULTIPATH |
1036 | 1034 | /* check if multipath is enabled and we have the capability */ |
1037 | | - if (!multipath || !ctrl->subsys || |
1038 | | - !(ctrl->subsys->cmic & NVME_CTRL_CMIC_ANA)) |
| 1035 | + if (!ctrl->subsys || !(ctrl->subsys->cmic & NVME_CTRL_CMIC_ANA)) |
1039 | 1036 | return 0; |
| 1037 | +#endif |
1040 | 1038 |
|
1041 | 1039 | /* initialize this in the identify path to cover controller resets */ |
1042 | 1040 | atomic_set(&ctrl->nr_active, 0); |
|
0 commit comments