packages: multipath-tools/multipath-tools-git.patch, multipath-tools/multip...

arekm arekm at pld-linux.org
Tue Feb 8 11:44:34 CET 2011


Author: arekm                        Date: Tue Feb  8 10:44:34 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 6; git fixes

---- Files affected:
packages/multipath-tools:
   multipath-tools-git.patch (1.1 -> 1.2) , multipath-tools.spec (1.74 -> 1.75) , multipath-tools-fortify.patch (1.1 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/multipath-tools/multipath-tools-git.patch
diff -u packages/multipath-tools/multipath-tools-git.patch:1.1 packages/multipath-tools/multipath-tools-git.patch:1.2
--- packages/multipath-tools/multipath-tools-git.patch:1.1	Wed Nov 17 15:07:20 2010
+++ packages/multipath-tools/multipath-tools-git.patch	Tue Feb  8 11:44:29 2011
@@ -1,3 +1,110 @@
+diff --git a/kpartx/devmapper.c b/kpartx/devmapper.c
+index f884511..7ebc5b6 100644
+--- a/kpartx/devmapper.c
++++ b/kpartx/devmapper.c
+@@ -81,7 +81,7 @@ dm_simplecmd (int task, const char *name, int no_flush, uint32_t *cookie) {
+ 
+ extern int
+ dm_addmap (int task, const char *name, const char *target,
+-	   const char *params, uint64_t size, const char *uuid, int part,
++	   const char *params, uint64_t size, int ro, const char *uuid, int part,
+ 	   mode_t mode, uid_t uid, gid_t gid, uint32_t *cookie) {
+ 	int r = 0;
+ 	struct dm_task *dmt;
+@@ -96,6 +96,9 @@ dm_addmap (int task, const char *name, const char *target,
+ 	if (!dm_task_add_target (dmt, 0, size, target, params))
+ 		goto addout;
+ 
++	if (ro && !dm_task_set_ro (dmt))
++			goto addout;
++
+ 	if (task == DM_DEVICE_CREATE && uuid) {
+ 		prefixed_uuid = malloc(MAX_PREFIX_LEN + strlen(uuid) + 1);
+ 		if (!prefixed_uuid) {
+diff --git a/kpartx/devmapper.h b/kpartx/devmapper.h
+index f8692cc..6226129 100644
+--- a/kpartx/devmapper.h
++++ b/kpartx/devmapper.h
+@@ -5,7 +5,7 @@
+ int dm_prereq (char *, int, int, int);
+ int dm_simplecmd (int, const char *, int, uint32_t *);
+ int dm_addmap (int, const char *, const char *, const char *, uint64_t,
+-	       const char *, int, mode_t, uid_t, gid_t, uint32_t *);
++	       int, const char *, int, mode_t, uid_t, gid_t, uint32_t *);
+ int dm_map_present (char *);
+ char * dm_mapname(int major, int minor);
+ dev_t dm_get_first_dep(char *devname);
+diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
+index 3d33990..f518aa0 100644
+--- a/kpartx/kpartx.c
++++ b/kpartx/kpartx.c
+@@ -82,7 +82,7 @@ initpts(void)
+ 	addpts("sun", read_sun_pt);
+ }
+ 
+-static char short_opts[] = "ladgvp:t:s";
++static char short_opts[] = "rladgvp:t:s";
+ 
+ /* Used in gpt.c */
+ int force_gpt=0;
+@@ -91,6 +91,7 @@ static int
+ usage(void) {
+ 	printf("usage : kpartx [-a|-d|-l] [-v] wholedisk\n");
+ 	printf("\t-a add partition devmappings\n");
++	printf("\t-r devmappings will be readonly\n");
+ 	printf("\t-d del partition devmappings\n");
+ 	printf("\t-l list partitions devmappings that would be added by -a\n");
+ 	printf("\t-p set device name-partition number delimiter\n");
+@@ -185,7 +186,7 @@ get_hotplug_device(void)
+ 
+ int
+ main(int argc, char **argv){
+-	int fd, i, j, m, n, op, off, arg, c, d;
++	int fd, i, j, m, n, op, off, arg, c, d, ro=0;
+ 	struct slice all;
+ 	struct pt *ptp;
+ 	enum action what = LIST;
+@@ -233,6 +234,9 @@ main(int argc, char **argv){
+ 	}
+ 
+ 	while ((arg = getopt(argc, argv, short_opts)) != EOF) switch(arg) {
++		case 'r':
++			ro=1;
++			break;
+ 		case 'g':
+ 			force_gpt=1;
+ 			break;
+@@ -470,7 +474,7 @@ main(int argc, char **argv){
+ 					DM_DEVICE_RELOAD : DM_DEVICE_CREATE);
+ 
+ 				if (!dm_addmap(op, partname, DM_TARGET, params,
+-					       slices[j].size, uuid, j+1,
++					       slices[j].size, ro, uuid, j+1,
+ 					       buf.st_mode & 0777, buf.st_uid,
+ 					       buf.st_gid, &cookie)) {
+ 					fprintf(stderr, "create/reload failed on %s\n",
+@@ -536,7 +540,7 @@ main(int argc, char **argv){
+ 					      DM_DEVICE_RELOAD : DM_DEVICE_CREATE);
+ 
+ 					dm_addmap(op, partname, DM_TARGET, params,
+-						  slices[j].size, uuid, j+1,
++						  slices[j].size, ro, uuid, j+1,
+ 						  buf.st_mode & 0777,
+ 						  buf.st_uid, buf.st_gid,
+ 						  &cookie);
+diff --git a/libmultipath/Makefile b/libmultipath/Makefile
+index 203833d..c07b073 100644
+--- a/libmultipath/Makefile
++++ b/libmultipath/Makefile
+@@ -26,7 +26,7 @@ endif
+ all: $(LIBS)
+ 
+ $(LIBS): $(OBJS)
+-	$(CC) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS)
++	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ $(CFLAGS) -o $@ $(OBJS) $(LIBDEPS)
+ 	ln -sf $@ $(DEVLIB)
+ 
+ install:
 diff --git a/libmultipath/alias.c b/libmultipath/alias.c
 index 95506b4..4159ec6 100644
 --- a/libmultipath/alias.c
@@ -134,11 +241,253 @@
 +char *get_user_friendly_alias(char *wwid, char *file, char *prefix,
 +			      int bindings_readonly);
  char *get_user_friendly_wwid(char *alias, char *file);
+diff --git a/libmultipath/checkers.h b/libmultipath/checkers.h
+index 6ba0339..272cd8f 100644
+--- a/libmultipath/checkers.h
++++ b/libmultipath/checkers.h
+@@ -68,20 +68,6 @@ enum path_check_state {
+ 
+ #define DEFAULT_CHECKER DIRECTIO
+ 
+-/*
+- * Overloaded storage response time can be very long.
+- * SG_IO timouts after DEF_TIMEOUT milliseconds, and checkers interprets this
+- * as a path failure. multipathd then proactively evicts the path from the DM
+- * multipath table in this case.
+- *
+- * This generaly snow balls and ends up in full eviction and IO errors for end
+- * users. Bad. This may also cause SCSI bus resets, causing disruption for all
+- * local and external storage hardware users.
+- * 
+- * Provision a long timeout. Longer than any real-world application would cope
+- * with.
+- */
+-#define DEF_TIMEOUT		300000
+ #define ASYNC_TIMEOUT_SEC	30
+ 
+ /*
+@@ -96,6 +82,7 @@ struct checker {
+ 	struct list_head node;
+ 	int fd;
+ 	int sync;
++	unsigned int timeout;
+ 	int disable;
+ 	char name[CHECKER_NAME_LEN];
+ 	char message[CHECKER_MSG_LEN];       /* comm with callers */
+diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile
+index 92a9382..4b1a108 100644
+--- a/libmultipath/checkers/Makefile
++++ b/libmultipath/checkers/Makefile
+@@ -18,10 +18,10 @@ CFLAGS += -I..
+ all: $(LIBS)
+ 
+ libcheckdirectio.so: libsg.o directio.o
+-	$(CC) $(SHARED_FLAGS) -o $@ $^ -laio
++	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^ -laio
+ 
+ libcheck%.so: libsg.o %.o
+-	$(CC) $(SHARED_FLAGS) -o $@ $^
++	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^
+ 
+ install:
+ 	$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir)
+diff --git a/libmultipath/checkers/emc_clariion.c b/libmultipath/checkers/emc_clariion.c
+index 3a88b0b..fa04468 100644
+--- a/libmultipath/checkers/emc_clariion.c
++++ b/libmultipath/checkers/emc_clariion.c
+@@ -113,7 +113,7 @@ int libcheck_check (struct checker * c)
+ 	io_hdr.dxferp = sense_buffer;
+ 	io_hdr.cmdp = inqCmdBlk;
+ 	io_hdr.sbp = sb;
+-	io_hdr.timeout = DEF_TIMEOUT;
++	io_hdr.timeout = c->timeout;
+ 	io_hdr.pack_id = 0;
+ 	if (ioctl(c->fd, SG_IO, &io_hdr) < 0) {
+ 		MSG(c, "emc_clariion_checker: sending query command failed");
+@@ -182,7 +182,7 @@ int libcheck_check (struct checker * c)
+ 		unsigned char buf[4096];
+ 
+ 		memset(buf, 0, 4096);
+-		ret = sg_read(c->fd, &buf[0], sbb = &sb[0]);
++		ret = sg_read(c->fd, &buf[0], sbb = &sb[0], c->timeout);
+ 		if (ret == PATH_DOWN) {
+ 			hexadecimal_to_ascii(ct->wwn, wwnstr);
+ 
+diff --git a/libmultipath/checkers/hp_sw.c b/libmultipath/checkers/hp_sw.c
+index 3f28d85..b50ac0c 100644
+--- a/libmultipath/checkers/hp_sw.c
++++ b/libmultipath/checkers/hp_sw.c
+@@ -46,7 +46,7 @@ void libcheck_free (struct checker * c)
+ 
+ static int
+ do_inq(int sg_fd, int cmddt, int evpd, unsigned int pg_op,
+-       void *resp, int mx_resp_len, int noisy)
++       void *resp, int mx_resp_len, int noisy, unsigned int timeout)
+ {
+ 	unsigned char inqCmdBlk[INQUIRY_CMDLEN] =
+ 		{ INQUIRY_CMD, 0, 0, 0, 0, 0 };
+@@ -70,7 +70,7 @@ do_inq(int sg_fd, int cmddt, int evpd, unsigned int pg_op,
+ 	io_hdr.dxferp = resp;
+ 	io_hdr.cmdp = inqCmdBlk;
+ 	io_hdr.sbp = sense_b;
+-	io_hdr.timeout = DEF_TIMEOUT;
++	io_hdr.timeout = timeout;
+ 
+ 	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0)
+ 		return 1;
+@@ -98,7 +98,7 @@ do_inq(int sg_fd, int cmddt, int evpd, unsigned int pg_op,
+ }
+ 
+ static int
+-do_tur (int fd)
++do_tur (int fd, unsigned int timeout)
+ {
+ 	unsigned char turCmdBlk[TUR_CMD_LEN] = { 0x00, 0, 0, 0, 0, 0 };
+ 	struct sg_io_hdr io_hdr;
+@@ -111,7 +111,7 @@ do_tur (int fd)
+ 	io_hdr.dxfer_direction = SG_DXFER_NONE;
+ 	io_hdr.cmdp = turCmdBlk;
+ 	io_hdr.sbp = sense_buffer;
+-	io_hdr.timeout = DEF_TIMEOUT;
++	io_hdr.timeout = timeout;
+ 	io_hdr.pack_id = 0;
+ 
+ 	if (ioctl(fd, SG_IO, &io_hdr) < 0)
+@@ -128,12 +128,12 @@ libcheck_check (struct checker * c)
+ {
+ 	char buff[MX_ALLOC_LEN];
+ 
+-	if (0 != do_inq(c->fd, 0, 1, 0x80, buff, MX_ALLOC_LEN, 0)) {
++	if (0 != do_inq(c->fd, 0, 1, 0x80, buff, MX_ALLOC_LEN, 0, c->timeout)) {
+ 		MSG(c, MSG_HP_SW_DOWN);
+ 		return PATH_DOWN;
+ 	}
+ 
+-	if (do_tur(c->fd)) {
++	if (do_tur(c->fd, c->timeout)) {
+ 		MSG(c, MSG_HP_SW_GHOST);
+ 		return PATH_GHOST;
+ 	}
+diff --git a/libmultipath/checkers/libsg.c b/libmultipath/checkers/libsg.c
+index 4cb7ecc..2f6af75 100644
+--- a/libmultipath/checkers/libsg.c
++++ b/libmultipath/checkers/libsg.c
+@@ -11,7 +11,8 @@
+ #include "../libmultipath/sg_include.h"
+ 
+ int
+-sg_read (int sg_fd, unsigned char * buff, unsigned char * senseBuff)
++sg_read (int sg_fd, unsigned char * buff, unsigned char * senseBuff,
++	 unsigned int timeout)
+ {
+ 	/* defaults */
+ 	int blocks = 1;
+@@ -51,7 +52,7 @@ sg_read (int sg_fd, unsigned char * buff, unsigned char * senseBuff)
+ 	io_hdr.dxferp = buff;
+ 	io_hdr.mx_sb_len = SENSE_BUFF_LEN;
+ 	io_hdr.sbp = senseBuff;
+-	io_hdr.timeout = DEF_TIMEOUT;
++	io_hdr.timeout = timeout;
+ 	io_hdr.pack_id = (int)start_block;
+ 	if (diop && *diop)
+ 	io_hdr.flags |= SG_FLAG_DIRECT_IO;
+diff --git a/libmultipath/checkers/libsg.h b/libmultipath/checkers/libsg.h
+index 97c4491..071bc61 100644
+--- a/libmultipath/checkers/libsg.h
++++ b/libmultipath/checkers/libsg.h
+@@ -3,6 +3,7 @@
+ 
+ #define SENSE_BUFF_LEN 32
+ 
+-int sg_read (int sg_fd, unsigned char * buff, unsigned char * senseBuff);
++int sg_read (int sg_fd, unsigned char * buff, unsigned char * senseBuff,
++	     unsigned int timeout);
+ 
+ #endif /* _LIBSG_H */
+diff --git a/libmultipath/checkers/rdac.c b/libmultipath/checkers/rdac.c
+index d12eed1..fb39155 100644
+--- a/libmultipath/checkers/rdac.c
++++ b/libmultipath/checkers/rdac.c
+@@ -18,7 +18,6 @@
+ #define INQUIRY_CMDLEN		6
+ #define INQUIRY_CMD		0x12
+ #define SENSE_BUFF_LEN		32
+-#define RDAC_DEF_TIMEOUT	60000
+ #define SCSI_CHECK_CONDITION	0x2
+ #define SCSI_COMMAND_TERMINATED	0x22
+ #define SG_ERR_DRIVER_SENSE	0x08
+@@ -43,7 +42,8 @@ void libcheck_free (struct checker * c)
+ }
+ 
+ static int
+-do_inq(int sg_fd, unsigned int pg_op, void *resp, int mx_resp_len)
++do_inq(int sg_fd, unsigned int pg_op, void *resp, int mx_resp_len,
++       unsigned int timeout)
+ {
+ 	unsigned char inqCmdBlk[INQUIRY_CMDLEN] = { INQUIRY_CMD, 1, 0, 0, 0, 0 };
+ 	unsigned char sense_b[SENSE_BUFF_LEN];
+@@ -62,7 +62,7 @@ do_inq(int sg_fd, unsigned int pg_op, void *resp, int mx_resp_len)
+ 	io_hdr.dxferp = resp;
+ 	io_hdr.cmdp = inqCmdBlk;
+ 	io_hdr.sbp = sense_b;
+-	io_hdr.timeout = RDAC_DEF_TIMEOUT;
++	io_hdr.timeout = timeout;
+ 
+ 	if (ioctl(sg_fd, SG_IO, &io_hdr) < 0)
+ 		return 1;
+@@ -104,10 +104,11 @@ libcheck_check (struct checker * c)
+ 	int ret;
+ 
+ 	memset(&inq, 0, sizeof(struct volume_access_inq));
+-	if (0 != do_inq(c->fd, 0xC9, &inq, sizeof(struct volume_access_inq))) {
++	if (0 != do_inq(c->fd, 0xC9, &inq, sizeof(struct volume_access_inq),
++			c->timeout)) {
+ 		ret = PATH_DOWN;
+ 		goto done;
+-	} else if ((inq.PQ_PDT & 0x20) || (inq.PQ_PDT & 0x7f)) {
++        } else if (((inq.PQ_PDT & 0xE0) == 0x20) || (inq.PQ_PDT & 0x7f)) {
+ 		/* LUN not connected*/
+ 		ret = PATH_DOWN;
+ 		goto done;
+diff --git a/libmultipath/checkers/readsector0.c b/libmultipath/checkers/readsector0.c
+index 24182e6..3647dd9 100644
+--- a/libmultipath/checkers/readsector0.c
++++ b/libmultipath/checkers/readsector0.c
+@@ -29,7 +29,7 @@ int libcheck_check (struct checker * c)
+ 	unsigned char sbuf[SENSE_BUFF_LEN];
+ 	int ret;
+ 
+-	ret = sg_read(c->fd, &buf[0], &sbuf[0]);
++	ret = sg_read(c->fd, &buf[0], &sbuf[0], c->timeout);
+ 
+ 	switch (ret)
+ 	{
+diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
+index 47107a2..55fab26 100644
+--- a/libmultipath/checkers/tur.c
++++ b/libmultipath/checkers/tur.c
+@@ -55,7 +55,7 @@ libcheck_check (struct checker * c)
+ 	io_hdr.dxfer_direction = SG_DXFER_NONE;
+ 	io_hdr.cmdp = turCmdBlk;
+ 	io_hdr.sbp = sense_buffer;
+-	io_hdr.timeout = DEF_TIMEOUT;
++	io_hdr.timeout = c->timeout;
+ 	io_hdr.pack_id = 0;
+ 	if (ioctl(c->fd, SG_IO, &io_hdr) < 0) {
+ 		MSG(c, MSG_TUR_DOWN);
 diff --git a/libmultipath/config.c b/libmultipath/config.c
-index a4178be..00acf96 100644
+index a4178be..f8ba4aa 100644
 --- a/libmultipath/config.c
 +++ b/libmultipath/config.c
-@@ -158,6 +158,9 @@ free_hwe (struct hwentry * hwe)
+@@ -19,6 +19,7 @@
+ #include "blacklist.h"
+ #include "defaults.h"
+ #include "prio.h"
++#include "devmapper.h"
+ 
+ static int
+ hwe_strmatch (struct hwentry *hwe1, struct hwentry *hwe2)
+@@ -158,6 +159,9 @@ free_hwe (struct hwentry * hwe)
  	if (hwe->prio_args)
  		FREE(hwe->prio_args);
  
@@ -148,7 +497,7 @@
  	if (hwe->bl_product)
  		FREE(hwe->bl_product);
  
-@@ -282,6 +285,7 @@ merge_hwe (struct hwentry * hwe1, struct hwentry * hwe2)
+@@ -282,12 +286,14 @@ merge_hwe (struct hwentry * hwe1, struct hwentry * hwe2)
  	merge_str(checker_name);
  	merge_str(prio_name);
  	merge_str(prio_args);
@@ -156,7 +505,14 @@
  	merge_str(bl_product);
  	merge_num(pgpolicy);
  	merge_num(pgfailback);
-@@ -333,6 +337,9 @@ store_hwe (vector hwtable, struct hwentry * dhwe)
+ 	merge_num(rr_weight);
+ 	merge_num(no_path_retry);
+ 	merge_num(minio);
++	merge_num(minio_rq);
+ 
+ 	return 0;
+ }
+@@ -333,11 +339,15 @@ store_hwe (vector hwtable, struct hwentry * dhwe)
  	if (dhwe->prio_args && !(hwe->prio_args = set_param_str(dhwe->prio_args)))
  		goto out;
  
@@ -166,7 +522,13 @@
  	hwe->pgpolicy = dhwe->pgpolicy;
  	hwe->pgfailback = dhwe->pgfailback;
  	hwe->rr_weight = dhwe->rr_weight;
-@@ -409,6 +416,9 @@ free_config (struct config * conf)
+ 	hwe->no_path_retry = dhwe->no_path_retry;
+ 	hwe->minio = dhwe->minio;
++	hwe->minio_rq = dhwe->minio_rq;
+ 
+ 	if (dhwe->bl_product && !(hwe->bl_product = set_param_str(dhwe->bl_product)))
+ 		goto out;
+@@ -409,6 +419,9 @@ free_config (struct config * conf)
  	if (conf->prio_name)
  		FREE(conf->prio_name);
  
@@ -176,8 +538,15 @@
  	if (conf->prio_args)
  		FREE(conf->prio_args);
  
-@@ -448,6 +458,7 @@ load_config (char * file)
- 	conf->minio = 1000;
+@@ -444,10 +457,13 @@ load_config (char * file)
+ 	if (!conf->verbosity)
+ 		conf->verbosity = DEFAULT_VERBOSITY;
+ 
++	conf->dmrq = dm_drv_get_rq();
+ 	conf->dev_type = DEV_NONE;
+-	conf->minio = 1000;
++	conf->minio = DEFAULT_MINIO;
++	conf->minio_rq = DEFAULT_MINIO_RQ;
  	conf->max_fds = 0;
  	conf->bindings_file = DEFAULT_BINDINGS_FILE;
 +	conf->bindings_read_only = 0;
@@ -185,10 +554,10 @@
  	conf->flush_on_last_del = 0;
  	conf->attribute_flags = 0;
 diff --git a/libmultipath/config.h b/libmultipath/config.h
-index 471eed0..5a5f81b 100644
+index 471eed0..46cd32a 100644
 --- a/libmultipath/config.h
 +++ b/libmultipath/config.h
-@@ -25,6 +25,7 @@ struct hwentry {
+@@ -25,12 +25,14 @@ struct hwentry {
  	char * checker_name;
  	char * prio_name;
  	char * prio_args;
@@ -196,7 +565,38 @@
  
  	int pgpolicy;
  	int pgfailback;
-@@ -73,6 +74,7 @@ struct config {
+ 	int rr_weight;
+ 	int no_path_retry;
+ 	int minio;
++	int minio_rq;
+ 	int pg_timeout;
+ 	int flush_on_last_del;
+ 	int fast_io_fail;
+@@ -49,6 +51,7 @@ struct mpentry {
+ 	int rr_weight;
+ 	int no_path_retry;
+ 	int minio;
++	int minio_rq;
+ 	int pg_timeout;
+ 	int flush_on_last_del;
+ 	int attribute_flags;
+@@ -58,6 +61,7 @@ struct mpentry {
+ };
+ 
+ struct config {
++	int dmrq;
+ 	int verbosity;
+ 	int dry_run;
+ 	int list;
+@@ -66,6 +70,7 @@ struct config {
+ 	int pgpolicy;
+ 	enum devtypes dev_type;
+ 	int minio;
++	int minio_rq;
+ 	int checkint;
+ 	int max_checkint;
+ 	int pgfailback;
+@@ -73,10 +78,12 @@ struct config {
  	int rr_weight;
  	int no_path_retry;
  	int user_friendly_names;
@@ -204,7 +604,12 @@
  	int pg_timeout;
  	int max_fds;
  	int force_reload;
-@@ -99,6 +101,7 @@ struct config {
+ 	int queue_without_daemon;
++	int checker_timeout;
+ 	int daemon;
+ 	int flush_on_last_del;
+ 	int attribute_flags;
+@@ -99,6 +106,7 @@ struct config {
  	char * prio_name;
  	char * prio_args;
  	char * checker_name;
@@ -213,9 +618,18 @@
  	vector keywords;
  	vector mptable;
 diff --git a/libmultipath/configure.c b/libmultipath/configure.c
-index c6ca4b6..a40bef3 100644
+index c6ca4b6..18e97f2 100644
 --- a/libmultipath/configure.c
 +++ b/libmultipath/configure.c
+@@ -170,7 +170,7 @@ select_action (struct multipath * mpp, vector curmp, int force_reload)
+ 	if (!find_mp_by_wwid(curmp, mpp->wwid)) {
+ 		condlog(2, "%s: remove (wwid changed)", cmpp->alias);
+ 		dm_flush_map(mpp->alias);
+-		strncat(cmpp->wwid, mpp->wwid, WWID_SIZE);
++		strncpy(cmpp->wwid, mpp->wwid, WWID_SIZE);
+ 		drop_multipath(curmp, cmpp->wwid, KEEP_PATHS);
+ 		mpp->action = ACT_CREATE;
+ 		condlog(3, "%s: set ACT_CREATE (map wwid change)",
 @@ -284,6 +284,7 @@ lock_multipath (struct multipath * mpp, int lock)
  	struct pathgroup * pgp;
  	struct path * pp;
@@ -251,7 +665,38 @@
  }
  
  /*
-@@ -577,11 +591,11 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r
+@@ -407,6 +421,7 @@ domap (struct multipath * mpp)
+ 			if (mpp->action != ACT_CREATE)
+ 				mpp->action = ACT_NOTHING;
+ 		}
++		dm_setgeometry(mpp);
+ 		return DOMAP_OK;
+ 	}
+ 	return DOMAP_FAIL;
+@@ -458,16 +473,20 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r
+ 
+ 		/* 1. if path has no unique id or wwid blacklisted */
+ 		if (memcmp(empty_buff, pp1->wwid, WWID_SIZE) == 0 ||
+-		    filter_path(conf, pp1) > 0)
++		    filter_path(conf, pp1) > 0) {
++			orphan_path(pp1);
+ 			continue;
++		}
+ 
+ 		/* 2. if path already coalesced */
+ 		if (pp1->mpp)
+ 			continue;
+ 
+ 		/* 3. if path has disappeared */
+-		if (!pp1->size)
++		if (!pp1->size) {
++			orphan_path(pp1);
+ 			continue;
++		}
+ 
+ 		/* 4. path is out of scope */
+ 		if (refwwid && strncmp(pp1->wwid, refwwid, WWID_SIZE))
+@@ -577,11 +596,11 @@ coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid, int force_r
  
  			remove_map(mpp, vecs, 0);
  
@@ -267,10 +712,10 @@
  	}
  	return 0;
 diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
-index 5a38d25..77526dd 100644
+index 5a38d25..aa5d538 100644
 --- a/libmultipath/defaults.h
 +++ b/libmultipath/defaults.h
-@@ -2,6 +2,7 @@
+@@ -2,9 +2,11 @@
  #define DEFAULT_UDEVDIR		"/dev"
  #define DEFAULT_MULTIPATHDIR	"/" LIB_STRING "/multipath"
  #define DEFAULT_SELECTOR	"round-robin 0"
@@ -278,11 +723,145 @@
  #define DEFAULT_FEATURES	"0"
  #define DEFAULT_HWHANDLER	"0"
  #define DEFAULT_MINIO		1000
++#define DEFAULT_MINIO_RQ	1
+ #define DEFAULT_PGPOLICY       FAILOVER
+ #define DEFAULT_FAILBACK       -FAILBACK_MANUAL
+ #define DEFAULT_RR_WEIGHT      RR_WEIGHT_NONE
 diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
-index 333659b..fb69ee8 100644
+index 333659b..50cdf98 100644
 --- a/libmultipath/devmapper.c
 +++ b/libmultipath/devmapper.c
-@@ -777,35 +777,49 @@ out:
+@@ -72,8 +72,14 @@ dm_init(void) {
+ 	dm_log_init_verbose(conf ? conf->verbosity + 3 : 0);
+ }
+ 
++#define VERSION_GE(v, minv) ( \
++ (v[0] > minv[0]) || \
++ ((v[0] == minv[0]) && (v[1] > minv[1])) || \
++ ((v[0] == minv[0]) && (v[1] == minv[1]) && (v[2] >= minv[2])) \
++)
++
+ static int
+-dm_libprereq (void)
++dm_lib_prereq (void)
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/multipath-tools/multipath-tools-git.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/multipath-tools/multipath-tools.spec?r1=1.74&r2=1.75&f=u



More information about the pld-cvs-commit mailing list