[device-mapper-multipath/f18] device-mapper-multipath-0.4.9-36.f18
Benjamin Marzinski
bmarzins at fedoraproject.org
Mon Dec 17 19:50:22 UTC 2012
commit a7769ba5a6621a9a0b0a35437f145e6750a24502
Author: Benjamin Marzinski <bmarzins at redhat.com>
Date: Mon Dec 17 08:13:14 2012 -0600
device-mapper-multipath-0.4.9-36.f18
Add 0024-RHBZ-887357-dont-disable-libdm-failback-for-sync-case.patch
* make kpartx -s and multipath use libdm failback device creation, so
that they work in environments without udev
Resolves: bz #887357
...dont-disable-libdm-failback-for-sync-case.patch | 111 ++++++++++++++++++++
device-mapper-multipath.spec | 10 ++-
2 files changed, 120 insertions(+), 1 deletions(-)
---
diff --git a/0024-RHBZ-887357-dont-disable-libdm-failback-for-sync-case.patch b/0024-RHBZ-887357-dont-disable-libdm-failback-for-sync-case.patch
new file mode 100644
index 0000000..7bea525
--- /dev/null
+++ b/0024-RHBZ-887357-dont-disable-libdm-failback-for-sync-case.patch
@@ -0,0 +1,111 @@
+---
+ kpartx/devmapper.c | 4 ++--
+ kpartx/devmapper.h | 2 ++
+ kpartx/kpartx.c | 6 +++---
+ libmultipath/devmapper.c | 6 +++---
+ 4 files changed, 10 insertions(+), 8 deletions(-)
+
+Index: multipath-tools-120821/kpartx/devmapper.c
+===================================================================
+--- multipath-tools-120821.orig/kpartx/devmapper.c
++++ multipath-tools-120821/kpartx/devmapper.c
+@@ -78,7 +78,7 @@ dm_simplecmd (int task, const char *name
+ if (no_flush)
+ dm_task_no_flush(dmt);
+
+- if (udev_wait_flag && !dm_task_set_cookie(dmt, cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK))
++ if (udev_wait_flag && !dm_task_set_cookie(dmt, cookie, (udev_sync)? 0 : DM_UDEV_DISABLE_LIBRARY_FALLBACK))
+ goto out;
+ r = dm_task_run(dmt);
+
+@@ -128,7 +128,7 @@ dm_addmap (int task, const char *name, c
+
+ dm_task_no_open_count(dmt);
+
+- if (task == DM_DEVICE_CREATE && !dm_task_set_cookie(dmt, cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK))
++ if (task == DM_DEVICE_CREATE && !dm_task_set_cookie(dmt, cookie, (udev_sync)? 0 : DM_UDEV_DISABLE_LIBRARY_FALLBACK))
+ goto addout;
+ r = dm_task_run (dmt);
+
+Index: multipath-tools-120821/kpartx/devmapper.h
+===================================================================
+--- multipath-tools-120821.orig/kpartx/devmapper.h
++++ multipath-tools-120821/kpartx/devmapper.h
+@@ -2,6 +2,8 @@
+ #define MINOR(dev) ((dev & 0xff) | ((dev >> 12) & 0xfff00))
+ #define MKDEV(ma,mi) ((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12))
+
++extern int udev_sync;
++
+ int dm_prereq (char *, int, int, int);
+ int dm_simplecmd (int, const char *, int, uint32_t *);
+ int dm_addmap (int, const char *, const char *, const char *, uint64_t,
+Index: multipath-tools-120821/kpartx/kpartx.c
+===================================================================
+--- multipath-tools-120821.orig/kpartx/kpartx.c
++++ multipath-tools-120821/kpartx/kpartx.c
+@@ -56,6 +56,7 @@ struct pt {
+ } pts[MAXTYPES];
+
+ int ptct = 0;
++int udev_sync = 0;
+
+ static void
+ addpts(char *t, ptreader f)
+@@ -205,7 +206,6 @@ main(int argc, char **argv){
+ int loopro = 0;
+ int hotplug = 0;
+ int loopcreated = 0;
+- int sync = 0;
+ struct stat buf;
+ uint32_t cookie = 0;
+
+@@ -267,7 +267,7 @@ main(int argc, char **argv){
+ what = DELETE;
+ break;
+ case 's':
+- sync = 1;
++ udev_sync = 1;
+ break;
+ case 'u':
+ what = UPDATE;
+@@ -278,7 +278,7 @@ main(int argc, char **argv){
+ }
+
+ #ifdef LIBDM_API_COOKIE
+- if (!sync)
++ if (!udev_sync)
+ dm_udev_set_sync_support(0);
+ #endif
+
+Index: multipath-tools-120821/libmultipath/devmapper.c
+===================================================================
+--- multipath-tools-120821.orig/libmultipath/devmapper.c
++++ multipath-tools-120821/libmultipath/devmapper.c
+@@ -219,7 +219,7 @@ dm_simplecmd (int task, const char *name
+ dm_task_no_flush(dmt); /* for DM_DEVICE_SUSPEND/RESUME */
+ #endif
+
+- if (udev_wait_flag && !dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK))
++ if (udev_wait_flag && !dm_task_set_cookie(dmt, &conf->cookie, (conf->daemon)? DM_UDEV_DISABLE_LIBRARY_FALLBACK : 0))
+ goto out;
+ r = dm_task_run (dmt);
+
+@@ -284,7 +284,7 @@ dm_addmap (int task, const char *target,
+ dm_task_no_open_count(dmt);
+
+ if (task == DM_DEVICE_CREATE &&
+- !dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK))
++ !dm_task_set_cookie(dmt, &conf->cookie, (conf->daemon)? DM_UDEV_DISABLE_LIBRARY_FALLBACK : 0))
+ goto freeout;
+ r = dm_task_run (dmt);
+
+@@ -1244,7 +1244,7 @@ dm_rename (char * old, char * new)
+
+ dm_task_no_open_count(dmt);
+
+- if (!dm_task_set_cookie(dmt, &conf->cookie, DM_UDEV_DISABLE_LIBRARY_FALLBACK))
++ if (!dm_task_set_cookie(dmt, &conf->cookie, (conf->daemon)? DM_UDEV_DISABLE_LIBRARY_FALLBACK : 0))
+ goto out;
+ if (!dm_task_run(dmt))
+ goto out;
diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec
index ae29ff1..dde18d6 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: 35%{?dist}
+Release: 36%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
@@ -31,6 +31,7 @@ Patch0020: 0020-RH-netapp-config.patch
Patch0021: 0021-RH-fix-oom-adj.patch
Patch0022: 0022-RHBZ-864368-disable-libdm-failback.patch
Patch0023: 0023-RHBZ-866291-update-documentation.patch
+Patch0024: 0024-RHBZ-887357-dont-disable-libdm-failback-for-sync-case.patch
# runtime
Requires: %{name}-libs = %{version}-%{release}
@@ -106,6 +107,7 @@ kpartx manages partition creation and removal for device-mapper devices.
%patch0021 -p1
%patch0022 -p1
%patch0023 -p1
+%patch0024 -p1
cp %{SOURCE1} .
%build
@@ -192,6 +194,12 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
%{_mandir}/man8/kpartx.8.gz
%changelog
+* Mon Dec 17 2012 Benjamin Marzinski <bmarizns at redhat.com> 0.4.9-36
+- Add 0024-RHBZ-887357-dont-disable-libdm-failback-for-sync-case.patch
+ * make kpartx -s and multipath use libdm failback device creation, so
+ that they work in environments without udev
+- Resolves: bz #887357
+
* Thu Oct 24 2012 Benjamin Marzinski <bmarizns at redhat.com> 0.4.9-35
- Add 0022-RHBZ-864368-disable-libdm-failback.patch
* make kpartx and multiapthd disable libdm failback device creation
More information about the scm-commits
mailing list