forked from pool/multipath-tools
This commit is contained in:
parent
2f690c3436
commit
09c9e52903
42
multipath-tools-dont-check-valid-context-in-get_state
Normal file
42
multipath-tools-dont-check-valid-context-in-get_state
Normal file
@ -0,0 +1,42 @@
|
||||
From 0d18112f4f937626b3c335bf52a6231f5118dd9e Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 30 Oct 2008 13:46:15 +0100
|
||||
Subject: [PATCH] Do not check for valid mp context in get_state()
|
||||
|
||||
When called from 'multipath -ll' get_state() does not
|
||||
have a valid context. But the checkers should run nevertheless
|
||||
as we need the state here but are not interested in any long-term
|
||||
issues.
|
||||
|
||||
References: 433659
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/discovery.c | 5 ++---
|
||||
1 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||
index a5ae8aa..9929e19 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -659,15 +659,14 @@ get_state (struct path * pp)
|
||||
{
|
||||
struct checker * c = &pp->checker;
|
||||
|
||||
- if (!pp->mpp)
|
||||
- return 0;
|
||||
+ condlog(3, "%s: get_state", pp->dev);
|
||||
|
||||
if (!checker_selected(c)) {
|
||||
select_checker(pp);
|
||||
if (!checker_selected(c))
|
||||
return 1;
|
||||
checker_set_fd(c, pp->fd);
|
||||
- if (checker_init(c, &pp->mpp->mpcontext))
|
||||
+ if (checker_init(c, pp->mpp?&pp->mpp->mpcontext:NULL))
|
||||
return 1;
|
||||
}
|
||||
pp->state = checker_check(c);
|
||||
--
|
||||
1.5.4.5
|
||||
|
29
multipath-tools-fixup-scsi_id-for-cciss
Normal file
29
multipath-tools-fixup-scsi_id-for-cciss
Normal file
@ -0,0 +1,29 @@
|
||||
From 62ff5068186fd0baf3d93ea85b00aaffe3bf4810 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 29 Oct 2008 17:00:16 +0100
|
||||
Subject: [PATCH] Incorrect scsi_id commandline for cciss
|
||||
|
||||
The scsi_id program was called with incorrect commandline
|
||||
for cciss devices. Fix.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/hwtable.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||
index f87907d..fda131c 100644
|
||||
--- a/libmultipath/hwtable.c
|
||||
+++ b/libmultipath/hwtable.c
|
||||
@@ -193,7 +193,7 @@ static struct hwentry default_hw[] = {
|
||||
/* HP Smart Array */
|
||||
.vendor = "HP",
|
||||
.product = "LOGICAL VOLUME.*",
|
||||
- .getuid = "/lib/udev/scsi_id -n -g -u -d /dev/%n",
|
||||
+ .getuid = "/lib/udev/scsi_id -g -u -d /dev/%n",
|
||||
.features = DEFAULT_FEATURES,
|
||||
.hwhandler = DEFAULT_HWHANDLER,
|
||||
.selector = DEFAULT_SELECTOR,
|
||||
--
|
||||
1.5.4.5
|
||||
|
74
multipath-tools-link-directio-against-libaio
Normal file
74
multipath-tools-link-directio-against-libaio
Normal file
@ -0,0 +1,74 @@
|
||||
From 2fb0035d2322771bd9753e26a2a1c5babbfc2abc Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 30 Oct 2008 16:49:50 +0100
|
||||
Subject: [PATCH] Link directio checker against libaio
|
||||
|
||||
The directio checker has to link against libaio explicitely,
|
||||
otherwise any versioning information is lost.
|
||||
|
||||
References: 433659
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/checkers/Makefile | 3 +++
|
||||
libmultipath/checkers/directio.c | 2 +-
|
||||
multipath/Makefile | 2 +-
|
||||
multipathd/Makefile | 2 +-
|
||||
4 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile
|
||||
index a20dfac..99b3dc2 100644
|
||||
--- a/libmultipath/checkers/Makefile
|
||||
+++ b/libmultipath/checkers/Makefile
|
||||
@@ -17,6 +17,9 @@ CFLAGS += -I..
|
||||
|
||||
all: $(LIBS)
|
||||
|
||||
+libcheckdirectio.so: directio.o
|
||||
+ $(CC) $(SHARED_FLAGS) -o $@ $^ -laio
|
||||
+
|
||||
libcheck%.so: libsg.o %.o
|
||||
$(CC) $(SHARED_FLAGS) -o $@ $^
|
||||
|
||||
diff --git a/libmultipath/checkers/directio.c b/libmultipath/checkers/directio.c
|
||||
index 5c92dac..c701609 100644
|
||||
--- a/libmultipath/checkers/directio.c
|
||||
+++ b/libmultipath/checkers/directio.c
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <linux/fs.h>
|
||||
#include <errno.h>
|
||||
#include <linux/kdev_t.h>
|
||||
-#include <asm/unistd.h>
|
||||
+#include <unistd.h>
|
||||
#include <libaio.h>
|
||||
|
||||
#include "checkers.h"
|
||||
diff --git a/multipath/Makefile b/multipath/Makefile
|
||||
index 75d4ddf..a02107b 100644
|
||||
--- a/multipath/Makefile
|
||||
+++ b/multipath/Makefile
|
||||
@@ -7,7 +7,7 @@ include ../Makefile.inc
|
||||
OBJS = main.o
|
||||
|
||||
CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
|
||||
-LDFLAGS += -lpthread -ldevmapper -laio -ldl \
|
||||
+LDFLAGS += -lpthread -ldevmapper -ldl \
|
||||
-lmultipath -L$(multipathdir)
|
||||
|
||||
EXEC = multipath
|
||||
diff --git a/multipathd/Makefile b/multipathd/Makefile
|
||||
index b019959..565210f 100644
|
||||
--- a/multipathd/Makefile
|
||||
+++ b/multipathd/Makefile
|
||||
@@ -6,7 +6,7 @@ include ../Makefile.inc
|
||||
# basic flags setting
|
||||
#
|
||||
CFLAGS += -I$(multipathdir) -Wl,-rpath,$(libdir)
|
||||
-LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -laio -ldl \
|
||||
+LDFLAGS += -lpthread -ldevmapper -lreadline -lncurses -ldl \
|
||||
-lmultipath -L$(multipathdir)
|
||||
|
||||
#
|
||||
--
|
||||
1.5.4.5
|
||||
|
39
multipath-tools-sysfs-subdir-reformat
Normal file
39
multipath-tools-sysfs-subdir-reformat
Normal file
@ -0,0 +1,39 @@
|
||||
From ac44cbe83f16eafc3de5a56fa275aabd5783ce7c Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 29 Oct 2008 16:58:52 +0100
|
||||
Subject: [PATCH] Fixup %n to handle '!' special case
|
||||
|
||||
The kernel name may contain an '!', which should be translated
|
||||
into a '/'. So do it here.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/callout.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/callout.c b/libmultipath/callout.c
|
||||
index 4dd33c5..59ac694 100644
|
||||
--- a/libmultipath/callout.c
|
||||
+++ b/libmultipath/callout.c
|
||||
@@ -131,6 +131,7 @@ apply_format (char * string, char * cmd, struct path * pp)
|
||||
char * pos;
|
||||
char * dst;
|
||||
char * p;
|
||||
+ char * q;
|
||||
int len;
|
||||
int myfree;
|
||||
|
||||
@@ -169,6 +170,10 @@ apply_format (char * string, char * cmd, struct path * pp)
|
||||
return 1;
|
||||
|
||||
snprintf(p, len, "%s", pp->dev);
|
||||
+ for (q = p; q < p + len; q++) {
|
||||
+ if (q && *q == '!')
|
||||
+ *q = '/';
|
||||
+ }
|
||||
p += len - 1;
|
||||
break;
|
||||
case 'd':
|
||||
--
|
||||
1.5.4.5
|
||||
|
31
multipath-tools-use-pthread_join
Normal file
31
multipath-tools-use-pthread_join
Normal file
@ -0,0 +1,31 @@
|
||||
From c61cebec5c538a95cf641984357259dc616e5760 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 29 Oct 2008 13:54:36 +0100
|
||||
Subject: [PATCH] multipathd crashes on shutdown
|
||||
|
||||
And again pthread programming has proven to be difficult.
|
||||
We really should wait for the thread to actually exit before
|
||||
continuing and free up all of its resources.
|
||||
|
||||
References: 437245
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/log_pthread.c | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/log_pthread.c b/libmultipath/log_pthread.c
|
||||
index 5a97db6..9e9aebe 100644
|
||||
--- a/libmultipath/log_pthread.c
|
||||
+++ b/libmultipath/log_pthread.c
|
||||
@@ -83,6 +83,7 @@ void log_thread_stop (void)
|
||||
pthread_mutex_lock(logq_lock);
|
||||
pthread_cancel(log_thr);
|
||||
pthread_mutex_unlock(logq_lock);
|
||||
+ pthread_join(log_thr, NULL);
|
||||
|
||||
flush_logqueue();
|
||||
|
||||
--
|
||||
1.5.4.5
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 3 15:37:08 CET 2008 - hare@suse.de
|
||||
|
||||
- Use pthread_join() during shutdown to avoid crash (bnc#437245)
|
||||
- Fixup '%n' to handle '!' kernel device name syntax (bnc#435172)
|
||||
- Use correct commandline for cciss scsi_id callouts (bnc#435172)
|
||||
- Do not check for valid mp context in get_state() (bnc#433659)
|
||||
- Link directio checker against libaio (bnc#433659)
|
||||
- Use regmatch when checking for duplicates in hwtable (bnc#439763)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 27 10:30:18 CET 2008 - hare@suse.de
|
||||
|
||||
|
@ -27,7 +27,7 @@ Requires: device-mapper kpartx
|
||||
PreReq: %insserv_prereq %fillup_prereq coreutils grep diffutils
|
||||
AutoReqProv: on
|
||||
Version: 0.4.8
|
||||
Release: 22
|
||||
Release: 23
|
||||
Summary: Tools to Manage Multipathed Devices with the device-mapper
|
||||
Source: multipath-tools-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -48,6 +48,11 @@ Patch13: %{name}-missing-fixes-for-ontap
|
||||
Patch14: %{name}-add-IBM-storage-to-hwtable
|
||||
Patch15: %{name}-increase-loop-buffer-size
|
||||
Patch16: %{name}-include-device-handler-modules
|
||||
Patch17: %{name}-use-pthread_join
|
||||
Patch18: %{name}-fixup-scsi_id-for-cciss
|
||||
Patch19: %{name}-sysfs-subdir-reformat
|
||||
Patch20: %{name}-dont-check-valid-context-in-get_state
|
||||
Patch21: %{name}-link-directio-against-libaio
|
||||
|
||||
%description
|
||||
This package provides the tools to manage multipathed devices by
|
||||
@ -105,6 +110,11 @@ Authors:
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
|
||||
%build
|
||||
make OPTFLAGS="$RPM_OPT_FLAGS"
|
||||
@ -166,6 +176,13 @@ exit 0
|
||||
%{_mandir}/man8/kpartx.8*
|
||||
|
||||
%changelog
|
||||
* Mon Nov 03 2008 hare@suse.de
|
||||
- Use pthread_join() during shutdown to avoid crash (bnc#437245)
|
||||
- Fixup '%%n' to handle '!' kernel device name syntax (bnc#435172)
|
||||
- Use correct commandline for cciss scsi_id callouts (bnc#435172)
|
||||
- Do not check for valid mp context in get_state() (bnc#433659)
|
||||
- Link directio checker against libaio (bnc#433659)
|
||||
- Use regmatch when checking for duplicates in hwtable (bnc#439763)
|
||||
* Mon Oct 27 2008 hare@suse.de
|
||||
- Patches from mainline:
|
||||
* Increase bindings file lock timeout
|
||||
|
Loading…
Reference in New Issue
Block a user