diff -u multipath-tools-0.4.8/debian/changelog multipath-tools-0.4.8/debian/changelog --- multipath-tools-0.4.8/debian/changelog +++ multipath-tools-0.4.8/debian/changelog @@ -1,3 +1,9 @@ +multipath-tools (0.4.8-14ubuntu5~lp644489) UNRELEASED; urgency=high + * Adjust prioritizer open flags to avoid sg io side effect (LP: #644489). + - This addresses the spurios UDEV CHANGE seen while running multipath + + WARNING: this is not the final iteration of the solution + -- Peter M. Petrakis Sun, 19 Jun 2011 06:05:49 -0400 + multipath-tools (0.4.8-14ubuntu4) lucid; urgency=low * debian/control: Move libreadline5-dev build dependency to libreadline-dev. diff -u multipath-tools-0.4.8/debian/patches/series multipath-tools-0.4.8/debian/patches/series --- multipath-tools-0.4.8/debian/patches/series +++ multipath-tools-0.4.8/debian/patches/series @@ -14,0 +15 @@ +0013-adjust-prioritizer-open-flags-to-avoid-sg-io-side-ef.patch diff -u multipath-tools-0.4.8/debian/patches/1001--intel-mpath-prio-alua.patch multipath-tools-0.4.8/debian/patches/1001--intel-mpath-prio-alua.patch --- multipath-tools-0.4.8/debian/patches/1001--intel-mpath-prio-alua.patch +++ multipath-tools-0.4.8/debian/patches/1001--intel-mpath-prio-alua.patch @@ -7,10 +7,10 @@ Choose TPGs with this bit set over TPGs with it unset. This fixes failback handling with the Intel Modular Server. -Index: b/path_priority/pp_alua/main.c +Index: multipath-tools-0.4.8/path_priority/pp_alua/main.c =================================================================== ---- a/path_priority/pp_alua/main.c -+++ b/path_priority/pp_alua/main.c +--- multipath-tools-0.4.8.orig/path_priority/pp_alua/main.c 2007-08-02 17:05:37.000000000 -0400 ++++ multipath-tools-0.4.8/path_priority/pp_alua/main.c 2011-06-19 05:25:19.055198764 -0400 @@ -133,6 +133,7 @@ }; int rc; @@ -59,10 +59,10 @@ printf("%u\n", rc); rc = ALUA_PRIO_SUCCESS; } -Index: b/path_priority/pp_alua/spc3.h +Index: multipath-tools-0.4.8/path_priority/pp_alua/spc3.h =================================================================== ---- a/path_priority/pp_alua/spc3.h -+++ b/path_priority/pp_alua/spc3.h +--- multipath-tools-0.4.8.orig/path_priority/pp_alua/spc3.h 2007-08-02 17:05:37.000000000 -0400 ++++ multipath-tools-0.4.8/path_priority/pp_alua/spc3.h 2011-06-19 05:25:19.055198764 -0400 @@ -299,7 +299,7 @@ static inline int rtpg_tpg_dscr_get_aas(struct rtpg_tpg_dscr *d) only in patch2: unchanged: --- multipath-tools-0.4.8.orig/debian/patches/0013-adjust-prioritizer-open-flags-to-avoid-sg-io-side-ef.patch +++ multipath-tools-0.4.8/debian/patches/0013-adjust-prioritizer-open-flags-to-avoid-sg-io-side-ef.patch @@ -0,0 +1,88 @@ +From 36ae2d85b9931140c200e40658ebeda813eb0cb2 Mon Sep 17 00:00:00 2001 +From: Peter M. Petrakis +Date: Sun, 19 Jun 2011 05:56:30 -0400 +Subject: [PATCH] adjust prioritizer open flags to avoid sg io side effects + + It appears that when you open an sd device using O_RDRW + and send an sg io that doesn't modify the target, like say + inquiry. The kernel/udev will generate a change event on the + behalf of that cmd. This is an unintended side effect of using + sd/block devices for sg io. This causes all sorts of problems + with our UDEV rules and even multipath path aliasing. + + This is an intern fix until one that addresses the entire + root cause is determined. In going down this route, we're no + more broken than upstream (0.4.9), which continues to use sd + devices. +Signed-off-by: Peter M. Petrakis +--- + path_priority/pp_emc/pp_emc.c | 2 +- + path_priority/pp_hp_sw/pp_hp_sw.c | 2 +- + path_priority/pp_netapp/pp_netapp.c | 4 ++-- + path_priority/pp_rdac/pp_rdac.c | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/path_priority/pp_emc/pp_emc.c b/path_priority/pp_emc/pp_emc.c +index 4031720..a2d2f92 100644 +--- a/path_priority/pp_emc/pp_emc.c ++++ b/path_priority/pp_emc/pp_emc.c +@@ -23,7 +23,7 @@ int emc_clariion_prio(const char *dev) + int ret = 0; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "Opening the device failed.\n"); +diff --git a/path_priority/pp_hp_sw/pp_hp_sw.c b/path_priority/pp_hp_sw/pp_hp_sw.c +index e4a18b1..af89f6d 100644 +--- a/path_priority/pp_hp_sw/pp_hp_sw.c ++++ b/path_priority/pp_hp_sw/pp_hp_sw.c +@@ -37,7 +37,7 @@ int hp_sw_prio(const char *dev) + int ret = HP_PATH_FAILED; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "Opening the device failed.\n"); +diff --git a/path_priority/pp_netapp/pp_netapp.c b/path_priority/pp_netapp/pp_netapp.c +index 8562a95..c20370e 100644 +--- a/path_priority/pp_netapp/pp_netapp.c ++++ b/path_priority/pp_netapp/pp_netapp.c +@@ -74,7 +74,7 @@ static int send_gva(const char *dev, unsigned char pg, + int ret = -1; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "Opening %s failed, errno=%d.\n", dev, errno); +@@ -135,7 +135,7 @@ static int get_proxy(const char *dev) + int ret = -1; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "Opening %s failed, errno=%d.\n", dev, errno); +diff --git a/path_priority/pp_rdac/pp_rdac.c b/path_priority/pp_rdac/pp_rdac.c +index 49a13cf..b6c6613 100644 +--- a/path_priority/pp_rdac/pp_rdac.c ++++ b/path_priority/pp_rdac/pp_rdac.c +@@ -23,7 +23,7 @@ int rdac_prio(const char *dev) + int ret = 0; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "opening of the device failed.\n"); +-- +1.7.0.4 + only in patch2: unchanged: --- multipath-tools-0.4.8.orig/debian/patches/0001-adjust-prioritizer-open-flags-to-avoid-sg-io-side-ef.patch +++ multipath-tools-0.4.8/debian/patches/0001-adjust-prioritizer-open-flags-to-avoid-sg-io-side-ef.patch @@ -0,0 +1,85 @@ +From 36ae2d85b9931140c200e40658ebeda813eb0cb2 Mon Sep 17 00:00:00 2001 +From: Peter M. Petrakis +Date: Sun, 19 Jun 2011 05:56:30 -0400 +Subject: [PATCH] adjust prioritizer open flags to avoid sg io side effects + + It appears that when you open an sd device using O_RDRW + and send an sg io that doesn't modify the target, like say + inquiry. The kernel/udev will generate a change event on the + behalf of that cmd. This is an unintended side effect of using + sd/block devices for sg io. This causes all sorts of problems + with our UDEV rules and even multipath path aliasing. + + This is an intern fix until one that addresses the entire + root cause is determined. In going down this route, we're no + more broken than upstream (0.4.9), which continues to use sd + devices. +Signed-off-by: Peter M. Petrakis +--- + path_priority/pp_emc/pp_emc.c | 2 +- + path_priority/pp_hp_sw/pp_hp_sw.c | 2 +- + path_priority/pp_netapp/pp_netapp.c | 4 ++-- + path_priority/pp_rdac/pp_rdac.c | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +Index: multipath-tools-0.4.8/path_priority/pp_emc/pp_emc.c +=================================================================== +--- multipath-tools-0.4.8.orig/path_priority/pp_emc/pp_emc.c 2011-06-19 05:58:49.770744140 -0400 ++++ multipath-tools-0.4.8/path_priority/pp_emc/pp_emc.c 2011-06-19 06:01:36.907896141 -0400 +@@ -23,7 +23,7 @@ + int ret = 0; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "Opening the device failed.\n"); +Index: multipath-tools-0.4.8/path_priority/pp_hp_sw/pp_hp_sw.c +=================================================================== +--- multipath-tools-0.4.8.orig/path_priority/pp_hp_sw/pp_hp_sw.c 2011-06-19 05:58:49.770744140 -0400 ++++ multipath-tools-0.4.8/path_priority/pp_hp_sw/pp_hp_sw.c 2011-06-19 06:01:36.907896141 -0400 +@@ -37,7 +37,7 @@ + int ret = HP_PATH_FAILED; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "Opening the device failed.\n"); +Index: multipath-tools-0.4.8/path_priority/pp_netapp/pp_netapp.c +=================================================================== +--- multipath-tools-0.4.8.orig/path_priority/pp_netapp/pp_netapp.c 2011-06-19 05:58:49.770744140 -0400 ++++ multipath-tools-0.4.8/path_priority/pp_netapp/pp_netapp.c 2011-06-19 06:01:36.907896141 -0400 +@@ -74,7 +74,7 @@ + int ret = -1; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "Opening %s failed, errno=%d.\n", dev, errno); +@@ -135,7 +135,7 @@ + int ret = -1; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "Opening %s failed, errno=%d.\n", dev, errno); +Index: multipath-tools-0.4.8/path_priority/pp_rdac/pp_rdac.c +=================================================================== +--- multipath-tools-0.4.8.orig/path_priority/pp_rdac/pp_rdac.c 2011-06-19 05:58:49.770744140 -0400 ++++ multipath-tools-0.4.8/path_priority/pp_rdac/pp_rdac.c 2011-06-19 06:01:36.907896141 -0400 +@@ -23,7 +23,7 @@ + int ret = 0; + int fd; + +- fd = open(dev, O_RDWR|O_NONBLOCK); ++ fd = open(dev, O_RDONLY|O_NONBLOCK); + + if (fd <= 0) { + fprintf(stderr, "opening of the device failed.\n");