r916 - lvm2/trunk/debian/patches
Bastian Blank
waldi at alioth.debian.org
Sun May 27 15:37:11 UTC 2012
Author: waldi
Date: Sun May 27 15:37:10 2012
New Revision: 916
Log:
debian/patches/monitoring-default-off.patch
- Properly change default config.
- Handle config correctly.
Modified:
lvm2/trunk/debian/patches/monitoring-default-off.patch
Modified: lvm2/trunk/debian/patches/monitoring-default-off.patch
==============================================================================
--- lvm2/trunk/debian/patches/monitoring-default-off.patch Sun May 27 15:09:40 2012 (r915)
+++ lvm2/trunk/debian/patches/monitoring-default-off.patch Sun May 27 15:37:10 2012 (r916)
@@ -1,11 +1,55 @@
-Description: default to not monitoring so that regular LVM operation does not
- require dmeventd running.
-Author: Kees Cook <kees at ubuntu.com>
-
-Index: trunk/lib/config/defaults.h
-===================================================================
---- trunk.orig/lib/config/defaults.h
-+++ trunk/lib/config/defaults.h
-@@ -64,1 +64,1 @@
+--- a/lib/config/defaults.h
++++ b/lib/config/defaults.h
+@@ -61,7 +61,7 @@
+ #define DEFAULT_DMEVENTD_MIRROR_LIB "libdevmapper-event-lvm2mirror.so"
+ #define DEFAULT_DMEVENTD_SNAPSHOT_LIB "libdevmapper-event-lvm2snapshot.so"
+ #define DEFAULT_DMEVENTD_THIN_LIB "libdevmapper-event-lvm2thin.so"
-#define DEFAULT_DMEVENTD_MONITOR 1
-+#define DEFAULT_DMEVENTD_MONITOR -1
++#define DEFAULT_DMEVENTD_MONITOR 0
+ #define DEFAULT_BACKGROUND_POLLING 1
+
+ #define DEFAULT_THIN_CHECK_EXECUTABLE "/sbin/thin_check -q"
+--- a/doc/example.conf.in
++++ b/doc/example.conf.in
+@@ -677,7 +677,7 @@
+
+ # Monitoring is enabled by default when activating logical volumes.
+ # Set to 0 to disable monitoring or use the --ignoremonitoring option.
+- monitoring = 1
++ monitoring = 0
+
+ # When pvmove or lvconvert must wait for the kernel to finish
+ # synchronising or merging data, they check and report progress
+--- a/tools/toollib.c
++++ b/tools/toollib.c
+@@ -1505,8 +1505,6 @@
+ int get_activation_monitoring_mode(struct cmd_context *cmd,
+ int *monitoring_mode)
+ {
+- *monitoring_mode = DEFAULT_DMEVENTD_MONITOR;
+-
+ if (arg_count(cmd, monitor_ARG) &&
+ (arg_count(cmd, ignoremonitoring_ARG) ||
+ arg_count(cmd, sysinit_ARG))) {
+@@ -1514,14 +1512,15 @@
+ return 0;
+ }
+
+- if (arg_count(cmd, monitor_ARG))
+- *monitoring_mode = arg_int_value(cmd, monitor_ARG,
++ *monitoring_mode = find_config_tree_bool(cmd, "activation/monitoring",
+ DEFAULT_DMEVENTD_MONITOR);
+- else if (is_static() || arg_count(cmd, ignoremonitoring_ARG) ||
+- arg_count(cmd, sysinit_ARG) ||
+- !find_config_tree_bool(cmd, "activation/monitoring",
+- DEFAULT_DMEVENTD_MONITOR))
++
++ if (is_static() || arg_count(cmd, ignoremonitoring_ARG) ||
++ arg_count(cmd, sysinit_ARG))
+ *monitoring_mode = DMEVENTD_MONITOR_IGNORE;
++ else if (arg_count(cmd, monitor_ARG))
++ *monitoring_mode = arg_int_value(cmd, monitor_ARG,
++ *monitoring_mode);
+
+ return 1;
+ }
More information about the pkg-lvm-commits
mailing list