Skip to contentSkip to conversation

multipath-tools ./multipath.conf.annotated lib ...

PATCH [email protected] 1 participant 1 message Feb 18, 2011 Device mapper

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: [email protected] 2011-02-18 18:27:00

Modified files:
. : multipath.conf.annotated
libmultipath : config.h configure.c dict.c discovery.c
discovery.h propsel.c propsel.h structs.h util.c util.h
multipathd : copy.c main.c

Log message:

	Backport dev_loss_tmo and fast_io_fail_tmo multipath.conf options to RHEL5.
	Fix for bz #672575

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath.conf.annotated.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.18.2.17&r2=1.18.2.18
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/config.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.18.2.13&r2=1.18.2.14
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/configure.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.2.2.10&r2=1.2.2.11
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/dict.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.17.2.16&r2=1.17.2.17
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/discovery.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.32.2.17&r2=1.32.2.18
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/discovery.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.14.2.5&r2=1.14.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/propsel.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.11.2.5&r2=1.11.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/propsel.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.2.2&r2=1.5.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/structs.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.18.2.8&r2=1.18.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/util.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.2.1&r2=1.5.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/util.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.4.2.1&r2=1.4.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/copy.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.2.3&r2=1.5.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.69.2.31&r2=1.69.2.32

multipath.conf.annotated +38 -0
@@ -240,6 +240,26 @@
 #	# default : taken for /sys/block/sd<x>/device/timeout
 #	checker_timeout 60
 #
+#      #
+#      # name    : fast_io_fail_tmo
+#      # scope   : multipath & multipathd
+#      # desc    : The number of seconds the scsi layer will wait after a
+#      #           problem has been detected on a FC remote port before failing
+#      #           IO to devices on that remote port.
+#      # values  : off | n >= 0 (smaller than dev_loss_tmo)
+#      # default : determined by the OS
+#      fast_io_fail_tmo 5
+#
+#      #
+#      # name    : dev_loss_tmo
+#      # scope   : multipath & multipathd
+#      # desc    : The number of seconds the scsi layer will wait after a
+#      #           problem has been detected on a FC remote port before
+#      #           removing it from the system.
+#      # values  : n > 0
+#      # default : determined by the OS
+#      dev_loss_tmo 600
+#
 #}
 #	
 ##
@@ -590,6 +610,24 @@
 #		# default : none
 #		#
 #		product_blacklist	LUN_Z
+#
+#              #
+#              # name    : fast_io_fail_tmo
+#              # scope   : multipath & multipathd
+#              # desc    : The number of seconds the scsi layer will wait after
+#              #           a problem has been detected on a FC remote port
+#              #           before failing IO to devices on that remote port.
+#              # values  : off | n >= 0 (smaller than dev_loss_tmo)
+#              fast_io_fail_tmo 5
+#
+#              #
+#              # name    : dev_loss_tmo
+#              # scope   : multipath & multipathd
+#              # desc    : The number of seconds the scsi layer will wait after
+#              #           a problem has been detected on a FC remote port
+#              #           before removing it from the system.
+#              # values  : n > 0
+#              dev_loss_tmo 600
 #	}
 #	device {
 #		vendor			"COMPAQ  "
libmultipath/config.h +4 -0
@@ -30,6 +30,8 @@
 	int minio;
 	int pg_timeout;
 	int flush_on_last_del;
+	int fast_io_fail;
+	unsigned int dev_loss;
 	struct checker * checker;
 	char * bl_product;
 };
@@ -81,6 +83,8 @@
 	int allow_queueing;
 	int pg_prio_calc;
 	int log_checker_err;
+	int fast_io_fail;
+	unsigned int dev_loss;
 	uid_t uid;
 	gid_t gid;
 	mode_t mode;
libmultipath/configure.c +5 -1
@@ -35,6 +35,7 @@
 #include "dict.h"
 #include "alias.h"
 #include "devmapper.h"
+#include "util.h"
 
 extern int
 setup_map (struct multipath * mpp)
@@ -62,7 +63,10 @@
 	select_minio(mpp);
 	select_no_path_retry(mpp);
 	select_pg_timeout(mpp);
+	select_fast_io_fail(mpp);
+	select_dev_loss(mpp);
 
+	sysfs_set_scsi_tmo(mpp);
 	/*
 	 * assign paths to path groups -- start with no groups and all paths
 	 * in mpp->paths
@@ -635,7 +639,7 @@
 		return NULL;
 
 	if (dev_type == DEV_DEVNODE) {
-		basename(dev, buff);
+		basenamecpy(dev, buff);
 		pp = find_path_by_dev(pathvec, buff);
 		
 		if (!pp) {
libmultipath/dict.c +102 -0

138 lines not on this page · raw message

libmultipath/discovery.c +120 -2

146 lines not on this page · raw message

libmultipath/discovery.h +1 -1
@@ -33,9 +33,9 @@
 int sysfs_get_state (char * sysfs_path, char * dev, char * buff, int len);
 int sysfs_get_size (char * sysfs_path, char * dev, unsigned long long *);
 int sysfs_get_timeout (char * sysfs_path, char * dev, unsigned int *timeout);
+int sysfs_set_scsi_tmo (struct multipath *mpp);
 int path_discovery (vector pathvec, struct config * conf, int flag);
 
-void basename (char *, char *);
 int do_tur (char *);
 int devt2devname (char *, char *);
 int pathinfo (struct path *, vector hwtable, int mask);
libmultipath/propsel.c +42 -0

45 lines not on this page · raw message

libmultipath/propsel.h +2 -0
@@ -15,3 +15,5 @@
 int select_uid(struct multipath *mp);
 int select_gid(struct multipath *mp);
 int select_flush_on_last_del(struct multipath *mp);
+int select_fast_io_fail(struct multipath *mp);
+int select_dev_loss(struct multipath *mp);
libmultipath/structs.h +2 -0
@@ -169,6 +169,8 @@
 	int pg_timeout;
 	int attribute_flags;
 	int flush_on_last_del;
+	int fast_io_fail;
+	unsigned int dev_loss;
 	uid_t uid;
 	gid_t gid;
 	mode_t mode;
libmultipath/util.c +1 -1
@@ -39,7 +39,7 @@
 }
 
 void
-basename (char * str1, char * str2)
+basenamecpy (char * str1, char * str2)
 {
 	char *p = str1 + (strlen(str1) - 1);
 
libmultipath/util.h +1 -1
@@ -3,7 +3,7 @@
 
 int strcmp_chomp(char *, char *);
 void strchop(char *);
-void basename (char * src, char * dst);
+void basenamecpy (char * src, char * dst);
 int filepresent (char * run);
 int get_word (char * sentence, char ** word);
 void cciss_basename (char * , char * );
multipathd/Attic/copy.c +1 -1
@@ -91,7 +91,7 @@
 	char dst[FILESIZE];
 	char filename[FILESIZE];
 	
-	basename(src, filename);
+	basenamecpy(src, filename);
 	if (FILESIZE <= snprintf(dst, FILESIZE, "%s/%s", dstdir, filename)) {
 		condlog(0, "[copy.c] filename buffer overflow : %s ", filename);
 		return -1;
multipathd/main.c +1 -1
@@ -695,7 +695,7 @@
 	if (uev_discard(uev->devpath))
 		return 0;
 
-	basename(uev->devpath, devname);
+	basenamecpy(uev->devpath, devname);
 	lock(vecs->lock);
 
 	/*