master - pre-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3472910177c967...
Commit: 3472910177c96780628c7d54dfb6b4aab735353c
Parent: 088ee7618da48f473ab61b8e73f8d489b67a6900
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jul 7 13:54:37 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jul 7 13:54:37 2015 +0100
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 ++-
WHATS_NEW_DM | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/VERSION b/VERSION
index c32ce9f..6e9667f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.125(2)-git (2015-07-03)
+2.02.125(2)-git (2015-07-07)
diff --git a/VERSION_DM b/VERSION_DM
index 53b1ce1..e0980a8 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.102-git (2015-07-03)
+1.02.102-git (2015-07-07)
diff --git a/WHATS_NEW b/WHATS_NEW
index f9ff8db..f792ffb 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
-Version 2.02.125 -
+Version 2.02.125 - 7th July 2015
================================
+ Fix getline memory usage in lvmpolld.
Add support --clear-needs-check-flag for cache_check of cache pool metadata.
Add lvmetactl for developer use only.
Rename global/lock_retries to lvmlockd_retries.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 728290f..8e38a24 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,4 +1,4 @@
-Version 1.02.102 -
+Version 1.02.102 - 7th July 2015
================================
Include tool.h for default non-library use.
Introduce format macros with embedded % such as FMTu64.
8 years, 9 months
master - lvmpolld: fix possible memory corruption with mem debug
by okozina
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=088ee7618da48f...
Commit: 088ee7618da48f473ab61b8e73f8d489b67a6900
Parent: a405b89555c8a525900d9d81a413cc240ff6c840
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Tue Jul 7 14:03:15 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Tue Jul 7 14:49:53 2015 +0200
lvmpolld: fix possible memory corruption with mem debug
if lvm2 is built with debug memory options dm_free() is not
mapped directly to std library's free(). This may cause memory corruption
as a line buffer may get reallocated in getline with realloc.
This is a temporary hotfix. Other debug memory failure needs to
be investigated and explained.
---
daemons/lvmpolld/lvmpolld-data-utils.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/daemons/lvmpolld/lvmpolld-data-utils.c b/daemons/lvmpolld/lvmpolld-data-utils.c
index 0720718..f28bc51 100644
--- a/daemons/lvmpolld/lvmpolld-data-utils.c
+++ b/daemons/lvmpolld/lvmpolld-data-utils.c
@@ -325,6 +325,7 @@ struct lvmpolld_thread_data *lvmpolld_thread_data_constructor(struct lvmpolld_lv
data->pdlv = NULL;
data->line = NULL;
+ data->line_size = 0;
data->fout = data->ferr = NULL;
data->outpipe[0] = data->outpipe[1] = data->errpipe[0] = data->errpipe[1] = -1;
@@ -365,7 +366,8 @@ void lvmpolld_thread_data_destroy(void *thread_private)
pdst_unlock(data->pdlv->pdst);
}
- dm_free(data->line);
+ /* may get reallocated in getline(). dm_free must not be used */
+ free(data->line);
if (data->fout && !fclose(data->fout))
data->outpipe[0] = -1;
8 years, 9 months
master - conf: regenerate
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a405b89555c8a5...
Commit: a405b89555c8a525900d9d81a413cc240ff6c840
Parent: 88760141da6593373f64a0791edd4bbea29680cc
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jul 7 14:27:00 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Jul 7 14:27:00 2015 +0200
conf: regenerate
---
conf/example.conf.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 4d73c5c..3207955 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -920,7 +920,7 @@ global {
# Configuration option global/cache_check_options.
# List of options passed to the cache_check command.
- # cache_check_options = [ "-q" ]
+ # cache_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/cache_repair_options.
# List of options passed to the cache_repair command.
8 years, 9 months
master - WHATS_NEW: Update. Fix renamed config setting vsn.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=88760141da6593...
Commit: 88760141da6593373f64a0791edd4bbea29680cc
Parent: b174c27d4dd0081396048102e0f6decb8cd569bd
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Jul 7 13:20:01 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Jul 7 13:20:01 2015 +0100
WHATS_NEW: Update. Fix renamed config setting vsn.
---
WHATS_NEW | 2 ++
lib/config/config_settings.h | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 82195d6..f9ff8db 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,8 @@
Version 2.02.125 -
================================
Add support --clear-needs-check-flag for cache_check of cache pool metadata.
+ Add lvmetactl for developer use only.
+ Rename global/lock_retries to lvmlockd_retries.
Replace --enable-lvmlockd by --enable-lockd-sanlock and --enable-lockd-dlm.
Version 2.02.124 - 3rd July 2015
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index baa8609..44f1e04 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -834,7 +834,7 @@ cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL,
cfg(global_use_lvmlockd_CFG, "use_lvmlockd", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 124), NULL, 0, NULL,
"Use lvmlockd for locking among hosts using LVM on shared storage.\n")
-cfg(global_lvmlockd_lock_retries_CFG, "lvmlockd_lock_retries", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_LVMLOCKD_LOCK_RETRIES, vsn(2, 2, 124), NULL, 0, NULL,
+cfg(global_lvmlockd_lock_retries_CFG, "lvmlockd_lock_retries", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_LVMLOCKD_LOCK_RETRIES, vsn(2, 2, 125), NULL, 0, NULL,
"Retry lvmlockd lock requests this many times.\n")
cfg(global_sanlock_lv_extend_CFG, "sanlock_lv_extend", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_SANLOCK_LV_EXTEND_MB, vsn(2, 2, 124), NULL, 0, NULL,
8 years, 9 months
master - conf: regenerate
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b174c27d4dd008...
Commit: b174c27d4dd0081396048102e0f6decb8cd569bd
Parent: bfd0689d6413437c6d3fb8a8461a22ff0f1b5dc9
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jul 7 14:11:16 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Jul 7 14:11:16 2015 +0200
conf: regenerate
---
conf/example.conf.in | 29 +++++++++++++++++++++++++++++
conf/lvmlocal.conf.in | 6 ++++++
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index a26066a..4d73c5c 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -821,6 +821,23 @@ global {
# is seen.
use_lvmetad = @DEFAULT_USE_LVMETAD@
+ # Configuration option global/use_lvmlockd.
+ # Use lvmlockd for locking among hosts using LVM on shared storage.
+ use_lvmlockd = 0
+
+ # Configuration option global/lvmlockd_lock_retries.
+ # Retry lvmlockd lock requests this many times.
+ # lvmlockd_lock_retries = 3
+
+ # Configuration option global/sanlock_lv_extend.
+ # Size in MiB to extend the internal LV holding sanlock locks.
+ # The internal LV holds locks for each LV in the VG, and after
+ # enough LVs have been created, the internal LV needs to be extended.
+ # lvcreate will automatically extend the internal LV when needed by
+ # the amount specified here. Setting this to 0 disables the
+ # automatic extension and can cause lvcreate to fail.
+ # sanlock_lv_extend = 256
+
# Configuration option global/thin_check_executable.
# The full path to the thin_check command.
# LVM uses this command to check that a thin metadata
@@ -883,6 +900,8 @@ global {
# Also see cache_check_options.
# The cache tools are available from the package
# device-mapper-persistent-data.
+ # With cache_check version 5.0 or newer you should add
+ # --clear-needs-check-flag.
# cache_check_executable = "@CACHE_CHECK_CMD@"
# Configuration option global/cache_dump_executable.
@@ -1286,6 +1305,16 @@ activation {
# sometimes assist with data recovery.
# The '--activationmode' option overrides this setting.
activation_mode = "degraded"
+
+ # Configuration option activation/lock_start_list.
+ # Locking is started only for VGs selected by this list.
+ # The rules are the same as those for LVs in volume_list.
+ # This configuration option does not have a default value defined.
+
+ # Configuration option activation/auto_lock_start_list.
+ # Locking is auto-started only for VGs selected by this list.
+ # The rules are the same as those for LVs in auto_activation_volume_list.
+ # This configuration option does not have a default value defined.
}
# Configuration section metadata.
diff --git a/conf/lvmlocal.conf.in b/conf/lvmlocal.conf.in
index 0e82d5c..c3f6ac1 100644
--- a/conf/lvmlocal.conf.in
+++ b/conf/lvmlocal.conf.in
@@ -48,4 +48,10 @@ local {
# Use this only after consulting 'man lvmsystemid'
# to be certain of correct usage and possible dangers.
# This configuration option does not have a default value defined.
+
+ # Configuration option local/host_id.
+ # The lvmlockd sanlock host_id.
+ # This must be a unique among all hosts,
+ # and must be between 1 and 2000.
+ # host_id = 0
}
8 years, 9 months
master - tests: use old snapshot for huge volumes
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bfd0689d641343...
Commit: bfd0689d6413437c6d3fb8a8461a22ff0f1b5dc9
Parent: 0ac20a8fdb971c542790b8f50b32ee071b69f130
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Jul 4 11:41:04 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Jul 7 09:57:32 2015 +0200
tests: use old snapshot for huge volumes
Avoid stacking thins over thins.
---
test/shell/lvconvert-thin.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvconvert-thin.sh b/test/shell/lvconvert-thin.sh
index 8270c0e..b4b3a72 100644
--- a/test/shell/lvconvert-thin.sh
+++ b/test/shell/lvconvert-thin.sh
@@ -36,7 +36,7 @@ vgcreate $vg1 $(head -n 3 DEVICES)
# maybe uname -m [ x86_64 | i686 ]
TSIZE=64T
aux can_use_16T || TSIZE=15T
-lvcreate -s -l 100%FREE -n $lv $vg1 --virtualsize $TSIZE
+lvcreate --type snapshot -l 100%FREE -n $lv $vg1 --virtualsize $TSIZE
aux extend_filter_LVMTEST
pvcreate "$DM_DEV_DIR/$vg1/$lv"
8 years, 9 months
master - cache: support clear-needs-check
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0ac20a8fdb971c...
Commit: 0ac20a8fdb971c542790b8f50b32ee071b69f130
Parent: d16332be72ff46d90b5245d25c4aa471913f0e91
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jul 7 09:51:40 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Jul 7 09:57:27 2015 +0200
cache: support clear-needs-check
Support newer cache tool which support new option
--clear-needs-check-flag.
Code does same as for thin_check.
---
WHATS_NEW | 1 +
configure | 38 ++++++++++++++++++++++++++++++++++++++
configure.in | 27 +++++++++++++++++++++++++++
lib/activate/dev_manager.c | 2 +-
lib/config/config_settings.h | 4 +++-
lib/config/defaults.h | 12 ++++++++++--
lib/misc/configure.h.in | 4 ++++
7 files changed, 84 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 8ba1e43..82195d6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.125 -
================================
+ Add support --clear-needs-check-flag for cache_check of cache pool metadata.
Replace --enable-lvmlockd by --enable-lockd-sanlock and --enable-lockd-dlm.
Version 2.02.124 - 3rd July 2015
diff --git a/configure b/configure
index 4c4c843..48f5381 100755
--- a/configure
+++ b/configure
@@ -902,6 +902,7 @@ with_cache_check
with_cache_dump
with_cache_repair
with_cache_restore
+enable_cache_check_needs_check
enable_readline
enable_realtime
enable_ocf
@@ -1635,6 +1636,8 @@ Optional Features:
device-mapper is missing from the kernel
--disable-thin_check_needs_check
required if thin_check version is < 0.3.0
+ --disable-cache_check_needs_check
+ required if cache_check version is < 0.5
--disable-readline disable readline support
--enable-realtime enable realtime clock support
--enable-ocf enable Open Cluster Framework (OCF) compliant
@@ -8313,6 +8316,14 @@ $as_echo "#define CACHE_INTERNAL 1" >>confdefs.h
*) as_fn_error $? "--with-cache parameter invalid" "$LINENO" 5 ;;
esac
+# Check whether --enable-cache_check_needs_check was given.
+if test "${enable_cache_check_needs_check+set}" = set; then :
+ enableval=$enable_cache_check_needs_check; CACHE_CHECK_NEEDS_CHECK=$enableval
+else
+ CACHE_CHECK_NEEDS_CHECK=yes
+fi
+
+
# Test if necessary cache tools are available
# if not - use plain defaults and warn user
case "$CACHE" in
@@ -8424,6 +8435,23 @@ $as_echo "$as_me: WARNING: cache_check not found in path $PATH" >&2;}
CACHE_CONFIGURE_WARN=y
fi
fi
+ if test "$CACHE_CHECK_NEEDS_CHECK" = yes; then
+ CACHE_CHECK_VSN=`"$CACHE_CHECK_CMD" -V 2>/dev/null`
+ CACHE_CHECK_VSN_MAJOR=`echo "$CACHE_CHECK_VSN" | $AWK -F '.' '{print $1}'`
+ CACHE_CHECK_VSN_MINOR=`echo "$CACHE_CHECK_VSN" | $AWK -F '.' '{print $2}'`
+
+ if test -z "$CACHE_CHECK_VSN_MAJOR" -o -z "$CACHE_CHECK_VSN_MINOR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CACHE_CHECK_CMD: Bad version \"$CACHE_CHECK_VSN\" found" >&5
+$as_echo "$as_me: WARNING: $CACHE_CHECK_CMD: Bad version \"$CACHE_CHECK_VSN\" found" >&2;}
+ CACHE_CHECK_VERSION_WARN=y
+ CACHE_CHECK_NEEDS_CHECK=no
+ elif test "$CACHE_CHECK_VSN_MAJOR" -eq 0 -a "$CACHE_CHECK_VSN_MINOR" -lt 5; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CACHE_CHECK_CMD: Old version \"$CACHE_CHECK_VSN\" found" >&5
+$as_echo "$as_me: WARNING: $CACHE_CHECK_CMD: Old version \"$CACHE_CHECK_VSN\" found" >&2;}
+ CACHE_CHECK_VERSION_WARN=y
+ CACHE_CHECK_NEEDS_CHECK=no
+ fi
+ fi
# Empty means a config way to ignore cache dumping
if test "$CACHE_DUMP_CMD" = "autodetect"; then
if test -n "$ac_tool_prefix"; then
@@ -8745,6 +8773,16 @@ $as_echo "$as_me: WARNING: cache_restore not found in path $PATH" >&2;}
CACHE_CONFIGURE_WARN=y
}
fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cache_check supports the needs-check flag" >&5
+$as_echo_n "checking whether cache_check supports the needs-check flag... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CACHE_CHECK_NEEDS_CHECK" >&5
+$as_echo "$CACHE_CHECK_NEEDS_CHECK" >&6; }
+ if test "$CACHE_CHECK_NEEDS_CHECK" = yes; then
+
+$as_echo "#define CACHE_CHECK_NEEDS_CHECK 1" >>confdefs.h
+
+ fi
;;
esac
diff --git a/configure.in b/configure.in
index 7839480..ca461af 100644
--- a/configure.in
+++ b/configure.in
@@ -560,6 +560,12 @@ case "$CACHE" in
*) AC_MSG_ERROR([--with-cache parameter invalid]) ;;
esac
+dnl -- cache_check needs-check flag
+AC_ARG_ENABLE(cache_check_needs_check,
+ AC_HELP_STRING([--disable-cache_check_needs_check],
+ [required if cache_check version is < 0.5]),
+ CACHE_CHECK_NEEDS_CHECK=$enableval, CACHE_CHECK_NEEDS_CHECK=yes)
+
# Test if necessary cache tools are available
# if not - use plain defaults and warn user
case "$CACHE" in
@@ -573,6 +579,21 @@ case "$CACHE" in
CACHE_CONFIGURE_WARN=y
fi
fi
+ if test "$CACHE_CHECK_NEEDS_CHECK" = yes; then
+ CACHE_CHECK_VSN=`"$CACHE_CHECK_CMD" -V 2>/dev/null`
+ CACHE_CHECK_VSN_MAJOR=`echo "$CACHE_CHECK_VSN" | $AWK -F '.' '{print $1}'`
+ CACHE_CHECK_VSN_MINOR=`echo "$CACHE_CHECK_VSN" | $AWK -F '.' '{print $2}'`
+
+ if test -z "$CACHE_CHECK_VSN_MAJOR" -o -z "$CACHE_CHECK_VSN_MINOR"; then
+ AC_MSG_WARN([$CACHE_CHECK_CMD: Bad version "$CACHE_CHECK_VSN" found])
+ CACHE_CHECK_VERSION_WARN=y
+ CACHE_CHECK_NEEDS_CHECK=no
+ elif test "$CACHE_CHECK_VSN_MAJOR" -eq 0 -a "$CACHE_CHECK_VSN_MINOR" -lt 5; then
+ AC_MSG_WARN([$CACHE_CHECK_CMD: Old version "$CACHE_CHECK_VSN" found])
+ CACHE_CHECK_VERSION_WARN=y
+ CACHE_CHECK_NEEDS_CHECK=no
+ fi
+ fi
# Empty means a config way to ignore cache dumping
if test "$CACHE_DUMP_CMD" = "autodetect"; then
AC_PATH_TOOL(CACHE_DUMP_CMD, cache_dump)
@@ -600,6 +621,12 @@ case "$CACHE" in
CACHE_CONFIGURE_WARN=y
}
fi
+
+ AC_MSG_CHECKING([whether cache_check supports the needs-check flag])
+ AC_MSG_RESULT([$CACHE_CHECK_NEEDS_CHECK])
+ if test "$CACHE_CHECK_NEEDS_CHECK" = yes; then
+ AC_DEFINE([CACHE_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'cache_check' tool requires the --clear-needs-check-flag option])
+ fi
;;
esac
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index e13b8e5..6a4da3c 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -2055,7 +2055,7 @@ static int _pool_register_callback(struct dev_manager *dm,
data->skip_zero = dm->activation;
data->exec = global_cache_check_executable_CFG;
data->opts = global_cache_check_options_CFG;
- data->defaults = DEFAULT_CACHE_CHECK_OPTION1;
+ data->defaults = DEFAULT_CACHE_CHECK_OPTION1 " " DEFAULT_CACHE_CHECK_OPTION2;
data->global = "cache";
} else {
log_error(INTERNAL_ERROR "Registering unsupported pool callback.");
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 74d421a..baa8609 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -900,7 +900,9 @@ cfg(global_cache_check_executable_CFG, "cache_check_executable", global_CFG_SECT
"Set to \"\" to skip this check. (Not recommended.)\n"
"Also see cache_check_options.\n"
"The cache tools are available from the package\n"
- "device-mapper-persistent-data.\n")
+ "device-mapper-persistent-data.\n"
+ "With cache_check version 5.0 or newer you should add\n"
+ "--clear-needs-check-flag.\n")
cfg(global_cache_dump_executable_CFG, "cache_dump_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, CACHE_DUMP_CMD, vsn(2, 2, 108), "@CACHE_DUMP_CMD@", 0, NULL,
"The full path to the cache_dump command.\n"
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index 491c64b..33f9d08 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -101,8 +101,16 @@
#define DEFAULT_THIN_POOL_ZERO 1
#define DEFAULT_POOL_METADATA_SPARE 1 /* thin + cache */
-#define DEFAULT_CACHE_CHECK_OPTION1 "-q"
-#define DEFAULT_CACHE_CHECK_OPTIONS_CONFIG "#S" DEFAULT_CACHE_CHECK_OPTION1
+#ifdef CACHE_CHECK_NEEDS_CHECK
+# define DEFAULT_CACHE_CHECK_OPTION1 "-q"
+# define DEFAULT_CACHE_CHECK_OPTION2 "--clear-needs-check-flag"
+# define DEFAULT_CACHE_CHECK_OPTIONS_CONFIG "#S" DEFAULT_CACHE_CHECK_OPTION1 "#S" DEFAULT_CACHE_CHECK_OPTION2
+#else
+# define DEFAULT_CACHE_CHECK_OPTION1 "-q"
+# define DEFAULT_CACHE_CHECK_OPTION2 ""
+# define DEFAULT_CACHE_CHECK_OPTIONS_CONFIG "#S" DEFAULT_CACHE_CHECK_OPTION1
+#endif
+
#define DEFAULT_CACHE_REPAIR_OPTIONS ""
#define DEFAULT_CACHE_REPAIR_OPTIONS_CONFIG NULL
#define DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS 0
diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in
index 57de7a2..d9f5a7d 100644
--- a/lib/misc/configure.h.in
+++ b/lib/misc/configure.h.in
@@ -6,6 +6,10 @@
/* The path to 'cache_check', if available. */
#undef CACHE_CHECK_CMD
+/* Define to 1 if the external 'cache_check' tool requires the
+ --clear-needs-check-flag option */
+#undef CACHE_CHECK_NEEDS_CHECK
+
/* The path to 'cache_dump', if available. */
#undef CACHE_DUMP_CMD
8 years, 9 months
master - lvmetactl: program to interact with lvmetad
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d16332be72ff46...
Commit: d16332be72ff46d90b5245d25c4aa471913f0e91
Parent: 6a8cc1dcd41f12a48108744b9070405169e7853f
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Oct 21 09:42:20 2014 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Jul 6 15:54:22 2015 -0500
lvmetactl: program to interact with lvmetad
This is not installed; it's only a developer utility
at this point.
---
daemons/lvmetad/Makefile.in | 6 +-
daemons/lvmetad/lvmetactl.c | 183 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 188 insertions(+), 1 deletions(-)
diff --git a/daemons/lvmetad/Makefile.in b/daemons/lvmetad/Makefile.in
index 765128c..090bb76 100644
--- a/daemons/lvmetad/Makefile.in
+++ b/daemons/lvmetad/Makefile.in
@@ -18,7 +18,7 @@ top_builddir = @top_builddir@
SOURCES = lvmetad-core.c
SOURCES2 = testclient.c
-TARGETS = lvmetad
+TARGETS = lvmetad lvmetactl
.PHONY: install_lvmetad
@@ -41,6 +41,10 @@ lvmetad: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \
$(top_builddir)/libdaemon/server/libdaemonserver.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LVMLIBS) $(LIBS)
+lvmetactl: lvmetactl.o $(top_builddir)/libdaemon/client/libdaemonclient.a \
+ $(top_builddir)/libdaemon/server/libdaemonserver.a
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmetactl.o $(LVMLIBS)
+
# TODO: No idea. No idea how to test either.
#ifneq ("$(CFLOW_CMD)", "")
#CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES))
diff --git a/daemons/lvmetad/lvmetactl.c b/daemons/lvmetad/lvmetactl.c
new file mode 100644
index 0000000..2c1c9b9
--- /dev/null
+++ b/daemons/lvmetad/lvmetactl.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This file is part of LVM2.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ */
+
+#include "tool.h"
+
+#include "lvmetad-client.h"
+
+daemon_handle h;
+
+static void print_reply(daemon_reply reply)
+{
+ const char *a = daemon_reply_str(reply, "response", NULL);
+ const char *b = daemon_reply_str(reply, "status", NULL);
+ const char *c = daemon_reply_str(reply, "reason", NULL);
+
+ printf("response \"%s\" status \"%s\" reason \"%s\"\n",
+ a ? a : "", b ? b : "", c ? c : "");
+}
+
+int main(int argc, char **argv)
+{
+ daemon_reply reply;
+ char *cmd;
+ char *uuid;
+ char *name;
+ int val;
+ int ver;
+
+ if (argc < 2) {
+ printf("lvmeta dump\n");
+ printf("lvmeta pv_list\n");
+ printf("lvmeta vg_list\n");
+ printf("lvmeta vg_lookup_name <name>\n");
+ printf("lvmeta vg_lookup_uuid <uuid>\n");
+ printf("lvmeta pv_lookup_uuid <uuid>\n");
+ printf("lvmeta set_global_invalid 0|1\n");
+ printf("lvmeta get_global_invalid\n");
+ printf("lvmeta set_vg_version <uuid> <version>\n");
+ printf("lvmeta vg_lock_type <uuid>\n");
+ return -1;
+ }
+
+ cmd = argv[1];
+
+ h = lvmetad_open(NULL);
+
+ if (!strcmp(cmd, "dump")) {
+ reply = daemon_send_simple(h, "dump",
+ "token = %s", "skip",
+ NULL);
+ printf("%s\n", reply.buffer.mem);
+
+ } else if (!strcmp(cmd, "pv_list")) {
+ reply = daemon_send_simple(h, "pv_list",
+ "token = %s", "skip",
+ NULL);
+ printf("%s\n", reply.buffer.mem);
+
+ } else if (!strcmp(cmd, "vg_list")) {
+ reply = daemon_send_simple(h, "vg_list",
+ "token = %s", "skip",
+ NULL);
+ printf("%s\n", reply.buffer.mem);
+
+ } else if (!strcmp(cmd, "set_global_invalid")) {
+ if (argc < 3) {
+ printf("set_global_invalid 0|1\n");
+ return -1;
+ }
+ val = atoi(argv[2]);
+
+ reply = daemon_send_simple(h, "set_global_info",
+ "global_invalid = %d", val,
+ "token = %s", "skip",
+ NULL);
+ print_reply(reply);
+
+ } else if (!strcmp(cmd, "get_global_invalid")) {
+ reply = daemon_send_simple(h, "get_global_info",
+ "token = %s", "skip",
+ NULL);
+ printf("%s\n", reply.buffer.mem);
+
+ } else if (!strcmp(cmd, "set_vg_version")) {
+ if (argc < 4) {
+ printf("set_vg_version <uuid> <ver>\n");
+ return -1;
+ }
+ uuid = argv[2];
+ ver = atoi(argv[3]);
+
+ reply = daemon_send_simple(h, "set_vg_info",
+ "uuid = %s", uuid,
+ "version = %d", ver,
+ "token = %s", "skip",
+ NULL);
+ print_reply(reply);
+
+ } else if (!strcmp(cmd, "vg_lookup_name")) {
+ if (argc < 3) {
+ printf("vg_lookup_name <name>\n");
+ return -1;
+ }
+ name = argv[2];
+
+ reply = daemon_send_simple(h, "vg_lookup",
+ "name = %s", name,
+ "token = %s", "skip",
+ NULL);
+ printf("%s\n", reply.buffer.mem);
+
+ } else if (!strcmp(cmd, "vg_lookup_uuid")) {
+ if (argc < 3) {
+ printf("vg_lookup_uuid <uuid>\n");
+ return -1;
+ }
+ uuid = argv[2];
+
+ reply = daemon_send_simple(h, "vg_lookup",
+ "uuid = %s", uuid,
+ "token = %s", "skip",
+ NULL);
+ printf("%s\n", reply.buffer.mem);
+
+ } else if (!strcmp(cmd, "vg_lock_type")) {
+ struct dm_config_node *metadata;
+ const char *lock_type;
+
+ if (argc < 3) {
+ printf("vg_lock_type <uuid>\n");
+ return -1;
+ }
+ uuid = argv[2];
+
+ reply = daemon_send_simple(h, "vg_lookup",
+ "uuid = %s", uuid,
+ "token = %s", "skip",
+ NULL);
+ /* printf("%s\n", reply.buffer.mem); */
+
+ metadata = dm_config_find_node(reply.cft->root, "metadata");
+ if (!metadata) {
+ printf("no metadata\n");
+ goto out;
+ }
+
+ lock_type = dm_config_find_str(metadata, "metadata/lock_type", NULL);
+ if (!lock_type) {
+ printf("no lock_type\n");
+ goto out;
+ }
+ printf("lock_type %s\n", lock_type);
+
+ } else if (!strcmp(cmd, "pv_lookup_uuid")) {
+ if (argc < 3) {
+ printf("pv_lookup_uuid <uuid>\n");
+ return -1;
+ }
+ uuid = argv[2];
+
+ reply = daemon_send_simple(h, "pv_lookup",
+ "uuid = %s", uuid,
+ "token = %s", "skip",
+ NULL);
+ printf("%s\n", reply.buffer.mem);
+
+ } else {
+ printf("unknown command\n");
+ goto out_close;
+ }
+out:
+ daemon_reply_destroy(reply);
+out_close:
+ daemon_close(h);
+ return 0;
+}
8 years, 9 months
master - man lvmlockd: minor updates
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6a8cc1dcd41f12...
Commit: 6a8cc1dcd41f12a48108744b9070405169e7853f
Parent: c923dee8de0fd01ca1538ecf783fb6c1dfa9d127
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Jul 6 15:32:41 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Jul 6 15:32:41 2015 -0500
man lvmlockd: minor updates
---
man/lvmlockd.8.in | 36 +++++++++++++++++++++++++-----------
1 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/man/lvmlockd.8.in b/man/lvmlockd.8.in
index 3710df6..4d9b3f5 100644
--- a/man/lvmlockd.8.in
+++ b/man/lvmlockd.8.in
@@ -72,6 +72,10 @@ For default settings, see lvmlockd -h.
.I path
A file containing the local sanlock host_id.
+.B --sanlock-timeout | -o
+.I seconds
+ Override the default sanlock I/O timeout.
+
.B --adopt | A 0|1
Adopt locks from a previous instance of lvmlockd.
@@ -242,6 +246,9 @@ lvmlockd. From a host not using lvmlockd, visible lockd VGs are ignored
in the same way as foreign VGs, i.e. those with a foreign system ID, see
.BR lvmsystemid (7).
+The --shared option displays lockd VGs on a host not using lvmlockd, like
+the --foreign option does for foreign VGs.
+
.SS vgcreate differences
@@ -290,12 +297,12 @@ exists, VGs can still be read, but commands that require the global lock
exclusively will fail.
When a new lockd VG is created, its lockspace is automatically started on
-the host that creates the VG. Other hosts will need to run 'vgcreate
+the host that creates the VG. Other hosts will need to run 'vgchange
--lock-start' to start the new VG before they can use it.
-From the 'vgs' reporting command, lockd VGs are indicated by "s" (for
-shared) in the sixth attr field. The specific lock type and lock args
-for a lockd VG can be displayed with 'vgs -o+locktype,lockargs'.
+From the 'vgs' command, lockd VGs are indicated by "s" (for shared) in the
+sixth attr field. The specific lock type and lock args for a lockd VG can
+be displayed with 'vgs -o+locktype,lockargs'.
.SS starting and stopping VGs
@@ -419,7 +426,7 @@ enabled unless lockd VGs will be used.
A VG lock is associated with each VG. The VG lock is acquired in shared
mode to read the VG and in exclusive mode to change the VG (modify the VG
metadata). This lock serializes modifications to a VG with all other LVM
-commands on other hosts.
+commands accessing the VG from all hosts.
The command 'vgs' will not only acquire the GL lock to read the list of
all VG names, but will acquire the VG lock for each VG prior to reading
@@ -458,7 +465,7 @@ contain disabled global locks that can be enabled later if necessary.
The VG containing the global lock must be visible to all hosts using
sanlock VGs. This can be a reason to create a small sanlock VG, visible
to all hosts, and dedicated to just holding the global lock. While not
-required, this strategy can help to avoid extra work in the future if VGs
+required, this strategy can help to avoid difficulty in the future if VGs
are moved or removed.
The vgcreate command typically acquires the global lock, but in the case
@@ -509,7 +516,7 @@ Changing a lockd VG to a local VG is not yet generally allowed.
(It can be done partially in certain recovery cases.)
-.SS vgremove of a sanlock VG
+.SS vgremove and vgreduce with sanlock VGs
vgremove of a sanlock VG will fail if other hosts have the VG started.
Run vgchange --lock-stop <vg_name> on all other hosts before vgremove.
@@ -517,6 +524,9 @@ Run vgchange --lock-stop <vg_name> on all other hosts before vgremove.
(It may take several seconds before vgremove recognizes that all hosts
have stopped.)
+A sanlock VG contains a hidden LV called "lvmlock" that holds the sanlock
+locks. vgreduce cannot yet remove the PV holding the lvmlockd LV.
+
.SS shared LVs
@@ -615,7 +625,7 @@ same lease exclusively at once, so the same LV should never be active on
two hosts at once when activated exclusively.
The current method of handling this involves no action from lvmlockd,
-while allowing sanlock to protect the leases itself. This produces a safe
+which allows sanlock to protect the leases itself. This produces a safe
but potentially inconvenient result. Doing nothing from lvmlockd leads to
the host's LV locks not being released, which leads to sanlock using the
local watchdog to reset the host before another host can acquire any locks
@@ -738,9 +748,13 @@ stopped the lockspace for the VG. Stop the VG lockspace on all uses using
vgchange --lock-stop.
.IP \[bu] 2
-Long lasting lock contention among hosts may result in a command giving up
-and failing. The number of lock retries can be adjusted with
-global/lvmlockd_lock_retries.
+vgreduce of a PV in a sanlock VG may fail if it holds the internal
+"lvmlock" LV that holds the sanlock locks.
+
+.IP \[bu] 2
+lvmlockd uses lock retries instead of lock queueing, so high lock
+contention may require increasing global/lvmlockd_lock_retries to
+avoid transient lock contention failures.
.IP \[bu] 2
The reporting options locktype and lockargs can be used to view lockd VG
8 years, 9 months
master - configure: Separate sanlock and dlm lock config.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c923dee8de0fd0...
Commit: c923dee8de0fd01ca1538ecf783fb6c1dfa9d127
Parent: 633aea92fbcb228417ac2b4a1ac3d808460d8df5
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Jul 6 18:20:20 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Jul 6 18:20:20 2015 +0100
configure: Separate sanlock and dlm lock config.
---
WHATS_NEW | 1 +
configure | 340 +++++++++++++++++++++++++++--------------------
configure.in | 189 +++++++++++++--------------
lib/misc/configure.h.in | 11 +-
4 files changed, 292 insertions(+), 249 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index f22f0eb..8ba1e43 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.125 -
================================
+ Replace --enable-lvmlockd by --enable-lockd-sanlock and --enable-lockd-dlm.
Version 2.02.124 - 3rd July 2015
================================
diff --git a/configure b/configure
index 3d650a1..4c4c843 100755
--- a/configure
+++ b/configure
@@ -724,6 +724,8 @@ CLDWHOLEARCHIVE
CLDNOWHOLEARCHIVE
CLDFLAGS
CACHE
+BUILD_LOCKDDLM
+BUILD_LOCKDSANLOCK
BUILD_LVMLOCKD
BUILD_LVMPOLLD
BUILD_LVMETAD
@@ -918,14 +920,15 @@ enable_testing
enable_valgrind_pool
enable_devmapper
enable_lvmetad
+enable_lvmpolld
+enable_lockd_sanlock
+enable_lockd_dlm
+enable_use_lvmlockd
+with_lvmlockd_pidfile
enable_use_lvmetad
with_lvmetad_pidfile
-enable_lvmpolld
enable_use_lvmpolld
with_lvmpolld_pidfile
-enable_lvmlockd
-enable_use_lvmlockd
-with_lvmlockd_pidfile
enable_blkid_wiping
enable_udev_systemd_background_jobs
enable_udev_sync
@@ -1643,11 +1646,12 @@ Optional Features:
--enable-valgrind-pool enable valgrind awareness of pools
--disable-devmapper disable LVM2 device-mapper interaction
--enable-lvmetad enable the LVM Metadata Daemon
- --disable-use-lvmetad disable usage of LVM Metadata Daemon
--enable-lvmpolld enable the LVM Polling Daemon
- --disable-use-lvmpolld disable usage of LVM Poll Daemon
- --enable-lvmlockd enable the LVM lock daemon
+ --enable-lockd-sanlock enable the LVM lock daemon using sanlock
+ --enable-lockd-dlm enable the LVM lock daemon using dlm
--disable-use-lvmlockd disable usage of LVM lock daemon
+ --disable-use-lvmetad disable usage of LVM Metadata Daemon
+ --disable-use-lvmpolld disable usage of LVM Poll Daemon
--disable-blkid_wiping disable libblkid detection of signatures when wiping
and use native code instead
--disable-udev-systemd-background-jobs
@@ -1737,12 +1741,12 @@ Optional Packages:
--with-cmirrord-pidfile=PATH
cmirrord pidfile [PID_DIR/cmirrord.pid]
--with-optimisation=OPT C optimisation flag [OPT=-O2]
+ --with-lvmlockd-pidfile=PATH
+ lvmlockd pidfile [PID_DIR/lvmlockd.pid]
--with-lvmetad-pidfile=PATH
lvmetad pidfile [PID_DIR/lvmetad.pid]
--with-lvmpolld-pidfile=PATH
lvmpolld pidfile [PID_DIR/lvmpolld.pid]
- --with-lvmlockd-pidfile=PATH
- lvmlockd pidfile [PID_DIR/lvmlockd.pid]
--with-localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--with-confdir=DIR configuration files in DIR [/etc]
--with-staticdir=DIR static binaries in DIR [EPREFIX/sbin]
@@ -3069,6 +3073,8 @@ case "$host_os" in
LVMETAD=no
LVMPOLLD=no
LVMLOCKD=no
+ LOCKDSANLOCK=no
+ LOCKDDLM=no
ODIRECT=yes
DM_IOCTLS=yes
SELINUX=yes
@@ -10897,47 +10903,6 @@ $as_echo "$LVMETAD" >&6; }
BUILD_LVMETAD=$LVMETAD
-if test "$BUILD_LVMETAD" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmetad" >&5
-$as_echo_n "checking defaults for use_lvmetad... " >&6; }
- # Check whether --enable-use_lvmetad was given.
-if test "${enable_use_lvmetad+set}" = set; then :
- enableval=$enable_use_lvmetad; case ${enableval} in
- yes) DEFAULT_USE_LVMETAD=1 ;;
- *) DEFAULT_USE_LVMETAD=0 ;;
- esac
-else
- DEFAULT_USE_LVMETAD=1
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMETAD" >&5
-$as_echo "$DEFAULT_USE_LVMETAD" >&6; }
-
-$as_echo "#define LVMETAD_SUPPORT 1" >>confdefs.h
-
-
-
-# Check whether --with-lvmetad-pidfile was given.
-if test "${with_lvmetad_pidfile+set}" = set; then :
- withval=$with_lvmetad_pidfile; LVMETAD_PIDFILE=$withval
-else
- LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid"
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define LVMETAD_PIDFILE "$LVMETAD_PIDFILE"
-_ACEOF
-
-else
- DEFAULT_USE_LVMETAD=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_USE_LVMETAD $DEFAULT_USE_LVMETAD
-_ACEOF
-
-
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmpolld" >&5
$as_echo_n "checking whether to build lvmpolld... " >&6; }
@@ -10951,103 +10916,27 @@ $as_echo "$LVMPOLLD" >&6; }
BUILD_LVMPOLLD=$LVMPOLLD
-if test "$BUILD_LVMPOLLD" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmpolld" >&5
-$as_echo_n "checking defaults for use_lvmpolld... " >&6; }
- # Check whether --enable-use_lvmpolld was given.
-if test "${enable_use_lvmpolld+set}" = set; then :
- enableval=$enable_use_lvmpolld; case ${enableval} in
- yes) DEFAULT_USE_LVMPOLLD=1 ;;
- *) DEFAULT_USE_LVMPOLLD=0 ;;
- esac
-else
- DEFAULT_USE_LVMPOLLD=1
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMPOLLD" >&5
-$as_echo "$DEFAULT_USE_LVMPOLLD" >&6; }
-
-$as_echo "#define LVMPOLLD_SUPPORT 1" >>confdefs.h
-
-
-
-# Check whether --with-lvmpolld-pidfile was given.
-if test "${with_lvmpolld_pidfile+set}" = set; then :
- withval=$with_lvmpolld_pidfile; LVMPOLLD_PIDFILE=$withval
-else
- LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid"
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define LVMPOLLD_PIDFILE "$LVMPOLLD_PIDFILE"
-_ACEOF
-
-else
- DEFAULT_USE_LVMPOLLD=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_USE_LVMPOLLD $DEFAULT_USE_LVMPOLLD
-_ACEOF
-
-
################################################################################
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmlockd" >&5
-$as_echo_n "checking whether to build lvmlockd... " >&6; }
-# Check whether --enable-lvmlockd was given.
-if test "${enable_lvmlockd+set}" = set; then :
- enableval=$enable_lvmlockd; LVMLOCKD=$enableval
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lockdsanlock" >&5
+$as_echo_n "checking whether to build lockdsanlock... " >&6; }
+# Check whether --enable-lockd-sanlock was given.
+if test "${enable_lockd_sanlock+set}" = set; then :
+ enableval=$enable_lockd_sanlock; LOCKDSANLOCK=$enableval
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LVMLOCKD" >&5
-$as_echo "$LVMLOCKD" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCKDSANLOCK" >&5
+$as_echo "$LOCKDSANLOCK" >&6; }
-BUILD_LVMLOCKD=$LVMLOCKD
+BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
-if test "$BUILD_LVMLOCKD" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmlockd" >&5
-$as_echo_n "checking defaults for use_lvmlockd... " >&6; }
- # Check whether --enable-use_lvmlockd was given.
-if test "${enable_use_lvmlockd+set}" = set; then :
- enableval=$enable_use_lvmlockd; case ${enableval} in
- yes) DEFAULT_USE_LVMLOCKD=1 ;;
- *) DEFAULT_USE_LVMLOCKD=0 ;;
- esac
-else
- DEFAULT_USE_LVMLOCKD=1
-fi
+if test "$BUILD_LOCKDSANLOCK" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMLOCKD" >&5
-$as_echo "$DEFAULT_USE_LVMLOCKD" >&6; }
+$as_echo "#define LOCKDSANLOCK_SUPPORT 1" >>confdefs.h
-$as_echo "#define LVMLOCKD_SUPPORT 1" >>confdefs.h
-
-
-
-# Check whether --with-lvmlockd-pidfile was given.
-if test "${with_lvmlockd_pidfile+set}" = set; then :
- withval=$with_lvmlockd_pidfile; LVMLOCKD_PIDFILE=$withval
-else
- LVMLOCKD_PIDFILE="$DEFAULT_PID_DIR/lvmlockd.pid"
fi
-
-cat >>confdefs.h <<_ACEOF
-#define LVMLOCKD_PIDFILE "$LVMLOCKD_PIDFILE"
-_ACEOF
-
-else
- DEFAULT_USE_LVMLOCKD=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_USE_LVMLOCKD $DEFAULT_USE_LVMLOCKD
-_ACEOF
-
-
################################################################################
-if test "$BUILD_LVMLOCKD" = yes; then
+if test "$BUILD_LOCKDSANLOCK" = yes; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOCKD_SANLOCK" >&5
@@ -11119,6 +11008,30 @@ else
$as_echo "yes" >&6; }
HAVE_LOCKD_SANLOCK=yes
fi
+ BUILD_LVMLOCKD=yes
+fi
+
+################################################################################
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lockddlm" >&5
+$as_echo_n "checking whether to build lockddlm... " >&6; }
+# Check whether --enable-lockd-dlm was given.
+if test "${enable_lockd_dlm+set}" = set; then :
+ enableval=$enable_lockd_dlm; LOCKDDLM=$enableval
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCKDDLM" >&5
+$as_echo "$LOCKDDLM" >&6; }
+
+BUILD_LOCKDDLM=$LOCKDDLM
+
+if test "$BUILD_LOCKDDLM" = yes; then
+
+$as_echo "#define LOCKDDLM_SUPPORT 1" >>confdefs.h
+
+fi
+
+################################################################################
+if test "$BUILD_LOCKDDLM" = yes; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOCKD_DLM" >&5
@@ -11190,8 +11103,149 @@ else
$as_echo "yes" >&6; }
HAVE_LOCKD_DLM=yes
fi
+ BUILD_LVMLOCKD=yes
+fi
+
+################################################################################
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build lvmlockd" >&5
+$as_echo_n "checking whether to build lvmlockd... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LVMLOCKD" >&5
+$as_echo "$BUILD_LVMLOCKD" >&6; }
+
+if test "$BUILD_LVMLOCKD" = yes; then
+ if test -n "$BUILD_LVMPOLLD"; then :
+ BUILD_LVMPOLLD=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling lvmpolld - required by lvmlockd." >&5
+$as_echo "$as_me: WARNING: Enabling lvmpolld - required by lvmlockd." >&2;}
+fi
+ if test -n "$BUILD_LVMETAD"; then :
+ BUILD_LVMETAD=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling lvmetad - required by lvmlockd." >&5
+$as_echo "$as_me: WARNING: Enabling lvmetad - required by lvmlockd." >&2;}
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmlockd" >&5
+$as_echo_n "checking defaults for use_lvmlockd... " >&6; }
+ # Check whether --enable-use_lvmlockd was given.
+if test "${enable_use_lvmlockd+set}" = set; then :
+ enableval=$enable_use_lvmlockd; case ${enableval} in
+ yes) DEFAULT_USE_LVMLOCKD=1 ;;
+ *) DEFAULT_USE_LVMLOCKD=0 ;;
+ esac
+else
+ DEFAULT_USE_LVMLOCKD=1
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMLOCKD" >&5
+$as_echo "$DEFAULT_USE_LVMLOCKD" >&6; }
+
+$as_echo "#define LVMLOCKD_SUPPORT 1" >>confdefs.h
+
+
+
+# Check whether --with-lvmlockd-pidfile was given.
+if test "${with_lvmlockd_pidfile+set}" = set; then :
+ withval=$with_lvmlockd_pidfile; LVMLOCKD_PIDFILE=$withval
+else
+ LVMLOCKD_PIDFILE="$DEFAULT_PID_DIR/lvmlockd.pid"
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define LVMLOCKD_PIDFILE "$LVMLOCKD_PIDFILE"
+_ACEOF
+
+else
+ DEFAULT_USE_LVMLOCKD=0
fi
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_USE_LVMLOCKD $DEFAULT_USE_LVMLOCKD
+_ACEOF
+
+
+################################################################################
+if test "$BUILD_LVMETAD" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmetad" >&5
+$as_echo_n "checking defaults for use_lvmetad... " >&6; }
+ # Check whether --enable-use_lvmetad was given.
+if test "${enable_use_lvmetad+set}" = set; then :
+ enableval=$enable_use_lvmetad; case ${enableval} in
+ yes) DEFAULT_USE_LVMETAD=1 ;;
+ *) DEFAULT_USE_LVMETAD=0 ;;
+ esac
+else
+ DEFAULT_USE_LVMETAD=1
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMETAD" >&5
+$as_echo "$DEFAULT_USE_LVMETAD" >&6; }
+
+$as_echo "#define LVMETAD_SUPPORT 1" >>confdefs.h
+
+
+
+# Check whether --with-lvmetad-pidfile was given.
+if test "${with_lvmetad_pidfile+set}" = set; then :
+ withval=$with_lvmetad_pidfile; LVMETAD_PIDFILE=$withval
+else
+ LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid"
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define LVMETAD_PIDFILE "$LVMETAD_PIDFILE"
+_ACEOF
+
+else
+ DEFAULT_USE_LVMETAD=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_USE_LVMETAD $DEFAULT_USE_LVMETAD
+_ACEOF
+
+
+################################################################################
+if test "$BUILD_LVMPOLLD" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking defaults for use_lvmpolld" >&5
+$as_echo_n "checking defaults for use_lvmpolld... " >&6; }
+ # Check whether --enable-use_lvmpolld was given.
+if test "${enable_use_lvmpolld+set}" = set; then :
+ enableval=$enable_use_lvmpolld; case ${enableval} in
+ yes) DEFAULT_USE_LVMPOLLD=1 ;;
+ *) DEFAULT_USE_LVMPOLLD=0 ;;
+ esac
+else
+ DEFAULT_USE_LVMPOLLD=1
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_USE_LVMPOLLD" >&5
+$as_echo "$DEFAULT_USE_LVMPOLLD" >&6; }
+
+$as_echo "#define LVMPOLLD_SUPPORT 1" >>confdefs.h
+
+
+
+# Check whether --with-lvmpolld-pidfile was given.
+if test "${with_lvmpolld_pidfile+set}" = set; then :
+ withval=$with_lvmpolld_pidfile; LVMPOLLD_PIDFILE=$withval
+else
+ LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid"
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define LVMPOLLD_PIDFILE "$LVMPOLLD_PIDFILE"
+_ACEOF
+
+else
+ DEFAULT_USE_LVMPOLLD=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_USE_LVMPOLLD $DEFAULT_USE_LVMPOLLD
+_ACEOF
+
+
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libblkid detection of signatures when wiping" >&5
@@ -13517,6 +13571,8 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
+
+
################################################################################
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdev
mapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_lvmlocking_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan
_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
@@ -14902,13 +14958,3 @@ if test "$ODIRECT" != yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&5
$as_echo "$as_me: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&2;}
fi
-
-if test "$BUILD_LVMLOCKD" == yes && test "$BUILD_LVMPOLLD" == no; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lvmlockd requires lvmpolld" >&5
-$as_echo "$as_me: WARNING: lvmlockd requires lvmpolld" >&2;}
-fi
-
-if test "$BUILD_LVMLOCKD" == yes && test "$BUILD_LVMETAD" == no; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: lvmlockd requires lvmetad" >&5
-$as_echo "$as_me: WARNING: lvmlockd requires lvmetad" >&2;}
-fi
diff --git a/configure.in b/configure.in
index 9e713aa..7839480 100644
--- a/configure.in
+++ b/configure.in
@@ -1079,31 +1079,6 @@ AC_MSG_RESULT($LVMETAD)
BUILD_LVMETAD=$LVMETAD
-if test "$BUILD_LVMETAD" = yes; then
- AC_MSG_CHECKING([defaults for use_lvmetad])
- AC_ARG_ENABLE(use_lvmetad,
- AC_HELP_STRING([--disable-use-lvmetad],
- [disable usage of LVM Metadata Daemon]),
- [case ${enableval} in
- yes) DEFAULT_USE_LVMETAD=1 ;;
- *) DEFAULT_USE_LVMETAD=0 ;;
- esac], DEFAULT_USE_LVMETAD=1)
- AC_MSG_RESULT($DEFAULT_USE_LVMETAD)
- AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.])
-
- AC_ARG_WITH(lvmetad-pidfile,
- AC_HELP_STRING([--with-lvmetad-pidfile=PATH],
- [lvmetad pidfile [PID_DIR/lvmetad.pid]]),
- LVMETAD_PIDFILE=$withval,
- LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid")
- AC_DEFINE_UNQUOTED(LVMETAD_PIDFILE, ["$LVMETAD_PIDFILE"],
- [Path to lvmetad pidfile.])
-else
- DEFAULT_USE_LVMETAD=0
-fi
-AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMETAD, [$DEFAULT_USE_LVMETAD],
- [Use lvmetad by default.])
-
################################################################################
dnl -- Build lvmpolld
AC_MSG_CHECKING(whether to build lvmpolld)
@@ -1115,43 +1090,59 @@ AC_MSG_RESULT($LVMPOLLD)
BUILD_LVMPOLLD=$LVMPOLLD
-if test "$BUILD_LVMPOLLD" = yes; then
- AC_MSG_CHECKING([defaults for use_lvmpolld])
- AC_ARG_ENABLE(use_lvmpolld,
- AC_HELP_STRING([--disable-use-lvmpolld],
- [disable usage of LVM Poll Daemon]),
- [case ${enableval} in
- yes) DEFAULT_USE_LVMPOLLD=1 ;;
- *) DEFAULT_USE_LVMPOLLD=0 ;;
- esac], DEFAULT_USE_LVMPOLLD=1)
- AC_MSG_RESULT($DEFAULT_USE_LVMPOLLD)
- AC_DEFINE([LVMPOLLD_SUPPORT], 1, [Define to 1 to include code that uses lvmpolld.])
+################################################################################
+dnl -- Build lockdsanlock
+AC_MSG_CHECKING(whether to build lockdsanlock)
+AC_ARG_ENABLE(lockd-sanlock,
+ AC_HELP_STRING([--enable-lockd-sanlock],
+ [enable the LVM lock daemon using sanlock]),
+ LOCKDSANLOCK=$enableval)
+AC_MSG_RESULT($LOCKDSANLOCK)
- AC_ARG_WITH(lvmpolld-pidfile,
- AC_HELP_STRING([--with-lvmpolld-pidfile=PATH],
- [lvmpolld pidfile [PID_DIR/lvmpolld.pid]]),
- LVMPOLLD_PIDFILE=$withval,
- LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid")
- AC_DEFINE_UNQUOTED(LVMPOLLD_PIDFILE, ["$LVMPOLLD_PIDFILE"],
- [Path to lvmpolld pidfile.])
-else
- DEFAULT_USE_LVMPOLLD=0
+BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
+
+if test "$BUILD_LOCKDSANLOCK" = yes; then
+ AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
+fi
+
+################################################################################
+dnl -- Look for sanlock libraries
+if test "$BUILD_LOCKDSANLOCK" = yes; then
+ PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client, [HAVE_LOCKD_SANLOCK=yes], $bailout)
+ BUILD_LVMLOCKD=yes
+fi
+
+################################################################################
+dnl -- Build lockddlm
+AC_MSG_CHECKING(whether to build lockddlm)
+AC_ARG_ENABLE(lockd-dlm,
+ AC_HELP_STRING([--enable-lockd-dlm],
+ [enable the LVM lock daemon using dlm]),
+ LOCKDDLM=$enableval)
+AC_MSG_RESULT($LOCKDDLM)
+
+BUILD_LOCKDDLM=$LOCKDDLM
+
+if test "$BUILD_LOCKDDLM" = yes; then
+ AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
+fi
+
+################################################################################
+dnl -- Look for dlm libraries
+if test "$BUILD_LOCKDDLM" = yes; then
+ PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM=yes], $bailout)
+ BUILD_LVMLOCKD=yes
fi
-AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMPOLLD, [$DEFAULT_USE_LVMPOLLD],
- [Use lvmpolld by default.])
################################################################################
dnl -- Build lvmlockd
-AC_MSG_CHECKING(whether to build lvmlockd)
-AC_ARG_ENABLE(lvmlockd,
- AC_HELP_STRING([--enable-lvmlockd],
- [enable the LVM lock daemon]),
- LVMLOCKD=$enableval)
-AC_MSG_RESULT($LVMLOCKD)
-BUILD_LVMLOCKD=$LVMLOCKD
+AC_MSG_CHECKING(whether to build lvmlockd)
+AC_MSG_RESULT($BUILD_LVMLOCKD)
if test "$BUILD_LVMLOCKD" = yes; then
+ AS_IF([test -n "$BUILD_LVMPOLLD"], [BUILD_LVMPOLLD=yes; AC_MSG_WARN([Enabling lvmpolld - required by lvmlockd.])])
+ AS_IF([test -n "$BUILD_LVMETAD"], [BUILD_LVMETAD=yes; AC_MSG_WARN([Enabling lvmetad - required by lvmlockd.])])
AC_MSG_CHECKING([defaults for use_lvmlockd])
AC_ARG_ENABLE(use_lvmlockd,
AC_HELP_STRING([--disable-use-lvmlockd],
@@ -1177,46 +1168,58 @@ AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMLOCKD, [$DEFAULT_USE_LVMLOCKD],
[Use lvmlockd by default.])
################################################################################
-dnl -- Build lockdsanlock
-AC_MSG_CHECKING(whether to build lockdsanlock)
-AC_ARG_ENABLE(lockd-sanlock,
- AC_HELP_STRING([--enable-lockd-sanlock],
- [enable the LVM lock daemon sanlock option]),
- LOCKDSANLOCK=$enableval)
-AC_MSG_RESULT($LOCKDSANLOCK)
-
-BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
-
-if test "$BUILD_LOCKDSANLOCK" = yes; then
- AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
-fi
-
-################################################################################
-dnl -- Build lockddlm
-AC_MSG_CHECKING(whether to build lockddlm)
-AC_ARG_ENABLE(lockd-dlm,
- AC_HELP_STRING([--enable-lockd-dlm],
- [enable the LVM lock daemon dlm option]),
- LOCKDDLM=$enableval)
-AC_MSG_RESULT($LOCKDDLM)
-
-BUILD_LOCKDDLM=$LOCKDDLM
+dnl -- Check lvmetad
+if test "$BUILD_LVMETAD" = yes; then
+ AC_MSG_CHECKING([defaults for use_lvmetad])
+ AC_ARG_ENABLE(use_lvmetad,
+ AC_HELP_STRING([--disable-use-lvmetad],
+ [disable usage of LVM Metadata Daemon]),
+ [case ${enableval} in
+ yes) DEFAULT_USE_LVMETAD=1 ;;
+ *) DEFAULT_USE_LVMETAD=0 ;;
+ esac], DEFAULT_USE_LVMETAD=1)
+ AC_MSG_RESULT($DEFAULT_USE_LVMETAD)
+ AC_DEFINE([LVMETAD_SUPPORT], 1, [Define to 1 to include code that uses lvmetad.])
-if test "$BUILD_LOCKDDLM" = yes; then
- AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
+ AC_ARG_WITH(lvmetad-pidfile,
+ AC_HELP_STRING([--with-lvmetad-pidfile=PATH],
+ [lvmetad pidfile [PID_DIR/lvmetad.pid]]),
+ LVMETAD_PIDFILE=$withval,
+ LVMETAD_PIDFILE="$DEFAULT_PID_DIR/lvmetad.pid")
+ AC_DEFINE_UNQUOTED(LVMETAD_PIDFILE, ["$LVMETAD_PIDFILE"],
+ [Path to lvmetad pidfile.])
+else
+ DEFAULT_USE_LVMETAD=0
fi
+AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMETAD, [$DEFAULT_USE_LVMETAD],
+ [Use lvmetad by default.])
################################################################################
-dnl -- Look for sanlock libraries
-if test "$BUILD_LOCKDSANLOCK" = yes; then
- PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client, [HAVE_LOCKD_SANLOCK=yes], $bailout)
-fi
+dnl -- Check lvmpolld
+if test "$BUILD_LVMPOLLD" = yes; then
+ AC_MSG_CHECKING([defaults for use_lvmpolld])
+ AC_ARG_ENABLE(use_lvmpolld,
+ AC_HELP_STRING([--disable-use-lvmpolld],
+ [disable usage of LVM Poll Daemon]),
+ [case ${enableval} in
+ yes) DEFAULT_USE_LVMPOLLD=1 ;;
+ *) DEFAULT_USE_LVMPOLLD=0 ;;
+ esac], DEFAULT_USE_LVMPOLLD=1)
+ AC_MSG_RESULT($DEFAULT_USE_LVMPOLLD)
+ AC_DEFINE([LVMPOLLD_SUPPORT], 1, [Define to 1 to include code that uses lvmpolld.])
-################################################################################
-dnl -- Look for dlm libraries
-if test "$BUILD_LOCKDDLM" = yes; then
- PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM=yes], $bailout)
+ AC_ARG_WITH(lvmpolld-pidfile,
+ AC_HELP_STRING([--with-lvmpolld-pidfile=PATH],
+ [lvmpolld pidfile [PID_DIR/lvmpolld.pid]]),
+ LVMPOLLD_PIDFILE=$withval,
+ LVMPOLLD_PIDFILE="$DEFAULT_PID_DIR/lvmpolld.pid")
+ AC_DEFINE_UNQUOTED(LVMPOLLD_PIDFILE, ["$LVMPOLLD_PIDFILE"],
+ [Path to lvmpolld pidfile.])
+else
+ DEFAULT_USE_LVMPOLLD=0
fi
+AC_DEFINE_UNQUOTED(DEFAULT_USE_LVMPOLLD, [$DEFAULT_USE_LVMPOLLD],
+ [Use lvmpolld by default.])
################################################################################
@@ -2072,13 +2075,3 @@ AS_IF([test -n "$CACHE_CONFIGURE_WARN"],
AS_IF([test "$ODIRECT" != yes],
[AC_MSG_WARN([O_DIRECT disabled: low-memory pvmove may lock up])])
-
-AS_IF([test "$BUILD_LVMLOCKD" == yes && test "$BUILD_LVMPOLLD" == no],
- [AC_MSG_WARN([lvmlockd requires lvmpolld])])
-
-AS_IF([test "$BUILD_LVMLOCKD" == yes && test "$BUILD_LVMETAD" == no],
- [AC_MSG_WARN([lvmlockd requires lvmetad])])
-
-AS_IF([test "$BUILD_LVMLOCKD" == yes && test "$BUILD_LOCKDDLM" == no && test "$BUILD_LOCKDSANLOCK" == no],
- [AC_MSG_WARN([lvmlockd requires enabling sanlock or dlm or both])])
-
diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in
index 89b7a7b..57de7a2 100644
--- a/lib/misc/configure.h.in
+++ b/lib/misc/configure.h.in
@@ -410,7 +410,7 @@
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
-/* Define to 1 if `st_rdev' is a member of `struct stat'. */
+/* Define to 1 if `st_rdev' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_RDEV
/* Define to 1 if you have the <syslog.h> header file. */
@@ -520,6 +520,12 @@
/* Locale-dependent data */
#undef LOCALEDIR
+/* Define to 1 to include code that uses lvmlockd dlm option. */
+#undef LOCKDDLM_SUPPORT
+
+/* Define to 1 to include code that uses lvmlockd sanlock option. */
+#undef LOCKDSANLOCK_SUPPORT
+
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
@@ -581,9 +587,6 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
/* Define to the version of this package. */
#undef PACKAGE_VERSION
8 years, 9 months