diff options
author | Christophe Varoqui <christophe.varoqui@opensvc.com> | 2010-05-21 16:41:30 +0200 |
---|---|---|
committer | Christophe Varoqui <christophe.varoqui@opensvc.com> | 2010-05-21 16:41:30 +0200 |
commit | 1098120a420ad7f892abab2801872d70c87ac3a3 (patch) | |
tree | 30d9e62f2a838e83d22c8e584d7c0b80ee95e7d4 | |
parent | 6c07072b8dd5171a429cb6a995f6dbb5a41b0803 (diff) | |
download | multipath-tools-1098120a420ad7f892abab2801872d70c87ac3a3.tar.gz multipath-tools-1098120a420ad7f892abab2801872d70c87ac3a3.tar.bz2 multipath-tools-1098120a420ad7f892abab2801872d70c87ac3a3.zip |
Prioritizers enhancement
1/ add the 'prio_args' config keyword to allow passing arguments
to the getprio function
2/ merge the datacore prioritizer. Adapt the legacy datacore
prioritizer callout to the libprio framework. First use of the
'prio_args'
3/ fix the 'show config' multipathd cli command to display the
prio and prio_args values. Also fix a bunch of other values
affected by the same bug (features, ...).
4/ update docs
5/ remove some heading whitespaces
6/ remove useless prioritizers include files
27 files changed, 400 insertions, 115 deletions
diff --git a/libmultipath/config.c b/libmultipath/config.c index fbe2125..a4178be 100644 --- a/libmultipath/config.c +++ b/libmultipath/config.c @@ -155,6 +155,9 @@ free_hwe (struct hwentry * hwe) if (hwe->prio_name) FREE(hwe->prio_name); + if (hwe->prio_args) + FREE(hwe->prio_args); + if (hwe->bl_product) FREE(hwe->bl_product); @@ -278,6 +281,7 @@ merge_hwe (struct hwentry * hwe1, struct hwentry * hwe2) merge_str(selector); merge_str(checker_name); merge_str(prio_name); + merge_str(prio_args); merge_str(bl_product); merge_num(pgpolicy); merge_num(pgfailback); @@ -322,10 +326,13 @@ store_hwe (vector hwtable, struct hwentry * dhwe) if (dhwe->checker_name && !(hwe->checker_name = set_param_str(dhwe->checker_name))) goto out; - + if (dhwe->prio_name && !(hwe->prio_name = set_param_str(dhwe->prio_name))) goto out; - + + if (dhwe->prio_args && !(hwe->prio_args = set_param_str(dhwe->prio_args))) + goto out; + hwe->pgpolicy = dhwe->pgpolicy; hwe->pgfailback = dhwe->pgfailback; hwe->rr_weight = dhwe->rr_weight; @@ -402,6 +409,9 @@ free_config (struct config * conf) if (conf->prio_name) FREE(conf->prio_name); + if (conf->prio_args) + FREE(conf->prio_args); + if (conf->checker_name) FREE(conf->checker_name); diff --git a/libmultipath/config.h b/libmultipath/config.h index d8e6915..471eed0 100644 --- a/libmultipath/config.h +++ b/libmultipath/config.h @@ -24,6 +24,7 @@ struct hwentry { char * selector; char * checker_name; char * prio_name; + char * prio_args; int pgpolicy; int pgfailback; @@ -96,6 +97,7 @@ struct config { char * hwhandler; char * bindings_file; char * prio_name; + char * prio_args; char * checker_name; vector keywords; diff --git a/libmultipath/dict.c b/libmultipath/dict.c index ab0c831..02aa238 100644 --- a/libmultipath/dict.c +++ b/libmultipath/dict.c @@ -148,6 +148,17 @@ def_prio_handler(vector strvec) } static int +def_prio_args_handler(vector strvec) +{ + conf->prio_args = set_value(strvec); + + if (!conf->prio_args) + return 1; + + return 0; +} + +static int def_features_handler(vector strvec) { conf->features = set_value(strvec); @@ -165,7 +176,7 @@ def_path_checker_handler(vector strvec) if (!conf->checker_name) return 1; - + return 0; } @@ -767,7 +778,7 @@ hw_path_checker_handler(vector strvec) if (!hwe->checker_name) return 1; - + return 0; } @@ -820,6 +831,22 @@ hw_prio_handler(vector strvec) } static int +hw_prio_args_handler(vector strvec) +{ + struct hwentry * hwe = VECTOR_LAST_SLOT(conf->hwtable); + + if (!hwe) + return 1; + + hwe->prio_args = set_value(strvec); + + if (!hwe->prio_args) + return 1; + + return 0; +} + +static int hw_failback_handler(vector strvec) { struct hwentry * hwe = VECTOR_LAST_SLOT(conf->hwtable); @@ -1529,9 +1556,10 @@ snprint_hw_getuid_callout (char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; - if (!hwe->getuid || !conf->getuid) + if (!hwe->getuid) return 0; - if (strlen(hwe->getuid) == strlen(conf->getuid) && + if (conf->getuid && + strlen(hwe->getuid) == strlen(conf->getuid) && !strcmp(hwe->getuid, conf->getuid)) return 0; @@ -1543,22 +1571,36 @@ snprint_hw_prio (char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; - if (!hwe->prio_name || !conf->prio_name) + if (!hwe->prio_name || (strlen(hwe->prio_name) == 0)) return 0; - if (!strcmp(hwe->prio_name, conf->prio_name)) + if (conf->prio_name && !strcmp(hwe->prio_name, conf->prio_name)) return 0; - + return snprintf(buff, len, "%s", hwe->prio_name); } static int +snprint_hw_prio_args (char * buff, int len, void * data) +{ + struct hwentry * hwe = (struct hwentry *)data; + + if (!hwe->prio_args || (strlen(hwe->prio_args) == 0)) + return 0; + if (conf->prio_args && !strcmp(hwe->prio_args, conf->prio_args)) + return 0; + + return snprintf(buff, len, "%s", hwe->prio_args); +} + +static int snprint_hw_features (char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; - if (!hwe->features || !conf->features) + if (!hwe->features) return 0; - if (strlen(hwe->features) == strlen(conf->features) && + if (conf->features && + strlen(hwe->features) == strlen(conf->features) && !strcmp(hwe->features, conf->features)) return 0; @@ -1570,9 +1612,10 @@ snprint_hw_hardware_handler (char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; - if (!hwe->hwhandler || !conf->hwhandler) + if (!hwe->hwhandler) return 0; - if (strlen(hwe->hwhandler) == strlen(conf->hwhandler) && + if (conf->hwhandler && + strlen(hwe->hwhandler) == strlen(conf->hwhandler) && !strcmp(hwe->hwhandler, conf->hwhandler)) return 0; @@ -1584,9 +1627,10 @@ snprint_hw_selector (char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; - if (!hwe->selector || !conf->selector) + if (!hwe->selector) return 0; - if (strlen(hwe->selector) == strlen(conf->selector) && + if (conf->selector && + strlen(hwe->selector) == strlen(conf->selector) && !strcmp(hwe->selector, conf->selector)) return 0; @@ -1600,9 +1644,9 @@ snprint_hw_path_grouping_policy (char * buff, int len, void * data) char str[POLICY_NAME_SIZE]; - if (!hwe->pgpolicy || !conf->pgpolicy) + if (!hwe->pgpolicy) return 0; - if (hwe->pgpolicy == conf->pgpolicy) + if (conf->pgpolicy && hwe->pgpolicy == conf->pgpolicy) return 0; get_pgpolicy_name(str, POLICY_NAME_SIZE, hwe->pgpolicy); @@ -1615,9 +1659,9 @@ snprint_hw_failback (char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; - if (!hwe->pgfailback || !conf->pgfailback) + if (!hwe->pgfailback) return 0; - if (hwe->pgfailback == conf->pgfailback) + if (conf->pgfailback && hwe->pgfailback == conf->pgfailback) return 0; switch(hwe->pgfailback) { @@ -1638,9 +1682,9 @@ snprint_hw_rr_weight (char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; - if (!hwe->rr_weight || !conf->rr_weight) + if (!hwe->rr_weight) return 0; - if (hwe->rr_weight == conf->rr_weight) + if (conf->rr_weight && hwe->rr_weight == conf->rr_weight) return 0; if (hwe->rr_weight == RR_WEIGHT_PRIO) return snprintf(buff, len, "priorities"); @@ -1725,11 +1769,12 @@ snprint_hw_path_checker (char * buff, int len, void * data) { struct hwentry * hwe = (struct hwentry *)data; - if (!hwe->checker_name || !conf->checker_name) + if (!hwe->checker_name) return 0; - if (!strcmp(hwe->checker_name, conf->checker_name)) + if (conf->checker_name && + !strcmp(hwe->checker_name, conf->checker_name)) return 0; - + return snprintf(buff, len, "%s", hwe->checker_name); } @@ -1839,11 +1884,24 @@ snprint_def_prio (char * buff, int len, void * data) if (strlen(conf->prio_name) == strlen(DEFAULT_PRIO) && !strcmp(conf->prio_name, DEFAULT_PRIO)) return 0; - + return snprintf(buff, len, "%s", conf->prio_name); } static int +snprint_def_prio_args (char * buff, int len, void * data) +{ + if (!conf->prio_args) + return 0; + + if (strlen(conf->prio_args) == strlen(DEFAULT_PRIO_ARGS) && + !strcmp(conf->prio_args, DEFAULT_PRIO_ARGS)) + return 0; + + return snprintf(buff, len, "%s", conf->prio_args); +} + +static int snprint_def_features (char * buff, int len, void * data) { if (!conf->features) @@ -1863,7 +1921,7 @@ snprint_def_path_checker (char * buff, int len, void * data) if (strlen(conf->checker_name) == strlen(DEFAULT_CHECKER) && !strcmp(conf->checker_name, DEFAULT_CHECKER)) return 0; - + return snprintf(buff, len, "%s", conf->checker_name); } @@ -2055,6 +2113,7 @@ init_keywords(void) install_keyword("path_grouping_policy", &def_pgpolicy_handler, &snprint_def_path_grouping_policy); install_keyword("getuid_callout", &def_getuid_callout_handler, &snprint_def_getuid_callout); install_keyword("prio", &def_prio_handler, &snprint_def_prio); + install_keyword("prio_args", &def_prio_args_handler, &snprint_def_prio_args); install_keyword("features", &def_features_handler, &snprint_def_features); install_keyword("path_checker", &def_path_checker_handler, &snprint_def_path_checker); install_keyword("checker", &def_path_checker_handler, &snprint_def_path_checker); @@ -2120,6 +2179,7 @@ init_keywords(void) install_keyword("features", &hw_features_handler, &snprint_hw_features); install_keyword("hardware_handler", &hw_handler_handler, &snprint_hw_hardware_handler); install_keyword("prio", &hw_prio_handler, &snprint_hw_prio); + install_keyword("prio_args", &hw_prio_args_handler, &snprint_hw_prio_args); install_keyword("failback", &hw_failback_handler, &snprint_hw_failback); install_keyword("rr_weight", &hw_weight_handler, &snprint_hw_rr_weight); install_keyword("no_path_retry", &hw_no_path_retry_handler, &snprint_hw_no_path_retry); diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index 6406c2d..e4fe380 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c @@ -37,6 +37,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, /* * Apple controller family @@ -58,6 +59,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DEFAULT_CHECKER, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, /* * StorageWorks controller family @@ -79,6 +81,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DEFAULT_CHECKER, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { .vendor = "DEC", @@ -94,6 +97,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = HP_SW, .prio_name = PRIO_HP_SW, + .prio_args = NULL, }, { .vendor = "HP", @@ -109,6 +113,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* MSA 1000/MSA1500 EVA 3000/5000 with old firmware */ @@ -125,6 +130,7 @@ static struct hwentry default_hw[] = { .minio = 100, .checker_name = HP_SW, .prio_name = PRIO_HP_SW, + .prio_args = NULL, }, { /* MSA 1000/1500 with new firmware */ @@ -141,6 +147,7 @@ static struct hwentry default_hw[] = { .minio = 100, .checker_name = TUR, .prio_name = PRIO_ALUA, + .prio_args = NULL, }, { /* EVA 3000/5000 with new firmware, EVA 4000/6000/8000 */ @@ -157,6 +164,7 @@ static struct hwentry default_hw[] = { .minio = 100, .checker_name = TUR, .prio_name = PRIO_ALUA, + .prio_args = NULL, }, { /* HP MSA2000 product family with old firmware */ @@ -173,6 +181,7 @@ static struct hwentry default_hw[] = { .minio = 100, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* HP MSA2000 product family with new firmware */ @@ -189,6 +198,7 @@ static struct hwentry default_hw[] = { .minio = 100, .checker_name = TUR, .prio_name = PRIO_ALUA, + .prio_args = NULL, }, { @@ -206,6 +216,7 @@ static struct hwentry default_hw[] = { .minio = 100, .checker_name = TUR, .prio_name = PRIO_ALUA, + .prio_args = NULL, }, { @@ -223,6 +234,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = CCISS_TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, /* * DDN controller family @@ -244,6 +256,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, /* * EMC / Clariion controller family @@ -265,6 +278,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { .vendor = "DGC", @@ -281,6 +295,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = EMC_CLARIION, .prio_name = PRIO_EMC, + .prio_args = NULL, }, { .vendor = "EMC", @@ -296,6 +311,7 @@ static struct hwentry default_hw[] = { .no_path_retry = 5, .minio = DEFAULT_MINIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, /* * Fujitsu controller family @@ -317,6 +333,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { .vendor = "EMC", @@ -333,6 +350,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, /* * Hitachi controller family @@ -354,6 +372,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { .vendor = "HITACHI", @@ -369,6 +388,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = PRIO_HDS, + .prio_args = NULL, }, /* * IBM controller family @@ -390,6 +410,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* IBM FAStT 1722-600 */ @@ -406,6 +427,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* IBM DS4100 */ @@ -422,6 +444,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* IBM DS3200 / DS3300 / DS3400 */ @@ -438,6 +461,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* IBM DS4400 / DS4500 / FAStT700 */ @@ -454,6 +478,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { .vendor = "IBM", @@ -469,6 +494,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* IBM DS4700 */ @@ -485,6 +511,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* IBM DS4800 */ @@ -501,6 +528,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* IBM DS5000 */ @@ -517,6 +545,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* IBM Netfinity Fibre Channel RAID Controller Unit */ @@ -533,6 +562,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* IBM DS4200 / FAStT200 */ @@ -549,6 +579,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* IBM ESS F20 aka Shark */ @@ -565,6 +596,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* IBM ESS F20 aka Shark */ @@ -581,6 +613,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* IBM DS6000 */ @@ -597,6 +630,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = PRIO_ALUA, + .prio_args = NULL, }, { /* IBM DS8000 */ @@ -613,6 +647,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* IBM SAN Volume Controller */ @@ -629,6 +664,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = PRIO_ALUA, + .prio_args = NULL, }, { /* IBM S/390 ECKD DASD */ @@ -646,6 +682,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* IBM S/390 FBA DASD */ @@ -663,6 +700,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* IBM IPR */ @@ -679,6 +717,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = PRIO_ALUA, + .prio_args = NULL, }, /* * IBM Power Virtual SCSI Devices @@ -701,6 +740,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { /* IBM 3303 NVDISK */ @@ -717,6 +757,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { @@ -734,6 +775,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* DELL MD3000i */ @@ -750,6 +792,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* DELL MD32xx */ @@ -766,6 +809,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { /* DELL MD32xxi */ @@ -782,6 +826,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, /* * NETAPP controller family @@ -803,6 +848,7 @@ static struct hwentry default_hw[] = { .minio = 128, .checker_name = DIRECTIO, .prio_name = PRIO_NETAPP, + .prio_args = NULL, }, /* * NEXENTA/COMSTAR controller family @@ -824,6 +870,7 @@ static struct hwentry default_hw[] = { .minio = 128, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, /* * IBM NSeries (NETAPP) controller family @@ -845,6 +892,7 @@ static struct hwentry default_hw[] = { .minio = 128, .checker_name = DIRECTIO, .prio_name = PRIO_NETAPP, + .prio_args = NULL, }, /* * Pillar Data controller family @@ -866,6 +914,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = PRIO_ALUA, + .prio_args = NULL, }, /* * SGI arrays @@ -887,6 +936,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { .vendor = "SGI", @@ -902,6 +952,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { .vendor = "SGI", @@ -917,6 +968,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, /* * STK arrays @@ -938,6 +990,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = TUR, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, /* * SUN arrays @@ -959,6 +1012,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = DIRECTIO, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, /* * Pivot3 RAIGE @@ -980,6 +1034,7 @@ static struct hwentry default_hw[] = { .minio = 100, .checker_name = TUR, .prio_name = DEFAULT_PRIO, + .prio_args = NULL, }, { .vendor = "SUN", @@ -995,6 +1050,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, /* SUN/LSI 2510, 2540, 2530, 2540 */ { @@ -1011,6 +1067,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, /* LSI Generic rdac storage */ { @@ -1027,6 +1084,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, { .vendor = "STK", @@ -1043,6 +1101,7 @@ static struct hwentry default_hw[] = { .minio = DEFAULT_MINIO, .checker_name = RDAC, .prio_name = PRIO_RDAC, + .prio_args = NULL, }, /* * EOL @@ -1061,6 +1120,7 @@ static struct hwentry default_hw[] = { .minio = 0, .checker_name = NULL, .prio_name = NULL, + .prio_args = NULL, }, }; diff --git a/libmultipath/prio.c b/libmultipath/prio.c index 9c40f1d..7491682 100644 --- a/libmultipath/prio.c +++ b/libmultipath/prio.c @@ -48,6 +48,11 @@ struct prio * prio_lookup (char * name) return add_prio(name); } +int prio_set_args (struct prio * p, char * args) +{ + return snprintf(p->args, PRIO_ARGS_LEN, "%s", args); +} + struct prio * add_prio (char * name) { char libname[LIB_PRIO_NAMELEN]; @@ -67,7 +72,7 @@ struct prio * add_prio (char * name) condlog(0, "A dynamic linking error occurred: (%s)", errstr); if (!handle) goto out; - p->getprio = (int (*)(struct path *)) dlsym(handle, "getprio"); + p->getprio = (int (*)(struct path *, char *)) dlsym(handle, "getprio"); errstr = dlerror(); if (errstr != NULL) condlog(0, "A dynamic linking error occurred: (%s)", errstr); @@ -83,10 +88,15 @@ out: int prio_getprio (struct prio * p, struct path * pp) { - return p->getprio(pp); + return p->getprio(pp, p->args); } char * prio_name (struct prio * p) { return p->name; } + +char * prio_args (struct prio * p) +{ + return p->args; +} diff --git a/libmultipath/prio.h b/libmultipath/prio.h index fc9277f..fd4a326 100644 --- a/libmultipath/prio.h +++ b/libmultipath/prio.h @@ -11,6 +11,7 @@ #include "memory.h" #define DEFAULT_PRIO "const" +#define DEFAULT_PRIO_ARGS "" /* * Known prioritizers for use in hwtable.c @@ -23,6 +24,7 @@ #define PRIO_NETAPP "netapp" #define PRIO_RANDOM "random" #define PRIO_RDAC "rdac" +#define PRIO_DATACORE "datacore" /* * Value used to mark the fact prio was not defined @@ -34,11 +36,13 @@ */ #define LIB_PRIO_NAMELEN 255 #define PRIO_NAME_LEN 16 +#define PRIO_ARGS_LEN 255 struct prio { struct list_head node; char name[PRIO_NAME_LEN]; - int (*getprio)(struct path *); + char args[PRIO_ARGS_LEN]; + int (*getprio)(struct path *, char *); }; int init_prio (void); @@ -47,5 +51,7 @@ struct prio * add_prio (char *); struct prio * prio_lookup (char *); int prio_getprio (struct prio *, struct path *); char * prio_name (struct prio *); +char * prio_args (struct prio *); +int prio_set_args (struct prio *, char *); #endif /* _PRIO_H */ diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile index ede9427..132b39e 100644 --- a/libmultipath/prioritizers/Makefile +++ b/libmultipath/prioritizers/Makefile @@ -12,6 +12,7 @@ LIBS = \ libpriordac.so \ libprioalua.so \ libprionetapp.so \ + libpriodatacore.so \ libpriohds.so CFLAGS += -I.. diff --git a/libmultipath/prioritizers/alua.c b/libmultipath/prioritizers/alua.c index abf6232..e33e17c 100644 --- a/libmultipath/prioritizers/alua.c +++ b/libmultipath/prioritizers/alua.c @@ -61,7 +61,7 @@ get_alua_info(int fd) return rc; } -int getprio (struct path * pp) +int getprio (struct path * pp, char * args) { int rc; int aas; diff --git a/libmultipath/prioritizers/const.c b/libmultipath/prioritizers/const.c index 529cf82..bf689cd 100644 --- a/libmultipath/prioritizers/const.c +++ b/libmultipath/prioritizers/const.c @@ -2,7 +2,7 @@ #include <prio.h> -int getprio (struct path * pp) +int getprio (struct path * pp, char * args) { return 1; } diff --git a/libmultipath/prioritizers/const.h b/libmultipath/prioritizers/const.h deleted file mode 100644 index 220db54..0000000 --- a/libmultipath/prioritizers/const.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _CONST_H -#define _CONST_H - -#define PRIO_CONST "const" -int prio_const(struct path * pp); - -#endif diff --git a/libmultipath/prioritizers/datacore.c b/libmultipath/prioritizers/datacore.c new file mode 100644 index 0000000..6b7b202 --- /dev/null +++ b/libmultipath/prioritizers/datacore.c @@ -0,0 +1,112 @@ +/* + * (C) 2010 Christophe Varoqui + * (C) 2009 Dembach Goo Infromatik GmbH & Co KG + * Manon Goo <manon.goo@dg-i.net> + * + * datacore.c + * Version 0.9 + * + * This program was inspired by work from + * Matthias Rudolph <matthias.rudolph@hds.com> + * + * This work is made available on the basis of the + * GPLv2 for detials see <http://www.gnu.org/licenses/>. + * + * Manon Goo 2009 + * + * + */ + +#include <stdio.h> +#include <sys/ioctl.h> + +#include <sys/stat.h> +#include <sg_include.h> +#include <debug.h> +#include <prio.h> + +#define INQ_REPLY_LEN 255 +#define INQ_CMD_CODE 0x12 +#define INQ_CMD_LEN 6 + +#define dc_log(prio, msg) condlog(prio, "%s: datacore prio: " msg, dev) + +int datacore_prio (const char *dev, int sg_fd, char * args) +{ + int k; + char vendor[8]; + char product[32]; + char luname[32]; + char wwpn[32]; + char sdsname[32]; + unsigned char inqCmdBlk[INQ_CMD_LEN] = { INQ_CMD_CODE, 0, 0, 0, INQ_REPLY_LEN, 0 }; + unsigned char inqBuff[INQ_REPLY_LEN]; + unsigned char *inqBuffp = inqBuff; + unsigned char sense_buffer[32]; + sg_io_hdr_t io_hdr; + + int timeout = 2000; + char preferredsds_buff[255] = ""; + char * preferredsds = &preferredsds_buff[0]; + + if (!args) { + dc_log(0, "need prio_args with preferredsds set"); + return 0; + } + + if (sscanf(args, "timeout=%i preferredsds=%s", + &timeout, preferredsds) == 2) {} + else if (sscanf(args, "preferredsds=%s timeout=%i", + preferredsds, &timeout) == 2) {} + else if (sscanf(args, "preferredsds=%s", + preferredsds) == 1) {} + else { + dc_log(0, "unexpected prio_args format"); + return 0; + } + + // on error just return prio 0 + if (strlen(preferredsds) <= 1) { + dc_log(0, "prio args: preferredsds too short (1 character min)"); + return 0; + } + if ((timeout < 500) || (timeout > 20000)) { + dc_log(0, "prio args: timeout out of bounds [500:20000]"); + return 0; + } + if ((ioctl(sg_fd, SG_GET_VERSION_NUM, &k) < 0) || (k < 30000)) + return 0; + + memset (&io_hdr, 0, sizeof (sg_io_hdr_t)); + io_hdr.interface_id = 'S'; + io_hdr.cmd_len = sizeof (inqCmdBlk); + io_hdr.mx_sb_len = sizeof (sense_buffer); + io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; + io_hdr.dxfer_len = INQ_REPLY_LEN; + io_hdr.dxferp = inqBuff; + io_hdr.cmdp = inqCmdBlk; + io_hdr.sbp = sense_buffer; + io_hdr.timeout = timeout; + + // on error just return prio 0 + if (ioctl(sg_fd, SG_IO, &io_hdr) < 0) + return 0; + if ((io_hdr.info & SG_INFO_OK_MASK) != SG_INFO_OK) + return 0; + + snprintf(vendor, 9, "%.8s\n", inqBuffp + 8); + snprintf(product, 17, "%.16s", inqBuffp + 16); + snprintf(luname, 21, "%.19s", inqBuffp + 36); + snprintf(wwpn, 17, "%.16s", inqBuffp + 96); + snprintf(sdsname, 17, "%.16s", inqBuffp + 112); + + if (strstr(sdsname , preferredsds)) + return 1; + return 0; +} + +int getprio (struct path * pp, char * args) +{ + return datacore_prio(pp->dev, pp->fd, args); +} + diff --git a/libmultipath/prioritizers/emc.c b/libmultipath/prioritizers/emc.c index 61d7a77..bbf5750 100644 --- a/libmultipath/prioritizers/emc.c +++ b/libmultipath/prioritizers/emc.c @@ -73,7 +73,7 @@ out: return(ret); } -int getprio (struct path * pp) +int getprio (struct path * pp, char * args) { return emc_clariion_prio(pp->dev, pp->fd); } diff --git a/libmultipath/prioritizers/emc.h b/libmultipath/prioritizers/emc.h deleted file mode 100644 index 0ab0bc5..0000000 --- a/libmultipath/prioritizers/emc.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _EMC_H -#define _EMC_H - -#define PRIO_EMC "emc" -int prio_emc(struct path * pp); - -#endif diff --git a/libmultipath/prioritizers/hds.c b/libmultipath/prioritizers/hds.c index 6ebe4d8..7b354b2 100644 --- a/libmultipath/prioritizers/hds.c +++ b/libmultipath/prioritizers/hds.c @@ -164,7 +164,7 @@ int hds_modular_prio (const char *dev, int fd) return -1; } -int getprio (struct path * pp) +int getprio (struct path * pp, char * args) { return hds_modular_prio(pp->dev, pp->fd); } diff --git a/libmultipath/prioritizers/hds.h b/libmultipath/prioritizers/hds.h deleted file mode 100644 index 084d77c..0000000 --- a/libmultipath/prioritizers/hds.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _HDS_H -#define _HDS_H - -#define PRIO_HDS "hds" -int prio_hds(struct path * pp); - -#endif diff --git a/libmultipath/prioritizers/hp_sw.c b/libmultipath/prioritizers/hp_sw.c index ae0975f..2de460f 100644 --- a/libmultipath/prioritizers/hp_sw.c +++ b/libmultipath/prioritizers/hp_sw.c @@ -94,7 +94,7 @@ out: return(ret); } -int getprio (struct path * pp) +int getprio (struct path * pp, char * args) { return hp_sw_prio(pp->dev, pp->fd); } diff --git a/libmultipath/prioritizers/hp_sw.h b/libmultipath/prioritizers/hp_sw.h deleted file mode 100644 index 2fea486..0000000 --- a/libmultipath/prioritizers/hp_sw.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _HP_SW_H -#define _HP_SW_H - -#define PRIO_HP_SW "hp_sw" -int prio_hp_sw(struct path * pp); - -#endif diff --git a/libmultipath/prioritizers/netapp.c b/libmultipath/prioritizers/netapp.c index 812ecf6..c695cd3 100644 --- a/libmultipath/prioritizers/netapp.c +++ b/libmultipath/prioritizers/netapp.c @@ -237,7 +237,7 @@ static int netapp_prio(const char *dev, int fd) } } -int getprio (struct path * pp) +int getprio (struct path * pp, char * args) { return netapp_prio(pp->dev, pp->fd); } diff --git a/libmultipath/prioritizers/netapp.h b/libmultipath/prioritizers/netapp.h deleted file mode 100644 index ec38821..0000000 --- a/libmultipath/prioritizers/netapp.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _NETAPP_H -#define _NETAPP_H - -#define PRIO_NETAPP "netapp" -int prio_netapp(struct path * pp); - -#endif diff --git a/libmultipath/prioritizers/random.c b/libmultipath/prioritizers/random.c index e3852a7..281a0d1 100644 --- a/libmultipath/prioritizers/random.c +++ b/libmultipath/prioritizers/random.c @@ -5,10 +5,10 @@ #include <prio.h> -int getprio (struct path * pp) +int getprio (struct path * pp, char * args) { struct timeval tv; - + gettimeofday(&tv, NULL); srand((unsigned int)tv.tv_usec); return 1+(int) (10.0*rand()/(RAND_MAX+1.0)); diff --git a/libmultipath/prioritizers/random.h b/libmultipath/prioritizers/random.h deleted file mode 100644 index b9dae69..0000000 --- a/libmultipath/prioritizers/random.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _RANDOM_H -#define _RANDOM_H - -#define PRIO_RANDOM "random" -int prio_random(struct path * pp); - -#endif diff --git a/libmultipath/prioritizers/rdac.c b/libmultipath/prioritizers/rdac.c index 7eafc31..27d51ab 100644 --- a/libmultipath/prioritizers/rdac.c +++ b/libmultipath/prioritizers/rdac.c @@ -85,7 +85,7 @@ out: return(ret); } -int getprio (struct path * pp) +int getprio (struct path * pp, char * args) { return rdac_prio(pp->dev, pp->fd); } diff --git a/libmultipath/prioritizers/rdac.h b/libmultipath/prioritizers/rdac.h deleted file mode 100644 index a5b7f8e..0000000 --- a/libmultipath/prioritizers/rdac.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _RDAC_H -#define _RDAC_H - -#define PRIO_RDAC "rdac" -int prio_rdac(struct path * pp); - -#endif diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c index baab020..2187558 100644 --- a/libmultipath/propsel.c +++ b/libmultipath/propsel.c @@ -332,19 +332,28 @@ select_prio (struct path * pp) { if (pp->hwe && pp->hwe->prio_name) { pp->prio = prio_lookup(pp->hwe->prio_name); + prio_set_args(pp->prio, pp->hwe->prio_args); condlog(3, "%s: prio = %s (controller setting)", pp->dev, pp->hwe->prio_name); + condlog(3, "%s: prio args = %s (controller setting)", + pp->dev, pp->hwe->prio_args); return 0; } if (conf->prio_name) { pp->prio = prio_lookup(conf->prio_name); + prio_set_args(pp->prio, conf->prio_args); condlog(3, "%s: prio = %s (config file default)", pp->dev, conf->prio_name); + condlog(3, "%s: prio args = %s (config file default)", + pp->dev, conf->prio_args); return 0; } pp->prio = prio_lookup(DEFAULT_PRIO); + prio_set_args(pp->prio, DEFAULT_PRIO_ARGS); condlog(3, "%s: prio = %s (internal default)", pp->dev, DEFAULT_PRIO); + condlog(3, "%s: prio = %s (internal default)", + pp->dev, DEFAULT_PRIO_ARGS); return 0; } diff --git a/libmultipath/version.h b/libmultipath/version.h index d8417d4..cefd6b5 100644 --- a/libmultipath/version.h +++ b/libmultipath/version.h @@ -21,7 +21,7 @@ #define _VERSION_H #define VERSION_CODE 0x000409 -#define DATE_CODE 0x040409 +#define DATE_CODE 0x052110 #define PROG "multipath-tools" diff --git a/multipath.conf.annotated b/multipath.conf.annotated index 4bbdf28..9be7a2d 100644 --- a/multipath.conf.annotated +++ b/multipath.conf.annotated @@ -28,7 +28,7 @@ # # # # # name : selector -# # scope : multipath +# # scope : multipath & multipathd # # desc : the default path selector algorithm to use # # these algorithms are offered by the kernel multipath target # # values : "round-robin 0" @@ -38,7 +38,7 @@ # # # # # name : path_grouping_policy -# # scope : multipath +# # scope : multipath & multipathd # # desc : the default path grouping policy to apply to unspecified # # multipaths # # values : failover = 1 path per priority group @@ -54,7 +54,7 @@ # # # # # name : getuid_callout -# # scope : multipath +# # scope : multipath & multipathd # # desc : the default program and args to callout to obtain a unique # # path identifier. Absolute path required # # default : /lib/udev/scsi_id --whitelisted --device=/dev/%n @@ -63,7 +63,7 @@ # # # # # name : prio -# # scope : multipath +# # scope : multipath & multipathd # # desc : the default function to call to obtain a path # # priority value. The ALUA bits in SPC-3 provide an # # exploitable prio value for example. @@ -72,8 +72,18 @@ # prio "alua" # # # +# # name : prio_args +# # scope : multipath & multipathd +# # desc : The arguments string passed to the prio function +# # Most prio functions do not need arguments. The +# # datacore prioritizer need one. +# # default : (null) +# # +# prio_args "timeout=1000 preferredsds=foo" +# +# # # # name : features -# # scope : multipath +# # scope : multipath & multipathd # # desc : The default extra features of multipath devices. The # # only existing feature currently is queue_if_no_path, which # # is the same as setting no_path_retry to queue. @@ -93,7 +103,7 @@ # # # # # name : rr_min_io -# # scope : multipath +# # scope : multipath & multipathd # # desc : the number of IO to route to a path before switching # # to the next in the same path group # # default : 1000 @@ -122,7 +132,7 @@ # # # # # name : rr_weight -# # scope : multipath +# # scope : multipath & multipathd # # desc : if set to priorities the multipath configurator will assign # # path weights as "path prio * rr_min_io" # # values : priorities|uniform @@ -163,7 +173,7 @@ # # # # # name : user_friendly_names -# # scope : multipath +# # scope : multipath & multipathd # # desc : If set to "yes", using the bindings file # # /etc/multipath/bindings to assign a persistent and # # unique alias to the multipath, in the form of mpath<n>. @@ -176,7 +186,7 @@ # # # # # name : mode -# # scope : multipath +# # scope : multipath & multipathd # # desc : The mode to use for the multipath device nodes, in octal. # # values : 0000 - 0777 # # default : determined by the process @@ -184,7 +194,7 @@ # # # # # name : uid -# # scope : multipath +# # scope : multipath & multipathd # # desc : The user id to use for the multipath device nodes. You # # may use either the numeric or symbolic uid # # values : <user_id> @@ -193,7 +203,7 @@ # # # # # name : gid -# # scope : multipath +# # scope : multipath & multipathd # # desc : The group id to user for the multipath device nodes. You # # may use either the numeric or symbolic gid # # values : <group_id> @@ -278,7 +288,7 @@ # # # # # name : alias -# # scope : multipath +# # scope : multipath & multipathd # # desc : symbolic name for the multipath. If you are using # # user_friendly_names, do not set the alias to # # mpath<n>. This may conflict with an automatically @@ -289,7 +299,7 @@ # # # # # name : path_grouping_policy -# # scope : multipath +# # scope : multipath & multipathd # # desc : path grouping policy to apply to this multipath # # values : failover, multibus, group_by_serial # # values : failover = 1 path per priority group @@ -306,6 +316,7 @@ # # # # # name : path_selector +# # scope : multipath & multipathd # # desc : the path selector algorithm to use for this mpath # # these algo are offered by the kernel mpath target # # values : "round-robin 0" @@ -324,7 +335,7 @@ # # # # # name : rr_weight -# # scope : multipath +# # scope : multipath & multipathd # # desc : if set to priorities the multipath configurator will # # assign path weights as "path prio * rr_min_io" # # values : priorities|uniform @@ -343,7 +354,7 @@ # # # # # name : rr_min_io -# # scope : multipath +# # scope : multipath & multipathd # # desc : the number of IO to route to a path before switching # # to the next in the same path group # # @@ -361,7 +372,7 @@ # # # # # name : mode -# # scope : multipath +# # scope : multipath & multipathd # # desc : The mode to use for the multipath device nodes, in # # octal. # # values : 0000 - 0777 @@ -370,7 +381,7 @@ # # # # # name : uid -# # scope : multipath +# # scope : multipath & multipathd # # desc : The user id to use for the multipath device nodes. # # You may use either the numeric or symbolic uid # # values : <user_id> @@ -379,7 +390,7 @@ # # # # # name : gid -# # scope : multipath +# # scope : multipath & multipathd # # desc : The group id to user for the multipath device nodes. # # You may use either the numeric or symbolic gid # # values : <group_id> @@ -418,7 +429,7 @@ # # # # # name : path_grouping_policy -# # scope : multipath +# # scope : multipath & multipathd # # desc : path grouping policy to apply to this multipath # # values : failover, multibus, group_by_serial # # values : failover = 1 path per priority group @@ -435,7 +446,7 @@ # # # # # name : getuid_callout -# # scope : multipath +# # scope : multipath & multipathd # # desc : the program and args to callout to obtain a unique # # path identifier. Absolute path required # # @@ -443,7 +454,7 @@ # # # # # name : prio -# # scope : multipath +# # scope : multipath & multipathd # # desc : the function to call to obtain a path # # weight. Weights are summed for each path group to # # determine the next PG to use case of failure. @@ -451,9 +462,18 @@ # # # prio "hp_sw" # +# # # +# # name : prio_args +# # scope : multipath & multipathd +# # desc : The arguments string passed to the prio function +# # Most prio functions do not need arguments. The +# # datacore prioritizer need one. +# # default : (null) # # +# prio_args "timeout=1000 preferredsds=foo" +## # # name : path_checker, checker -# # scope : multipathd +# # scope : multipathd & multipathd # # desc : path checking alorithm to use to check path state # # values : readsector0|tur|emc_clariion|hp_sw|directio|rdac| # # cciss_tur @@ -462,6 +482,7 @@ # # # # # name : path_selector +# # scope : multipathd & multipathd # # desc : the path selector algorithm to use for this mpath # # these algo are offered by the kernel mpath target # # values : "round-robin 0" @@ -470,7 +491,7 @@ # # # # # name : features -# # scope : multipath +# # scope : multipath & multipathd # # desc : The extra features of multipath devices. The only # # existing feature currently is queue_if_no_path, # # which is the same as setting no_path_retry to queue. @@ -480,7 +501,7 @@ # # # # # name : hardware_handler -# # scope : multipath +# # scope : multipath & multipathd # # desc : If set, it specifies a module that will be used to # # perform hardware specific actions when switching # # path groups or handling IO errors @@ -501,7 +522,7 @@ # # # # # name : rr_weight -# # scope : multipath +# # scope : multipath & multipathd # # desc : if set to priorities the multipath configurator will # # assign path weights as "path prio * rr_min_io" # # values : priorities|uniform @@ -520,7 +541,7 @@ # # # # # name : rr_min_io -# # scope : multipath +# # scope : multipath & multipathd # # desc : the number of IO to route to a path before switching # # to the next in the same path group # # diff --git a/multipath.conf.defaults b/multipath.conf.defaults index 5fce694..886a678 100644 --- a/multipath.conf.defaults +++ b/multipath.conf.defaults @@ -8,6 +8,7 @@ # path_grouping_policy failover # getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" # prio const +# prio_args "" # path_checker directio # rr_min_io 1000 # rr_weight uniform @@ -35,6 +36,7 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "3PARdata" @@ -48,6 +50,7 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "DEC" @@ -61,6 +64,7 @@ # rr_min_io 1000 # path_checker hp_sw # prio hp_sw +# prio_args "" # } # device { # vendor "HP" @@ -75,6 +79,7 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "(COMPAQ|HP)" @@ -89,6 +94,7 @@ # rr_min_io 1000 # path_checker hp_sw # prio hp_sw +# prio_args "" # } # device { # vendor "(COMPAQ|HP)" @@ -104,6 +110,7 @@ # rr_min_io 1000 # path_checker tur # prio alua +# prio_args "" # } # device { # vendor "HP" @@ -119,6 +126,7 @@ # rr_min_io 1000 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "(COMPAQ|HP)" @@ -134,6 +142,7 @@ # rr_min_io 1000 # path_checker tur # prio alua +# prio_args "" # } # device { # vendor "HP" @@ -149,6 +158,7 @@ # rr_min_io 1000 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "HP" @@ -164,6 +174,7 @@ # rr_min_io 1000 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "DDN" @@ -177,6 +188,7 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "EMC" @@ -190,13 +202,13 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "DGC" # product ".*" # product_blacklist "LUNZ" # getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" -# prio_callout "/sbin/mpath_prio_emc /dev/%n" # features "1 queue_if_no_path" # hardware_handler "1 emc" # path_selector "round-robin 0" @@ -207,6 +219,7 @@ # rr_min_io 1000 # path_checker emc_clariion # prio emc +# prio_args "" # } # device { # vendor "EMC" @@ -236,6 +249,7 @@ # rr_min_io 1000 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "FSC" @@ -249,6 +263,7 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "(HITACHI|HP)" @@ -262,6 +277,7 @@ # rr_min_io 100 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "HITACHI" @@ -276,6 +292,7 @@ # rr_min_io 1000 # path_checker tur # prio hds +# prio_args "" # } # device { # vendor "IBM" @@ -289,6 +306,7 @@ # rr_min_io 1000 # path_checker readsector0 # prio const +# prio_args "" # } # device { # vendor "IBM" @@ -304,6 +322,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "IBM" @@ -319,6 +338,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "IBM" @@ -334,6 +354,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "IBM" @@ -349,6 +370,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "IBM" @@ -364,6 +386,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "IBM" @@ -379,6 +402,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "IBM" @@ -392,6 +416,7 @@ # rr_min_io 1000 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "IBM" @@ -405,6 +430,7 @@ # rr_min_io 1000 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "IBM" @@ -419,6 +445,7 @@ # rr_min_io 1000 # path_checker tur # prio alua +# prio_args "" # } # device { # vendor "IBM" @@ -432,6 +459,7 @@ # rr_min_io 1000 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "IBM" @@ -446,6 +474,7 @@ # rr_min_io 1000 # path_checker tur # prio alua +# prio_args "" # } # device { # vendor "IBM" @@ -460,6 +489,7 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "NETAPP" @@ -474,6 +504,7 @@ # rr_min_io 128 # path_checker directio # prio netapp +# prio_args "" # } # device { # vendor "NEXENTA" @@ -489,6 +520,7 @@ # rr_min_io 128 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "IBM" @@ -503,6 +535,7 @@ # rr_min_io 128 # path_checker directio # prio netapp +# prio_args "" # } # device { # vendor "Pillar" @@ -516,6 +549,7 @@ # rr_min_io 1000 # path_checker tur # prio alua +# prio_args "" # } # device { # vendor "SGI" @@ -529,6 +563,7 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "SGI" @@ -544,6 +579,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "SGI" @@ -559,6 +595,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "STK" @@ -573,6 +610,7 @@ # rr_min_io 1000 # path_checker tur # prio rdac +# prio_args "" # } # device { # vendor "SUN" @@ -586,6 +624,7 @@ # rr_min_io 1000 # path_checker directio # prio const +# prio_args "" # } # device { # vendor "PIVOT3" @@ -599,6 +638,7 @@ # rr_min_io 1000 # path_checker tur # prio const +# prio_args "" # } # device { # vendor "SUN" @@ -614,6 +654,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "SUN" @@ -629,6 +670,7 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } # device { # vendor "STK" @@ -645,5 +687,6 @@ # rr_min_io 1000 # path_checker rdac # prio rdac +# prio_args "" # } #} |