summaryrefslogtreecommitdiff
path: root/libmultipath/hwtable.c
diff options
context:
space:
mode:
authorChristophe Varoqui <christophe.varoqui@free.fr>2007-11-19 01:12:23 +0100
committerChristophe Varoqui <christophe.varoqui@free.fr>2007-11-19 01:12:23 +0100
commit0c858203d190690ad46beaa7d9a187260533f7d3 (patch)
tree96f31b82d01fce9449710c4342e7e57847a3d53c /libmultipath/hwtable.c
parentf3e2b4ee182ea9cb2403e1718eee20a55e84dc49 (diff)
downloadmultipath-tools-0c858203d190690ad46beaa7d9a187260533f7d3.tar.gz
multipath-tools-0c858203d190690ad46beaa7d9a187260533f7d3.tar.bz2
multipath-tools-0c858203d190690ad46beaa7d9a187260533f7d3.zip
[libprio] initial commit
Priority callouts are nice, but have drawbacks. 1) multipathd holds a fd per path, but callouts have to open another for themselves. Which may fail. 2) callouts stored on a multipahed filesystem may hang multipathed on paging operation when there are no active path for the hosting device (getprio is in the salvation codepath). The window is small but Netapp fault injection tool manage to triggers the bug reliably. This patch merges to priority methods in multipathd.
Diffstat (limited to 'libmultipath/hwtable.c')
-rw-r--r--libmultipath/hwtable.c71
1 files changed, 36 insertions, 35 deletions
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index f126f13..80b8dd2 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <checkers.h>
+#include <libprio.h>
#include "vector.h"
#include "defaults.h"
@@ -27,7 +28,6 @@ static struct hwentry default_hw[] = {
.vendor = "APPLE*",
.product = "Xserve RAID ",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -37,6 +37,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DEFAULT_CHECKER,
+ .prio_name = DEFAULT_PRIO,
},
/*
* StorageWorks controller family
@@ -48,7 +49,6 @@ static struct hwentry default_hw[] = {
.vendor = "3PARdata",
.product = "VV",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -58,12 +58,12 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DEFAULT_CHECKER,
+ .prio_name = DEFAULT_PRIO,
},
{
.vendor = "DEC",
.product = "HSG80",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_hp_sw /dev/%n",
.features = "1 queue_if_no_path",
.hwhandler = "1 hp-sw",
.selector = DEFAULT_SELECTOR,
@@ -73,12 +73,12 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = HP_SW,
+ .prio_name = PRIO_HP_SW,
},
{
.vendor = "HP",
.product = "A6189A",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -88,13 +88,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DIRECTIO,
+ .prio_name = DEFAULT_PRIO,
},
{
/* MSA 1000/MSA1500 EVA 3000/5000 with old firmware */
.vendor = "(COMPAQ|HP)",
.product = "(MSA|HSV)1.0.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_hp_sw /dev/%n",
.features = "1 queue_if_no_path",
.hwhandler = "1 hp-sw",
.selector = DEFAULT_SELECTOR,
@@ -104,13 +104,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = HP_SW,
+ .prio_name = PRIO_HP_SW,
},
{
/* MSA 1000/1500 with new firmware */
.vendor = "HP",
.product = "MSA VOLUME",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_alua /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -120,12 +120,12 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_ALUA,
},
{
.vendor = "HP",
.product = "MSA2000s*",
.getuid = "/sbin/cciss_id %n",
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -135,13 +135,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = 12,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = DEFAULT_PRIO,
},
{
/* EVA 3000/5000 with new firmware */
.vendor = "(COMPAQ|HP)",
.product = "(MSA|HSV)1.1.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_alua /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -151,13 +151,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_ALUA,
},
{
/* EVA 4000/6000/8000 */
.vendor = "HP",
.product = "HSV2.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_alua /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -167,13 +167,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_ALUA,
},
{
/* HP Smart Array */
.vendor = "HP",
.product = "LOGICAL VOLUME.*",
.getuid = "/lib/udev/scsi_id -n -g -u -s /block/%n",
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -183,6 +183,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = DEFAULT_PRIO,
},
/*
* DDN controller family
@@ -194,7 +195,6 @@ static struct hwentry default_hw[] = {
.vendor = "DDN",
.product = "SAN DataDirector",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -204,6 +204,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DIRECTIO,
+ .prio_name = DEFAULT_PRIO,
},
/*
* EMC / Clariion controller family
@@ -215,7 +216,6 @@ static struct hwentry default_hw[] = {
.vendor = "EMC",
.product = "SYMMETRIX",
.getuid = "/lib/udev/scsi_id -g -u -ppre-spc3-83 -s /block/%n",
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -225,13 +225,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DIRECTIO,
+ .prio_name = DEFAULT_PRIO,
},
{
.vendor = "DGC",
.product = ".*",
.bl_product = "LUNZ",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_emc /dev/%n",
.features = "1 queue_if_no_path",
.hwhandler = "1 emc",
.selector = DEFAULT_SELECTOR,
@@ -241,6 +241,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = (300 / DEFAULT_CHECKINT),
.minio = DEFAULT_MINIO,
.checker_name = EMC_CLARIION,
+ .prio_name = PRIO_EMC,
},
/*
* Fujitsu controller family
@@ -252,7 +253,6 @@ static struct hwentry default_hw[] = {
.vendor = "FSC",
.product = "CentricStor",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -262,6 +262,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DIRECTIO,
+ .prio_name = DEFAULT_PRIO,
},
/*
* Hitachi controller family
@@ -273,7 +274,6 @@ static struct hwentry default_hw[] = {
.vendor = "(HITACHI|HP)",
.product = "OPEN-.*",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -283,12 +283,12 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = DEFAULT_PRIO,
},
{
.vendor = "HITACHI",
.product = "DF.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_hds_modular /dev/%n",
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -298,6 +298,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_HDS,
},
/*
* IBM controller family
@@ -309,7 +310,6 @@ static struct hwentry default_hw[] = {
.vendor = "IBM",
.product = "ProFibre 4000R",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -319,13 +319,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DIRECTIO,
+ .prio_name = DEFAULT_PRIO,
},
{
/* IBM DS4100 / FAStT100 */
.vendor = "IBM",
.product = "1742",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_rdac /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -335,13 +335,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_RDAC,
},
{
/* IBM Netfinity Fibre Channel RAID Controller Unit */
.vendor = "IBM",
.product = "3526",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_rdac /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -351,13 +351,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_RDAC,
},
{
/* IBM DS4200 / FAStT200 */
.vendor = "IBM",
.product = "3542",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -367,13 +367,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = DEFAULT_PRIO,
},
{
/* IBM ESS F20 aka Shark */
.vendor = "IBM",
.product = "2105(800|F20)",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -383,13 +383,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = DEFAULT_PRIO,
},
{
/* IBM DS6000 */
.vendor = "IBM",
.product = "1750500",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_alua /dev/%n",
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -399,13 +399,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_ALUA,
},
{
/* IBM DS8000 */
.vendor = "IBM",
.product = "2107900",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -415,13 +415,13 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = DEFAULT_PRIO,
},
{
/* IBM SAN Volume Controller */
.vendor = "IBM",
.product = "2145",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_alua /dev/%n",
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -431,6 +431,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_ALUA,
},
{
/* IBM S/390 ECKD DASD */
@@ -438,7 +439,6 @@ static struct hwentry default_hw[] = {
.product = "S/390 DASD ECKD",
.bl_product = "S/390.*",
.getuid = "/sbin/dasdinfo -u -b %n",
- .getprio = NULL,
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -448,6 +448,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DIRECTIO,
+ .prio_name = DEFAULT_PRIO,
},
/*
* NETAPP controller family
@@ -459,7 +460,6 @@ static struct hwentry default_hw[] = {
.vendor = "NETAPP",
.product = "LUN.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_netapp /dev/%n",
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -469,6 +469,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = 128,
.checker_name = DIRECTIO,
+ .prio_name = PRIO_NETAPP,
},
/*
* IBM NSeries (NETAPP) controller family
@@ -480,7 +481,6 @@ static struct hwentry default_hw[] = {
.vendor = "IBM",
.product = "Nseries.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_netapp /dev/%n",
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -490,6 +490,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = 128,
.checker_name = DIRECTIO,
+ .prio_name = PRIO_NETAPP,
},
/*
* Pillar Data controller family
@@ -501,7 +502,6 @@ static struct hwentry default_hw[] = {
.vendor = "Pillar",
.product = "Axiom.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_alua %n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -511,6 +511,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_ALUA,
},
/*
* SGI arrays
@@ -522,7 +523,6 @@ static struct hwentry default_hw[] = {
.vendor = "SGI",
.product = "TP9[13]00",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -532,12 +532,12 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DIRECTIO,
+ .prio_name = DEFAULT_PRIO,
},
{
.vendor = "SGI",
.product = "TP9[45]00",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_rdac /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -547,12 +547,12 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_QUEUE,
.minio = DEFAULT_MINIO,
.checker_name = RDAC,
+ .prio_name = PRIO_RDAC,
},
{
.vendor = "SGI",
.product = "IS.*",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_rdac /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -562,6 +562,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_QUEUE,
.minio = DEFAULT_MINIO,
.checker_name = RDAC,
+ .prio_name = PRIO_RDAC,
},
/*
* STK arrays
@@ -573,7 +574,6 @@ static struct hwentry default_hw[] = {
.vendor = "STK",
.product = "OPENstorage D280",
.getuid = DEFAULT_GETUID,
- .getprio = "/sbin/mpath_prio_rdac /dev/%n",
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -583,6 +583,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = TUR,
+ .prio_name = PRIO_RDAC,
},
/*
* SUN arrays
@@ -594,7 +595,6 @@ static struct hwentry default_hw[] = {
.vendor = "SUN",
.product = "(StorEdge 3510|T4)",
.getuid = DEFAULT_GETUID,
- .getprio = NULL,
.features = DEFAULT_FEATURES,
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -604,6 +604,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = DEFAULT_MINIO,
.checker_name = DIRECTIO,
+ .prio_name = DEFAULT_PRIO,
},
/*
* Pivot3 RAIGE
@@ -615,7 +616,6 @@ static struct hwentry default_hw[] = {
.vendor = "PIVOT3",
.product = "RAIGE VOLUME",
.getuid = "/sbin/scsi_id -p 0x80 -g -u -s /block/%n",
- .getprio = NULL,
.features = "1 queue_if_no_path",
.hwhandler = DEFAULT_HWHANDLER,
.selector = DEFAULT_SELECTOR,
@@ -625,6 +625,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = NO_PATH_RETRY_UNDEF,
.minio = 100,
.checker_name = TUR,
+ .prio_name = DEFAULT_PRIO,
},
/*
* EOL
@@ -633,7 +634,6 @@ static struct hwentry default_hw[] = {
.vendor = NULL,
.product = NULL,
.getuid = NULL,
- .getprio = NULL,
.features = NULL,
.hwhandler = NULL,
.selector = NULL,
@@ -643,6 +643,7 @@ static struct hwentry default_hw[] = {
.no_path_retry = 0,
.minio = 0,
.checker_name = NULL,
+ .prio_name = NULL,
},
};