rpms/device-mapper-multipath/devel dont_remove.patch, NONE, 1.1 udev_change.patch, NONE, 1.1 device-mapper-multipath.spec, 1.61, 1.62
Benjamin Marzinski
bmarzins at fedoraproject.org
Thu Aug 20 22:28:45 UTC 2009
Author: bmarzins
Update of /cvs/pkgs/rpms/device-mapper-multipath/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17662
Modified Files:
device-mapper-multipath.spec
Added Files:
dont_remove.patch udev_change.patch
Log Message:
Fixed problem where maps were being added and then removed.
Changed the udev rules to fix some issues.
dont_remove.patch:
main.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- NEW FILE dont_remove.patch ---
Index: multipath-tools/multipathd/main.c
===================================================================
--- multipath-tools.orig/multipathd/main.c
+++ multipath-tools/multipathd/main.c
@@ -290,8 +290,23 @@ ev_add_map (struct sysfs_device * dev, s
static int
uev_remove_map (struct sysfs_device * dev, struct vectors * vecs)
{
+ struct multipath * mpp;
+
condlog(2, "%s: remove map (uevent)", dev->kernel);
+#if 0
return ev_remove_map(dev->kernel, vecs);
+#else
+ mpp = find_mp_by_str(vecs->mpvec, dev->kernel);
+
+ if (!mpp) {
+ condlog(2, "%s: devmap not registered, can't remove",
+ dev->kernel);
+ return 0;
+ }
+ orphan_paths(vecs->pathvec, mpp);
+ remove_map_and_stop_waiter(mpp, vecs, 1);
+ return 0;
+#endif
}
int
udev_change.patch:
mpath_wait | 21 +++++++++++++++------
multipath.rules | 5 ++++-
2 files changed, 19 insertions(+), 7 deletions(-)
--- NEW FILE udev_change.patch ---
---
multipath/mpath_wait | 21 +++++++++++++++------
multipath/multipath.rules | 5 ++++-
2 files changed, 19 insertions(+), 7 deletions(-)
Index: multipath-tools/multipath/mpath_wait
===================================================================
--- multipath-tools.orig/multipath/mpath_wait
+++ multipath-tools/multipath/mpath_wait
@@ -3,14 +3,23 @@
retry=3
sec=1
-/sbin/dmsetup info -c --noheadings -j $1 -m $2 2> /dev/null | grep -q .*:${1}:${2}:L.*:.*:.*:.*:.*
-ret=$?
+dev=`/sbin/dmsetup ls --target multipath -j $1 -m $2 --exec 'echo'`
+if [ -n "$dev" ]; then
+ /usr/bin/stat $dev > /dev/null 2>&1
+ ret=$?
+else
+ ret=1
+fi
-while [ "$ret" -ne 0 -a "$retry" -gt 0 ]
-do
+while [ "$ret" -ne 0 -a "$retry" -gt 0 ]; do
sleep $sec
- /sbin/dmsetup info -c --noheadings -j $1 -m $2 2> /dev/null | grep -q .*:${1}:${2}:L.*:.*:.*:.*:.*
- ret=$?
+ if [ -z "$dev" ]; then
+ dev=`/sbin/dmsetup ls --target multipath -j $1 -m $2 --exec 'echo'`
+ fi
+ if [ -n "$dev" ]; then
+ /usr/bin/stat $dev > /dev/null 2>&1
+ ret=$?
+ fi
retry=$(($retry - 1))
done
Index: multipath-tools/multipath/multipath.rules
===================================================================
--- multipath-tools.orig/multipath/multipath.rules
+++ multipath-tools/multipath/multipath.rules
@@ -2,7 +2,10 @@
# so name them after their devmap name
SUBSYSTEM!="block", GOTO="end_mpath"
RUN+="socket:/org/kernel/dm/multipath_event"
+ACTION!="change", GOTO="end_mpath"
KERNEL!="dm-[0-9]*", GOTO="end_mpath"
+ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
+ENV{DM_UUID}=="*?", ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
PROGRAM!="/sbin/mpath_wait %M %m", GOTO="end_mpath"
-ACTION=="add", RUN+="/sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -a -p p' -j %M -m %m"
+RUN+="/sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -a -p p' -j %M -m %m"
LABEL="end_mpath"
Index: device-mapper-multipath.spec
===================================================================
RCS file: /cvs/pkgs/rpms/device-mapper-multipath/devel/device-mapper-multipath.spec,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -p -r1.61 -r1.62
--- device-mapper-multipath.spec 30 Jul 2009 20:39:53 -0000 1.61
+++ device-mapper-multipath.spec 20 Aug 2009 22:28:44 -0000 1.62
@@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath
Version: 0.4.9
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
@@ -22,6 +22,8 @@ Patch11: multipath_rules.patch
Patch12: cciss_id.patch
Patch13: stop_warnings.patch
Patch14: move_bindings.patch
+Patch15: dont_remove.patch
+Patch16: udev_change.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{name}-libs = %{version}-%{release}
@@ -76,6 +78,8 @@ kpartx manages partition creation and re
%patch12 -p1 -b .cciss_id
%patch13 -p1 -b .stop_warnings
%patch14 -p1 -b .move_bindings
+%patch15 -p1 -b .dont_remove
+%patch16 -p1 -b .udev_change
%build
%define _sbindir /sbin
@@ -142,6 +146,10 @@ fi
%{_mandir}/man8/kpartx.8.gz
%changelog
+* Thu Aug 20 2009 Benjamin Marzinski <bmarzins at redhat.com> - 0.4.8-5
+- Fixed problem where maps were being added and then removed.
+- Changed the udev rules to fix some issues.
+
* Thu Jul 30 2009 Benjamin Marzinski <bmarzins at redhat.com> - 0.4.9-4
- Fixed build issue on i686 machines.
More information about the fedora-extras-commits
mailing list