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.
This commit is contained in:
parent
c68fdb34f6
commit
1a1eabcadf
38
0036-UP-fix-state-handling.patch
Normal file
38
0036-UP-fix-state-handling.patch
Normal file
@ -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
|
17
0037-UP-fix-params-size.patch
Normal file
17
0037-UP-fix-params-size.patch
Normal file
@ -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
|
18
0038-RH-fix-multipath.rules.patch
Normal file
18
0038-RH-fix-multipath.rules.patch
Normal file
@ -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"
|
31
0039-RH-handle-other-sector-sizes.patch
Normal file
31
0039-RH-handle-other-sector-sizes.patch
Normal file
@ -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++;
|
||||||
|
}
|
60
0040-RH-fix-output-buffer.patch
Normal file
60
0040-RH-fix-output-buffer.patch
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Tools to manage multipath devices using device-mapper
|
Summary: Tools to manage multipath devices using device-mapper
|
||||||
Name: device-mapper-multipath
|
Name: device-mapper-multipath
|
||||||
Version: 0.4.9
|
Version: 0.4.9
|
||||||
Release: 43%{?dist}
|
Release: 44%{?dist}
|
||||||
License: GPL+
|
License: GPL+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://christophe.varoqui.free.fr/
|
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
|
Patch0033: 0033-RH-dont-disable-libdm-failback-for-sync-case.patch
|
||||||
Patch0034: 0034-RHBZ-887737-check-for-null-key.patch
|
Patch0034: 0034-RHBZ-887737-check-for-null-key.patch
|
||||||
Patch0035: 0035-RHBZ-883981-cleanup-rpmdiff-issues.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
|
# runtime
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
@ -130,6 +135,11 @@ kpartx manages partition creation and removal for device-mapper devices.
|
|||||||
%patch0033 -p1
|
%patch0033 -p1
|
||||||
%patch0034 -p1
|
%patch0034 -p1
|
||||||
%patch0035 -p1
|
%patch0035 -p1
|
||||||
|
%patch0036 -p1
|
||||||
|
%patch0037 -p1
|
||||||
|
%patch0038 -p1
|
||||||
|
%patch0039 -p1
|
||||||
|
%patch0040 -p1
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -220,6 +230,17 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
|
|||||||
%{_mandir}/man8/kpartx.8.gz
|
%{_mandir}/man8/kpartx.8.gz
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user