multipath-tools ./multipath.conf.annotated ./m ...
CVSROOT: /cvs/dm
Module name: multipath-tools
Changes by: [email protected] 2007-01-15 21:52:20
Modified files:
. : multipath.conf.annotated
multipath.conf.synthetic
libmultipath : blacklist.c blacklist.h config.c config.h
dict.c discovery.c print.c print.h
multipath : main.c multipath.conf.redhat
multipathd : cli.c cli.h cli_handlers.c cli_handlers.h
main.c multipathd.8
Log message:
updated to latest upstream code
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath.conf.annotated.diff?cvsroot=dm&r1=1.18&r2=1.19
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath.conf.synthetic.diff?cvsroot=dm&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/blacklist.c.diff?cvsroot=dm&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/blacklist.h.diff?cvsroot=dm&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.c.diff?cvsroot=dm&r1=1.20&r2=1.21
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.h.diff?cvsroot=dm&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/dict.c.diff?cvsroot=dm&r1=1.17&r2=1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/discovery.c.diff?cvsroot=dm&r1=1.33&r2=1.34
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/print.c.diff?cvsroot=dm&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/print.h.diff?cvsroot=dm&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath/main.c.diff?cvsroot=dm&r1=1.45&r2=1.46
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath/multipath.conf.redhat.diff?cvsroot=dm&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/cli.c.diff?cvsroot=dm&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/cli.h.diff?cvsroot=dm&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/cli_handlers.c.diff?cvsroot=dm&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/cli_handlers.h.diff?cvsroot=dm&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&r1=1.69&r2=1.70
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/multipathd.8.diff?cvsroot=dm&r1=1.5&r2=1.6
multipath.conf.annotated +16 -0
@@ -142,6 +142,22 @@ # product MSA[15]00 # } #} +## +## name : blacklist_exceptions +## scope : multipath & multipathd +## desc : list of device names to be treated as multipath candidates +## even if they are on the blacklist. +## Note: blacklist exceptions are only valid in the same class. +## It is not possible to blacklist devices using the devnode keyword +## and to exclude some devices of them using the wwid keyword. +## default : - +## +#blacklist_exceptions { +# devnode "^dasd[c-d]+[0-9]*" +# wwid "IBM.75000000092461.4d00.34" +# wwid "IBM.75000000092461.4d00.35" +# wwid "IBM.75000000092461.4d00.36" +#} # ## ## name : multipaths
multipath.conf.synthetic +5 -1
@@ -16,7 +16,7 @@ # no_path_retry fail # user_friendly_names no #} -#devnode_blacklist { +#blacklist { # wwid 26353900f02796769 # devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" # devnode "^hd[a-z][[0-9]*]"
@@ -26,6 +26,10 @@ # product MSA[15]00 # } #} +#blacklist_exceptions { +# devnode "^dasd[c-d]+[0-9]*" +# wwid "IBM.75000000092461.4d00.34" +#} #multipaths { # multipath { # wwid 3600508b4000156d700012000000b0000
libmultipath/blacklist.c +51 -12
146 lines not on this page · raw message
libmultipath/blacklist.h +6 -4
@@ -6,6 +6,7 @@struct blentry {char * str;regex_t regex; +int origin; };struct blentry_device {
@@ -13,15 +14,16 @@char * product;regex_t vendor_reg;regex_t product_reg; +int origin; };int setup_default_blist (struct config *);int alloc_ble_device (vector ); -int blacklist (vector ,char *); -int blacklist_device (vector ,char *,char *); +int blacklist (vector ,vector ,char *); +int blacklist_device (vector ,vector ,char *,char *);int blacklist_path (struct config *,struct path *); -int store_ble (vector ,char *); -int set_ble_device (vector ,char *,char *); +int store_ble (vector ,char *,int ); +int set_ble_device (vector ,char *,char *,int );void free_blacklist (vector );void free_blacklist_device (vector );
libmultipath/config.c +25 -0
@@ -333,6 +333,11 @@free_blacklist (conf->blist_devnode);free_blacklist (conf->blist_wwid);free_blacklist_device (conf->blist_device); + +free_blacklist (conf->elist_devnode); +free_blacklist (conf->elist_wwid); +free_blacklist_device (conf->elist_device); +free_mptable (conf->mptable);free_hwtable (conf->hwtable);free_keywords (conf->keywords);
@@ -403,6 +408,26 @@if (setup_default_blist (conf)) goto out; +if (conf->elist_devnode ==NULL ) { + conf->elist_devnode =vector_alloc (); + +if (!conf->elist_devnode) + goto out; + } +if (conf->elist_wwid ==NULL ) { + conf->elist_wwid =vector_alloc (); + +if (!conf->elist_wwid) + goto out; + } + +if (conf->elist_device ==NULL ) { + conf->elist_device =vector_alloc (); + +if (!conf->elist_device) + goto out; + } +if (conf->mptable ==NULL ) { conf->mptable =vector_alloc ();
libmultipath/config.h +6 -0
@@ -1,6 +1,9 @@#ifndef _CONFIG_H#define _CONFIG_H +#define ORIGIN_DEFAULT 0 +#define ORIGIN_CONFIG 1 +enum devtypes {DEV_NONE , DEV_DEVT,
@@ -78,6 +81,9 @@vector blist_devnode;vector blist_wwid;vector blist_device; +vector elist_devnode; +vector elist_wwid; +vector elist_device; };struct config * conf;
libmultipath/dict.c +84 -4
130 lines not on this page · raw message
libmultipath/discovery.c +2 -2
@@ -104,7 +104,7 @@if (!devname)return 0 ; -if (blacklist (conf->blist_devnode, devname)) +if (blacklist (conf->blist_devnode, conf->elist_devnode, devname))return 0 ; if(safe_sprintf(path, "%s/block/%s/device", sysfs_path,
@@ -426,7 +426,7 @@if (sscanf (pp->dev,"gnbd%u" , &unused) ==1 ){strcpy (pp->vendor_id,"GNBD" );strcpy (pp->product_id,"GNBD" ); - pp->hwe =find_hwe (conf->hwtable, pp->vendor_id, pp->product_id); + pp->hwe =find_hwe (conf->hwtable, pp->vendor_id, pp->product_id,NULL );return 0 ; }/*
libmultipath/print.c +219 -1
249 lines not on this page · raw message
libmultipath/print.h +3 -0
@@ -42,6 +42,9 @@ int verbosity);int snprint_defaults (char *,int );int snprint_blacklist (char *,int ); +int snprint_blacklist_except (char *,int ); +int snprint_blacklist_report (char *,int ); +int snprint_devices (char *,int ,struct vectors *);int snprint_hwtable (char *,int ,vector );int snprint_mptable (char *,int ,vector );
multipath/main.c +3 -3
@@ -1,7 +1,7 @@/* * Soft: multipath device mapper target autoconfig * -* Version: $Id: main.c,v 1.45 2006/12/13 00:02:59 bmarzins Exp $ +* Version: $Id: main.c,v 1.46 2007/01/15 21:52:20 bmarzins Exp $ * * Author: Christophe Varoqui *
@@ -234,7 +234,7 @@ dev = conf->dev; } -if (dev &&blacklist (conf->blist_devnode, dev)) +if (dev &&blacklist (conf->blist_devnode, conf->elist_devnode, dev)) goto out;/*
@@ -250,7 +250,7 @@ }condlog (3 ,"scope limited to %s" , refwwid); -if (blacklist (conf->blist_wwid, refwwid)) +if (blacklist (conf->blist_wwid, conf->elist_wwid, refwwid)) goto out; }
multipath/multipath.conf.redhat +6 -1
@@ -36,7 +36,12 @@ ## ## The wwid line in the following blacklist section is shown as an example ## of how to blacklist devices by wwid. The 3 devnode lines are the -## compiled in default blacklist. +## compiled in default blacklist. If you want to blacklist entire types +## of devices, such as all scsi devices, you should use a devnode line. +## However, if you want to blacklist specific devices, you should use +## a wwid line. Since there is no guarantee that a specific device will +## not change names on reboot (from /dev/sda to /dev/sdb for example) +## devnode lines are not recommended for blacklisting specific devices. ## #devnode_blacklist { # wwid 26353900f02796769
multipathd/cli.c +2 -0
@@ -141,6 +141,8 @@ r +=add_key (keys,"stats" ,STATS ,0 ); r +=add_key (keys,"topology" ,TOPOLOGY ,0 ); r +=add_key (keys,"config" ,CONFIG ,0 ); + r +=add_key (keys,"blacklist" ,BLACKLIST ,0 ); + r +=add_key (keys,"devices" ,DEVICES ,0 );if (r) {free_keys (keys);
multipathd/cli.h +4 -0
@@ -17,6 +17,8 @@ __STATS, __TOPOLOGY, __CONFIG, + __BLACKLIST, + __DEVICES, };#define LIST (1 << __LIST)
@@ -37,6 +39,8 @@#define STATS (1 << __STATS)#define TOPOLOGY (1 << __TOPOLOGY)#define CONFIG (1 << __CONFIG) +#define BLACKLIST (1 << __BLACKLIST) +#define DEVICES (1 << __DEVICES)#define INITIAL_REPLY_LEN 1000
multipathd/cli_handlers.c +84 -2
107 lines not on this page · raw message
multipathd/cli_handlers.h +2 -0
@@ -5,6 +5,8 @@int cli_list_map_topology (void * v,char ** reply,int * len,void * data);int cli_list_maps_topology (void * v,char ** reply,int * len,void * data);int cli_list_config (void * v,char ** reply,int * len,void * data); +int cli_list_blacklist (void * v,char ** reply,int * len,void * data); +int cli_list_devices (void * v,char ** reply,int * len,void * data);int cli_add_path (void * v,char ** reply,int * len,void * data);int cli_del_path (void * v,char ** reply,int * len,void * data);int cli_add_map (void * v,char ** reply,int * len,void * data);
multipathd/main.c +3 -1
@@ -675,7 +675,7 @@/* * path add/remove event */ -if (blacklist (conf->blist_devnode, devname)) +if (blacklist (conf->blist_devnode, conf->elist_devnode, devname)) goto out;if (!strncmp (uev->action,"add" ,3 )) {
@@ -718,6 +718,8 @@add_handler (LIST +TOPOLOGY , cli_list_maps_topology);add_handler (LIST +MAP +TOPOLOGY , cli_list_map_topology);add_handler (LIST +CONFIG , cli_list_config); +add_handler (LIST +BLACKLIST , cli_list_blacklist); +add_handler (LIST +DEVICES , cli_list_devices);add_handler (ADD +PATH , cli_add_path);add_handler (DEL +PATH , cli_del_path);add_handler (ADD +MAP , cli_add_map);
multipathd/multipathd.8 +6 -0
@@ -57,6 +57,12 @@ .B list|show config Show the currently used configuration, derived from default values and values specified within the configuration file /etc/multipath.conf. .TP +.B list|show blacklist +Show the currently used blacklist rules, derived from default values and values specified within the configuration file /etc/multipath.conf. +.TP +.B list|show devices +Show all available block devices by name including the information if they are blacklisted or not. +.TP .B add path $path Add a path to the list of monitored paths. $path is as listed in /sys/block (e.g. sda). .TP