summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2013-02-20 22:29:14 -0600
committerBenjamin Marzinski <bmarzins@redhat.com>2013-02-20 22:29:14 -0600
commit1a1eabcadfe8159ec0373b7a4cf7b2e058ea0db5 (patch)
tree1ff565abfd405f147c4243f354d7b3b928e5da3a
parentc68fdb34f6ee2a445c30ab8b0ded314d58e4c05f (diff)
downloaddevice-mapper-multipath-1a1eabcadfe8159ec0373b7a4cf7b2e058ea0db5.tar.gz
device-mapper-multipath-1a1eabcadfe8159ec0373b7a4cf7b2e058ea0db5.tar.xz
device-mapper-multipath-1a1eabcadfe8159ec0373b7a4cf7b2e058ea0db5.zip
device-mapper-multipath-0.4.9-44
Add 0036-UP-fix-state-handling.patch * handle transport-offline and quiesce sysfs state Add 0037-UP-fix-params-size.patch Add 0038-RH-fix-multipath.rules.patch * make sure multipath's link priority gets increased Add 0039-RH-handle-other-sector-sizes.patch * allow gpt partitions on 4k sector size block devices. Add 0040-RH-fix-output-buffer.patch * fix multipath -ll for large configuration.
-rw-r--r--0036-UP-fix-state-handling.patch38
-rw-r--r--0037-UP-fix-params-size.patch17
-rw-r--r--0038-RH-fix-multipath.rules.patch18
-rw-r--r--0039-RH-handle-other-sector-sizes.patch31
-rw-r--r--0040-RH-fix-output-buffer.patch60
-rw-r--r--device-mapper-multipath.spec23
6 files changed, 186 insertions, 1 deletions
diff --git a/0036-UP-fix-state-handling.patch b/0036-UP-fix-state-handling.patch
new file mode 100644
index 0000000..1477b6a
--- /dev/null
+++ b/0036-UP-fix-state-handling.patch
@@ -0,0 +1,38 @@
+---
+ libmultipath/discovery.c | 5 +++--
+ libmultipath/structs.h | 2 +-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+Index: multipath-tools-120821/libmultipath/discovery.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/discovery.c
++++ multipath-tools-120821/libmultipath/discovery.c
+@@ -683,12 +683,13 @@ path_offline (struct path * pp)
+
+ condlog(3, "%s: path state = %s", pp->dev, buff);
+
+- if (!strncmp(buff, "offline", 7)) {
++ if (!strncmp(buff, "offline", 7) ||
++ !strncmp(buff, "transport-offline", 17)) {
+ pp->offline = 1;
+ return PATH_DOWN;
+ }
+ pp->offline = 0;
+- if (!strncmp(buff, "blocked", 7))
++ if (!strncmp(buff, "blocked", 7) || !strncmp(buff, "quiesce", 7))
+ return PATH_PENDING;
+ else if (!strncmp(buff, "running", 7))
+ return PATH_UP;
+Index: multipath-tools-120821/libmultipath/structs.h
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/structs.h
++++ multipath-tools-120821/libmultipath/structs.h
+@@ -18,7 +18,7 @@
+ #define SCSI_VENDOR_SIZE 9
+ #define SCSI_PRODUCT_SIZE 17
+ #define SCSI_REV_SIZE 5
+-#define SCSI_STATE_SIZE 9
++#define SCSI_STATE_SIZE 19
+
+ #define NO_PATH_RETRY_UNDEF 0
+ #define NO_PATH_RETRY_FAIL -1
diff --git a/0037-UP-fix-params-size.patch b/0037-UP-fix-params-size.patch
new file mode 100644
index 0000000..62f4c57
--- /dev/null
+++ b/0037-UP-fix-params-size.patch
@@ -0,0 +1,17 @@
+---
+ libmultipath/structs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: multipath-tools-120821/libmultipath/structs.h
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/structs.h
++++ multipath-tools-120821/libmultipath/structs.h
+@@ -7,7 +7,7 @@
+ #define SERIAL_SIZE 65
+ #define NODE_NAME_SIZE 224
+ #define PATH_STR_SIZE 16
+-#define PARAMS_SIZE 1024
++#define PARAMS_SIZE 4096
+ #define FILE_NAME_SIZE 256
+ #define CALLOUT_MAX_SIZE 256
+ #define BLK_DEV_SIZE 33
diff --git a/0038-RH-fix-multipath.rules.patch b/0038-RH-fix-multipath.rules.patch
new file mode 100644
index 0000000..f943cbc
--- /dev/null
+++ b/0038-RH-fix-multipath.rules.patch
@@ -0,0 +1,18 @@
+---
+ multipath/multipath.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: multipath-tools-120821/multipath/multipath.rules
+===================================================================
+--- multipath-tools-120821.orig/multipath/multipath.rules
++++ multipath-tools-120821/multipath/multipath.rules
+@@ -15,8 +15,8 @@ ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{
+ RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
+
+ KERNEL!="dm-*", GOTO="end_mpath"
+-ACTION!="change", GOTO="end_mpath"
+ ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10"
++ACTION!="change", GOTO="end_mpath"
+ ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
+ ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
+ ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
diff --git a/0039-RH-handle-other-sector-sizes.patch b/0039-RH-handle-other-sector-sizes.patch
new file mode 100644
index 0000000..d07e0d8
--- /dev/null
+++ b/0039-RH-handle-other-sector-sizes.patch
@@ -0,0 +1,31 @@
+---
+ kpartx/gpt.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+Index: multipath-tools-120821/kpartx/gpt.c
+===================================================================
+--- multipath-tools-120821.orig/kpartx/gpt.c
++++ multipath-tools-120821/kpartx/gpt.c
+@@ -637,6 +637,7 @@ read_gpt_pt (int fd, struct slice all, s
+ uint32_t i;
+ int n = 0;
+ int last_used_index=-1;
++ int sector_size_mul = get_sector_size(fd)/512;
+
+ if (!find_valid_gpt (fd, &gpt, &ptes) || !gpt || !ptes) {
+ if (gpt)
+@@ -652,9 +653,11 @@ read_gpt_pt (int fd, struct slice all, s
+ sp[n].size = 0;
+ n++;
+ } else {
+- sp[n].start = __le64_to_cpu(ptes[i].starting_lba);
+- sp[n].size = __le64_to_cpu(ptes[i].ending_lba) -
+- __le64_to_cpu(ptes[i].starting_lba) + 1;
++ sp[n].start = sector_size_mul *
++ __le64_to_cpu(ptes[i].starting_lba);
++ sp[n].size = sector_size_mul *
++ (__le64_to_cpu(ptes[i].ending_lba) -
++ __le64_to_cpu(ptes[i].starting_lba) + 1);
+ last_used_index=n;
+ n++;
+ }
diff --git a/0040-RH-fix-output-buffer.patch b/0040-RH-fix-output-buffer.patch
new file mode 100644
index 0000000..97ff755
--- /dev/null
+++ b/0040-RH-fix-output-buffer.patch
@@ -0,0 +1,60 @@
+---
+ libmultipath/print.c | 30 ++++++++++++++++++++++++++----
+ 1 file changed, 26 insertions(+), 4 deletions(-)
+
+Index: multipath-tools-120821/libmultipath/print.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/print.c
++++ multipath-tools-120821/libmultipath/print.c
+@@ -8,6 +8,8 @@
+ #include <sys/stat.h>
+ #include <dirent.h>
+ #include <unistd.h>
++#include <string.h>
++#include <errno.h>
+
+ #include "checkers.h"
+ #include "vector.h"
+@@ -24,6 +26,7 @@
+ #include "switchgroup.h"
+ #include "devmapper.h"
+ #include "uevent.h"
++#include "debug.h"
+
+ #define MAX(x,y) (x > y) ? x : y
+ #define TAIL (line + len - 1 - c)
+@@ -757,11 +760,30 @@ snprint_pathgroup (char * line, int len,
+ extern void
+ print_multipath_topology (struct multipath * mpp, int verbosity)
+ {
+- char buff[MAX_LINE_LEN * MAX_LINES] = {};
++ int resize;
++ char *buff = NULL;
++ char *old = NULL;
++ int len, maxlen = MAX_LINE_LEN * MAX_LINES;
+
+- memset(&buff[0], 0, MAX_LINE_LEN * MAX_LINES);
+- snprint_multipath_topology(&buff[0], MAX_LINE_LEN * MAX_LINES,
+- mpp, verbosity);
++ buff = MALLOC(maxlen);
++ do {
++ if (!buff) {
++ if (old)
++ FREE(old);
++ condlog(0, "couldn't allocate memory for list: %s\n",
++ strerror(errno));
++ return;
++ }
++
++ len = snprint_multipath_topology(buff, maxlen, mpp, verbosity);
++ resize = (len == maxlen - 1);
++
++ if (resize) {
++ maxlen *= 2;
++ old = buff;
++ buff = REALLOC(buff, maxlen);
++ }
++ } while (resize);
+ printf("%s", buff);
+ }
+
diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec
index 0a4693d..bb1f3c6 100644
--- a/device-mapper-multipath.spec
+++ b/device-mapper-multipath.spec
@@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath
Version: 0.4.9
-Release: 43%{?dist}
+Release: 44%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
@@ -43,6 +43,11 @@ Patch0032: 0032-RH-make-path-fd-readonly.patch
Patch0033: 0033-RH-dont-disable-libdm-failback-for-sync-case.patch
Patch0034: 0034-RHBZ-887737-check-for-null-key.patch
Patch0035: 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch
+Patch0036: 0036-UP-fix-state-handling.patch
+Patch0037: 0037-UP-fix-params-size.patch
+Patch0038: 0038-RH-fix-multipath.rules.patch
+Patch0039: 0039-RH-handle-other-sector-sizes.patch
+Patch0040: 0040-RH-fix-output-buffer.patch
# runtime
Requires: %{name}-libs = %{version}-%{release}
@@ -130,6 +135,11 @@ kpartx manages partition creation and removal for device-mapper devices.
%patch0033 -p1
%patch0034 -p1
%patch0035 -p1
+%patch0036 -p1
+%patch0037 -p1
+%patch0038 -p1
+%patch0039 -p1
+%patch0040 -p1
cp %{SOURCE1} .
%build
@@ -220,6 +230,17 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
%{_mandir}/man8/kpartx.8.gz
%changelog
+* Wed Feb 19 2013 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-44
+- Add 0036-UP-fix-state-handling.patch
+ * handle transport-offline and quiesce sysfs state
+- Add 0037-UP-fix-params-size.patch
+- Add 0038-RH-fix-multipath.rules.patch
+ * make sure multipath's link priority gets increased
+- Add 0039-RH-handle-other-sector-sizes.patch
+ * allow gpt partitions on 4k sector size block devices.
+- Add 0040-RH-fix-output-buffer.patch
+ * fix multipath -ll for large configuration.
+
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.9-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild