master - man: -Z zeroes 4KiB, not just 1KiB
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3eed0aa7dca9c1...
Commit: 3eed0aa7dca9c1895bbf80e1585debf9bddac5a8
Parent: 131693c42143505f969821b7f2cab0bff471c620
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Dec 12 10:01:37 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Dec 12 15:02:12 2013 +0100
man: -Z zeroes 4KiB, not just 1KiB
---
man/lvconvert.8.in | 2 +-
man/lvcreate.8.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
index 30e9809..44b89af 100644
--- a/man/lvconvert.8.in
+++ b/man/lvconvert.8.in
@@ -244,7 +244,7 @@ kernel and passed down to the Physical Volume.
Default is \fIpassdown\fP.
.TP
.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
-Controls zeroing of the first KB of data in the snapshot.
+Controls zeroing of the first 4KiB of data in the snapshot.
If the volume is read-only the snapshot will not be zeroed.
For thin pool volumes it controls zeroing of provisioned blocks.
Note: Provisioning of large zeroed chunks impacts performance.
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
index 08cc15c..4a769cb 100644
--- a/man/lvcreate.8.in
+++ b/man/lvcreate.8.in
@@ -417,7 +417,7 @@ signatures are detected only in this case).
Logical Volume is not wiped if the read only flag is set.
.TP
.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
-Controls zeroing of the first KiB of data in the new logical volume.
+Controls zeroing of the first 4KiB of data in the new logical volume.
.br
Default is \fIy\fPes.
.br
10 years, 3 months
master - autoreconf: latest changes
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=131693c4214350...
Commit: 131693c42143505f969821b7f2cab0bff471c620
Parent: b424b6398be64aec6a5772bb847f78b1941a0fe1
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Dec 12 14:32:11 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Dec 12 14:32:40 2013 +0100
autoreconf: latest changes
---
configure | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/configure b/configure
index f48c89b..a156460 100755
--- a/configure
+++ b/configure
@@ -1619,9 +1619,9 @@ Optional Packages:
[[TYPE=none]]
--with-thin=TYPE thin provisioning support: internal/shared/none
[[TYPE=internal]]
- --with-thin-check=PATH thin_check tool: [[thin_check]]
- --with-thin-dump=PATH thin_dump tool: [[thin_dump]]
- --with-thin-repair=PATH thin_repair tool: [[thin_repair]]
+ --with-thin-check=PATH thin_check tool: [[autodetect]]
+ --with-thin-dump=PATH thin_dump tool: [[autodetect]]
+ --with-thin-repair=PATH thin_repair tool: [[autodetect]]
--with-ocfdir=DIR install OCF files in DIR
[[PREFIX/lib/ocf/resource.d/lvm2]]
--with-default-pid-dir=PID_DIR
@@ -7154,7 +7154,7 @@ fi
if test "${with_thin_check+set}" = set; then :
withval=$with_thin_check; THIN_CHECK_CMD=$withval
else
- THIN_CHECK_CMD="thin_check"
+ THIN_CHECK_CMD="autodetect"
fi
@@ -7162,7 +7162,7 @@ fi
if test "${with_thin_dump+set}" = set; then :
withval=$with_thin_dump; THIN_DUMP_CMD=$withval
else
- THIN_DUMP_CMD="thin_dump"
+ THIN_DUMP_CMD="autodetect"
fi
@@ -7170,7 +7170,7 @@ fi
if test "${with_thin_repair+set}" = set; then :
withval=$with_thin_repair; THIN_REPAIR_CMD=$withval
else
- THIN_REPAIR_CMD="thin_repair"
+ THIN_REPAIR_CMD="autodetect"
fi
@@ -7190,7 +7190,7 @@ esac
case "$THIN" in
internal|shared)
# Empty means a config way to ignore thin checking
- if test "$THIN_CHECK_CMD" = "thin_check"; then
+ if test "$THIN_CHECK_CMD" = "autodetect"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}thin_check", so it can be a program name with args.
set dummy ${ac_tool_prefix}thin_check; ac_word=$2
@@ -7275,7 +7275,7 @@ $as_echo "no" >&6; }
fi
if test "x$ac_pt_THIN_CHECK_CMD" = x; then
- THIN_CHECK_CMD="thin_check"
+ THIN_CHECK_CMD=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
@@ -7289,15 +7289,15 @@ else
THIN_CHECK_CMD="$ac_cv_path_THIN_CHECK_CMD"
fi
- test "$THIN_CHECK_CMD" = "thin_check" && {
+ test -z "$THIN_CHECK_CMD" && {
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thin_check not found in path $PATH" >&5
$as_echo "$as_me: WARNING: thin_check not found in path $PATH" >&2;}
- THIN_CHECK_CMD=thin_check
+ THIN_CHECK_CMD=/usr/sbin/thin_check
THIN_CONFIGURE_WARN=y
}
fi
# Empty means a config way to ignore thin checking
- if test "$THIN_DUMP_CMD" = "thin_dump"; then
+ if test "$THIN_DUMP_CMD" = "autodetect"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}thin_dump", so it can be a program name with args.
set dummy ${ac_tool_prefix}thin_dump; ac_word=$2
@@ -7382,7 +7382,7 @@ $as_echo "no" >&6; }
fi
if test "x$ac_pt_THIN_DUMP_CMD" = x; then
- THIN_DUMP_CMD="thin_dump"
+ THIN_DUMP_CMD=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
@@ -7396,15 +7396,15 @@ else
THIN_DUMP_CMD="$ac_cv_path_THIN_DUMP_CMD"
fi
- test "$THIN_DUMP_CMD" = "thin_dump" && {
+ test -z "$THIN_DUMP_CMD" && {
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thin_dump not found in path $PATH" >&5
$as_echo "$as_me: WARNING: thin_dump not found in path $PATH" >&2;}
- THIN_DUMP_CMD=thin_dump
+ THIN_DUMP_CMD=/usr/sbin/thin_dump
THIN_CONFIGURE_WARN=y
}
fi
# Empty means a config way to ignore thin checking
- if test "$THIN_REPAIR_CMD" = "thin_repair"; then
+ if test "$THIN_REPAIR_CMD" = "autodetect"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}thin_repair", so it can be a program name with args.
set dummy ${ac_tool_prefix}thin_repair; ac_word=$2
@@ -7506,7 +7506,7 @@ fi
test -z "$THIN_REPAIR_CMD" && {
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thin_repair not found in path $PATH" >&5
$as_echo "$as_me: WARNING: thin_repair not found in path $PATH" >&2;}
- THIN_REPAIR_CMD=thin_repair
+ THIN_REPAIR_CMD=/usr/sbin/thin_repair
THIN_CONFIGURE_WARN=y
}
fi
10 years, 3 months
master - configure: update recent change
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b424b6398be64a...
Commit: b424b6398be64aec6a5772bb847f78b1941a0fe1
Parent: fd0068a66ee8f8ad03ac0c86b9ab3f6a8a368ac9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Dec 12 14:29:15 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 12 14:29:15 2013 +0100
configure: update recent change
Full path needs to be supplied.
Keep on using 'autodetect' keyword as default argument.
---
configure.in | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/configure.in b/configure.in
index cf297e8..3e0e508 100644
--- a/configure.in
+++ b/configure.in
@@ -413,16 +413,16 @@ AC_ARG_WITH(thin,
THIN=$withval, THIN=internal)
AC_ARG_WITH(thin-check,
AC_HELP_STRING([--with-thin-check=PATH],
- [thin_check tool: [[thin_check]]]),
- THIN_CHECK_CMD=$withval, THIN_CHECK_CMD="thin_check")
+ [thin_check tool: [[autodetect]]]),
+ THIN_CHECK_CMD=$withval, THIN_CHECK_CMD="autodetect")
AC_ARG_WITH(thin-dump,
AC_HELP_STRING([--with-thin-dump=PATH],
- [thin_dump tool: [[thin_dump]]]),
- THIN_DUMP_CMD=$withval, THIN_DUMP_CMD="thin_dump")
+ [thin_dump tool: [[autodetect]]]),
+ THIN_DUMP_CMD=$withval, THIN_DUMP_CMD="autodetect")
AC_ARG_WITH(thin-repair,
AC_HELP_STRING([--with-thin-repair=PATH],
- [thin_repair tool: [[thin_repair]]]),
- THIN_REPAIR_CMD=$withval, THIN_REPAIR_CMD="thin_repair")
+ [thin_repair tool: [[autodetect]]]),
+ THIN_REPAIR_CMD=$withval, THIN_REPAIR_CMD="autodetect")
AC_MSG_RESULT($THIN)
@@ -438,29 +438,29 @@ esac
case "$THIN" in
internal|shared)
# Empty means a config way to ignore thin checking
- if test "$THIN_CHECK_CMD" = "thin_check"; then
- AC_PATH_TOOL(THIN_CHECK_CMD, thin_check, thin_check)
- test "$THIN_CHECK_CMD" = "thin_check" && {
+ if test "$THIN_CHECK_CMD" = "autodetect"; then
+ AC_PATH_TOOL(THIN_CHECK_CMD, thin_check)
+ test -z "$THIN_CHECK_CMD" && {
AC_MSG_WARN([thin_check not found in path $PATH])
- THIN_CHECK_CMD=thin_check
+ THIN_CHECK_CMD=/usr/sbin/thin_check
THIN_CONFIGURE_WARN=y
}
fi
# Empty means a config way to ignore thin checking
- if test "$THIN_DUMP_CMD" = "thin_dump"; then
- AC_PATH_TOOL(THIN_DUMP_CMD, thin_dump, thin_dump)
- test "$THIN_DUMP_CMD" = "thin_dump" && {
+ if test "$THIN_DUMP_CMD" = "autodetect"; then
+ AC_PATH_TOOL(THIN_DUMP_CMD, thin_dump)
+ test -z "$THIN_DUMP_CMD" && {
AC_MSG_WARN(thin_dump not found in path $PATH)
- THIN_DUMP_CMD=thin_dump
+ THIN_DUMP_CMD=/usr/sbin/thin_dump
THIN_CONFIGURE_WARN=y
}
fi
# Empty means a config way to ignore thin checking
- if test "$THIN_REPAIR_CMD" = "thin_repair"; then
+ if test "$THIN_REPAIR_CMD" = "autodetect"; then
AC_PATH_TOOL(THIN_REPAIR_CMD, thin_repair)
test -z "$THIN_REPAIR_CMD" && {
AC_MSG_WARN(thin_repair not found in path $PATH)
- THIN_REPAIR_CMD=thin_repair
+ THIN_REPAIR_CMD=/usr/sbin/thin_repair
THIN_CONFIGURE_WARN=y
}
fi
10 years, 3 months
master - cleanup: remove unused variable
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fd0068a66ee8f8...
Commit: fd0068a66ee8f8ad03ac0c86b9ab3f6a8a368ac9
Parent: aefab64e690cb5fbbd28a07d27a4f510d8aca32b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Dec 12 13:59:39 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 12 13:59:39 2013 +0100
cleanup: remove unused variable
Recent commit made this variable unused
---
lib/device/dev-cache.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index fabdcbb..5d26d41 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -594,7 +594,6 @@ static int _insert(const char *path, const struct stat *info,
int rec, int check_with_udev_db)
{
struct stat tinfo;
- int r = 0;
if (!info) {
if (stat(path, &tinfo) < 0) {
10 years, 3 months
master - autoreconf: latest changes
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=aefab64e690cb5...
Commit: aefab64e690cb5fbbd28a07d27a4f510d8aca32b
Parent: 6c0e44d5a2e82aa160d48e83992e7ca342bc4bdf
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Dec 12 13:45:48 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Dec 12 13:45:48 2013 +0100
autoreconf: latest changes
---
configure | 265 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 230 insertions(+), 35 deletions(-)
diff --git a/configure b/configure
index ff7185d..f48c89b 100755
--- a/configure
+++ b/configure
@@ -1618,10 +1618,10 @@ Optional Packages:
--with-replicators=TYPE replicator support: internal/shared/none
[[TYPE=none]]
--with-thin=TYPE thin provisioning support: internal/shared/none
- [[TYPE=none]]
- --with-thin-check=PATH thin_check tool: [[autodetect]]
- --with-thin-dump=PATH thin_dump tool: [[autodetect]]
- --with-thin-repair=PATH thin_repair tool: [[autodetect]]
+ [[TYPE=internal]]
+ --with-thin-check=PATH thin_check tool: [[thin_check]]
+ --with-thin-dump=PATH thin_dump tool: [[thin_dump]]
+ --with-thin-repair=PATH thin_repair tool: [[thin_repair]]
--with-ocfdir=DIR install OCF files in DIR
[[PREFIX/lib/ocf/resource.d/lvm2]]
--with-default-pid-dir=PID_DIR
@@ -7146,9 +7146,34 @@ $as_echo_n "checking whether to include thin provisioning... " >&6; }
if test "${with_thin+set}" = set; then :
withval=$with_thin; THIN=$withval
else
- THIN=none
+ THIN=internal
fi
+
+# Check whether --with-thin-check was given.
+if test "${with_thin_check+set}" = set; then :
+ withval=$with_thin_check; THIN_CHECK_CMD=$withval
+else
+ THIN_CHECK_CMD="thin_check"
+fi
+
+
+# Check whether --with-thin-dump was given.
+if test "${with_thin_dump+set}" = set; then :
+ withval=$with_thin_dump; THIN_DUMP_CMD=$withval
+else
+ THIN_DUMP_CMD="thin_dump"
+fi
+
+
+# Check whether --with-thin-repair was given.
+if test "${with_thin_repair+set}" = set; then :
+ withval=$with_thin_repair; THIN_REPAIR_CMD=$withval
+else
+ THIN_REPAIR_CMD="thin_repair"
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $THIN" >&5
$as_echo "$THIN" >&6; }
@@ -7160,20 +7185,15 @@ $as_echo "#define THIN_INTERNAL 1" >>confdefs.h
*) as_fn_error $? "--with-thin parameter invalid ($THIN)" "$LINENO" 5 ;;
esac
+# Test if necessary thin tools are available
+# if not - use plain defaults and warn user
case "$THIN" in
internal|shared)
-
-# Check whether --with-thin-check was given.
-if test "${with_thin_check+set}" = set; then :
- withval=$with_thin_check; THIN_CHECK_CMD=$withval
-else
- THIN_CHECK_CMD="autodetect"
-fi
-
# Empty means a config way to ignore thin checking
- if test "$THIN_CHECK_CMD" = "autodetect"; then
- # Extract the first word of "thin_check", so it can be a program name with args.
-set dummy thin_check; ac_word=$2
+ if test "$THIN_CHECK_CMD" = "thin_check"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}thin_check", so it can be a program name with args.
+set dummy ${ac_tool_prefix}thin_check; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_THIN_CHECK_CMD+set}" = set; then :
@@ -7212,20 +7232,75 @@ $as_echo "no" >&6; }
fi
- test -z "$THIN_CHECK_CMD" && as_fn_error $? "thin_check not found in path $PATH" "$LINENO" 5
- fi
+fi
+if test -z "$ac_cv_path_THIN_CHECK_CMD"; then
+ ac_pt_THIN_CHECK_CMD=$THIN_CHECK_CMD
+ # Extract the first word of "thin_check", so it can be a program name with args.
+set dummy thin_check; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_THIN_CHECK_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_THIN_CHECK_CMD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_THIN_CHECK_CMD="$ac_pt_THIN_CHECK_CMD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_THIN_CHECK_CMD="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-thin-dump was given.
-if test "${with_thin_dump+set}" = set; then :
- withval=$with_thin_dump; THIN_DUMP_CMD=$withval
+ ;;
+esac
+fi
+ac_pt_THIN_CHECK_CMD=$ac_cv_path_ac_pt_THIN_CHECK_CMD
+if test -n "$ac_pt_THIN_CHECK_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_THIN_CHECK_CMD" >&5
+$as_echo "$ac_pt_THIN_CHECK_CMD" >&6; }
else
- THIN_DUMP_CMD="autodetect"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_THIN_CHECK_CMD" = x; then
+ THIN_CHECK_CMD="thin_check"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ THIN_CHECK_CMD=$ac_pt_THIN_CHECK_CMD
+ fi
+else
+ THIN_CHECK_CMD="$ac_cv_path_THIN_CHECK_CMD"
fi
+ test "$THIN_CHECK_CMD" = "thin_check" && {
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thin_check not found in path $PATH" >&5
+$as_echo "$as_me: WARNING: thin_check not found in path $PATH" >&2;}
+ THIN_CHECK_CMD=thin_check
+ THIN_CONFIGURE_WARN=y
+ }
+ fi
# Empty means a config way to ignore thin checking
- if test "$THIN_DUMP_CMD" = "autodetect"; then
- # Extract the first word of "thin_dump", so it can be a program name with args.
-set dummy thin_dump; ac_word=$2
+ if test "$THIN_DUMP_CMD" = "thin_dump"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}thin_dump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}thin_dump; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_THIN_DUMP_CMD+set}" = set; then :
@@ -7264,20 +7339,75 @@ $as_echo "no" >&6; }
fi
- test -z "$THIN_DUMP_CMD" && as_fn_error $? "thin_dump not found in path $PATH" "$LINENO" 5
- fi
+fi
+if test -z "$ac_cv_path_THIN_DUMP_CMD"; then
+ ac_pt_THIN_DUMP_CMD=$THIN_DUMP_CMD
+ # Extract the first word of "thin_dump", so it can be a program name with args.
+set dummy thin_dump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_THIN_DUMP_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_THIN_DUMP_CMD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_THIN_DUMP_CMD="$ac_pt_THIN_DUMP_CMD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_THIN_DUMP_CMD="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-thin-repair was given.
-if test "${with_thin_repair+set}" = set; then :
- withval=$with_thin_repair; THIN_REPAIR_CMD=$withval
+ ;;
+esac
+fi
+ac_pt_THIN_DUMP_CMD=$ac_cv_path_ac_pt_THIN_DUMP_CMD
+if test -n "$ac_pt_THIN_DUMP_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_THIN_DUMP_CMD" >&5
+$as_echo "$ac_pt_THIN_DUMP_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_THIN_DUMP_CMD" = x; then
+ THIN_DUMP_CMD="thin_dump"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ THIN_DUMP_CMD=$ac_pt_THIN_DUMP_CMD
+ fi
else
- THIN_REPAIR_CMD="autodetect"
+ THIN_DUMP_CMD="$ac_cv_path_THIN_DUMP_CMD"
fi
+ test "$THIN_DUMP_CMD" = "thin_dump" && {
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thin_dump not found in path $PATH" >&5
+$as_echo "$as_me: WARNING: thin_dump not found in path $PATH" >&2;}
+ THIN_DUMP_CMD=thin_dump
+ THIN_CONFIGURE_WARN=y
+ }
+ fi
# Empty means a config way to ignore thin checking
- if test "$THIN_REPAIR_CMD" = "autodetect"; then
- # Extract the first word of "thin_repair", so it can be a program name with args.
-set dummy thin_repair; ac_word=$2
+ if test "$THIN_REPAIR_CMD" = "thin_repair"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}thin_repair", so it can be a program name with args.
+set dummy ${ac_tool_prefix}thin_repair; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_THIN_REPAIR_CMD+set}" = set; then :
@@ -7316,7 +7446,69 @@ $as_echo "no" >&6; }
fi
- test -z "$THIN_REPAIR_CMD" && as_fn_error $? "thin_repair not found in path $PATH" "$LINENO" 5
+fi
+if test -z "$ac_cv_path_THIN_REPAIR_CMD"; then
+ ac_pt_THIN_REPAIR_CMD=$THIN_REPAIR_CMD
+ # Extract the first word of "thin_repair", so it can be a program name with args.
+set dummy thin_repair; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_THIN_REPAIR_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_THIN_REPAIR_CMD in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_THIN_REPAIR_CMD="$ac_pt_THIN_REPAIR_CMD" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_THIN_REPAIR_CMD="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_THIN_REPAIR_CMD=$ac_cv_path_ac_pt_THIN_REPAIR_CMD
+if test -n "$ac_pt_THIN_REPAIR_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_THIN_REPAIR_CMD" >&5
+$as_echo "$ac_pt_THIN_REPAIR_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_THIN_REPAIR_CMD" = x; then
+ THIN_REPAIR_CMD=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ THIN_REPAIR_CMD=$ac_pt_THIN_REPAIR_CMD
+ fi
+else
+ THIN_REPAIR_CMD="$ac_cv_path_THIN_REPAIR_CMD"
+fi
+
+ test -z "$THIN_REPAIR_CMD" && {
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thin_repair not found in path $PATH" >&5
+$as_echo "$as_me: WARNING: thin_repair not found in path $PATH" >&2;}
+ THIN_REPAIR_CMD=thin_repair
+ THIN_CONFIGURE_WARN=y
+ }
fi
;;
esac
@@ -12574,6 +12766,9 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+test -n "$THIN_CONFIGURE_WARN" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Support for thin provisioning is limited since some thin provisioning tools are missing!" >&5
+$as_echo "$as_me: WARNING: Support for thin provisioning is limited since some thin provisioning tools are missing!" >&2;}
+
if test x$ODIRECT != xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Warning: O_DIRECT disabled: low-memory pvmove may lock up" >&5
$as_echo "$as_me: WARNING: Warning: O_DIRECT disabled: low-memory pvmove may lock up" >&2;}
10 years, 3 months
master - dev-cache: skip double stat() call on each _insert
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6c0e44d5a2e82a...
Commit: 6c0e44d5a2e82aa160d48e83992e7ca342bc4bdf
Parent: 7c5feaed3be5c26f5782e4e891ba99862f1e968f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 25 10:01:37 2011 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 12 13:42:28 2013 +0100
dev-cache: skip double stat() call on each _insert
When the device is inserted in dev_name_confirmed() stat() is
called twice as _insert() has it's own stat() call.
Extend _insert() parameter with struct stat* - which could be used
if it has been just obtained. When NULL is passed code is
doing its own stat() call as before.
---
WHATS_NEW | 1 +
lib/device/dev-cache.c | 49 ++++++++++++++++++++++++++++++-----------------
2 files changed, 32 insertions(+), 18 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 704d0be..78657dd 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Optimize double call of stat() for cached devices.
Enable support for thin provisioning for default configuration.
Improve process_each_lv_in_vg() tag processing.
Reodered and simplified logging code.
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index bbdde92..fabdcbb 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -50,7 +50,8 @@ static struct {
#define _free(x) dm_pool_free(_cache.mem, (x))
#define _strdup(x) dm_pool_strdup(_cache.mem, (x))
-static int _insert(const char *path, int rec, int check_with_udev_db);
+static int _insert(const char *path, const struct stat *info,
+ int rec, int check_with_udev_db);
/* Setup non-zero members of passed zeroed 'struct device' */
static void _dev_init(struct device *dev, int max_error_count)
@@ -442,7 +443,7 @@ static int _insert_dir(const char *dir)
return_0;
_collapse_slashes(path);
- r &= _insert(path, 1, 0);
+ r &= _insert(path, NULL, 1, 0);
dm_free(path);
free(dirent[n]);
@@ -528,14 +529,14 @@ static int _insert_udev_dir(struct udev *udev, const char *dir)
log_very_verbose("udev failed to return a device node for entry %s.",
entry_name);
else
- r &= _insert(node_name, 0, 0);
+ r &= _insert(node_name, NULL, 0, 0);
udev_list_entry_foreach(symlink_entry, udev_device_get_devlinks_list_entry(device)) {
if (!(symlink_name = udev_list_entry_get_name(symlink_entry)))
log_very_verbose("udev failed to return a symlink name for entry %s.",
entry_name);
else
- r &= _insert(symlink_name, 0, 0);
+ r &= _insert(symlink_name, NULL, 0, 0);
}
udev_device_unref(device);
@@ -589,28 +590,33 @@ static void _insert_dirs(struct dm_list *dirs)
#endif /* UDEV_SYNC_SUPPORT */
-static int _insert(const char *path, int rec, int check_with_udev_db)
+static int _insert(const char *path, const struct stat *info,
+ int rec, int check_with_udev_db)
{
- struct stat info;
+ struct stat tinfo;
+ int r = 0;
- if (stat(path, &info) < 0) {
- log_sys_very_verbose("stat", path);
- return 0;
+ if (!info) {
+ if (stat(path, &tinfo) < 0) {
+ log_sys_very_verbose("stat", path);
+ return 0;
+ }
+ info = &tinfo;
}
- if (check_with_udev_db && !_device_in_udev_db(info.st_rdev)) {
+ if (check_with_udev_db && !_device_in_udev_db(info->st_rdev)) {
log_very_verbose("%s: Not in udev db", path);
return 0;
}
- if (S_ISDIR(info.st_mode)) { /* add a directory */
+ if (S_ISDIR(info->st_mode)) { /* add a directory */
/* check it's not a symbolic link */
- if (lstat(path, &info) < 0) {
+ if (lstat(path, &tinfo) < 0) {
log_sys_very_verbose("lstat", path);
return 0;
}
- if (S_ISLNK(info.st_mode)) {
+ if (S_ISLNK(tinfo.st_mode)) {
log_debug_devs("%s: Symbolic link to directory", path);
return 1;
}
@@ -618,12 +624,12 @@ static int _insert(const char *path, int rec, int check_with_udev_db)
if (rec && !_insert_dir(path))
return_0;
} else { /* add a device */
- if (!S_ISBLK(info.st_mode)) {
+ if (!S_ISBLK(info->st_mode)) {
log_debug_devs("%s: Not a block device", path);
return 1;
}
- if (!_insert_dev(path, info.st_rdev))
+ if (!_insert_dev(path, info->st_rdev))
return_0;
}
@@ -881,7 +887,7 @@ const char *dev_name_confirmed(struct device *dev, int quiet)
if (dm_list_size(&dev->aliases) > 1) {
dm_list_del(dev->aliases.n);
if (!r)
- _insert(name, 0, obtain_device_list_from_udev());
+ _insert(name, &buf, 0, obtain_device_list_from_udev());
continue;
}
@@ -903,13 +909,20 @@ struct device *dev_cache_get(const char *name, struct dev_filter *f)
return d;
/* If the entry's wrong, remove it */
- if (d && (stat(name, &buf) || (buf.st_rdev != d->dev))) {
+ if (stat(name, &buf) < 0) {
+ if (d)
+ dm_hash_remove(_cache.names, name);
+ log_sys_very_verbose("stat", name);
+ return NULL;
+ }
+
+ if (d && (buf.st_rdev != d->dev)) {
dm_hash_remove(_cache.names, name);
d = NULL;
}
if (!d) {
- _insert(name, 0, obtain_device_list_from_udev());
+ _insert(name, &buf, 0, obtain_device_list_from_udev());
d = (struct device *) dm_hash_lookup(_cache.names, name);
if (!d) {
_full_scan(0);
10 years, 3 months
master - dmeventd: prevent busy looping on CPU
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7c5feaed3be5c2...
Commit: 7c5feaed3be5c26f5782e4e891ba99862f1e968f
Parent: b87c148499c6a9dd8c6d34d9991350e203d37fe9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Mar 22 17:00:25 2012 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 12 13:40:55 2013 +0100
dmeventd: prevent busy looping on CPU
Use usleep when looping on DM_WAIT_RETRY.
---
WHATS_NEW_DM | 1 +
daemons/dmeventd/dmeventd.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 1e30d2a..effd0cc 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.84 -
====================================
+ Avoid busy looping on CPU when dmeventd reads event DM_WAIT_RETRY.
Ensure global mutex is being hold when working with dmeventd thread.
Drop taking timeout mutex for un/registering dmeventd monitor.
Allow section names in config file data to be quoted strings.
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index baa4fc3..179775a 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -796,8 +796,10 @@ static void *_monitor_thread(void *arg)
thread->current_events = 0;
wait_error = _event_wait(thread, &task);
- if (wait_error == DM_WAIT_RETRY)
+ if (wait_error == DM_WAIT_RETRY) {
+ usleep(100); /* avoid busy loop */
continue;
+ }
if (wait_error == DM_WAIT_FATAL)
break;
10 years, 3 months
master - dmeventd: change locking code
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b87c148499c6a9...
Commit: b87c148499c6a9dd8c6d34d9991350e203d37fe9
Parent: 4fc97980b6e0f31c04d0325cd7ac4e84cdc58cc6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Jun 30 16:07:26 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 12 13:38:55 2013 +0100
dmeventd: change locking code
Ensure global lock is being hold when working with thread->.
---
WHATS_NEW_DM | 1 +
daemons/dmeventd/dmeventd.c | 12 +++++-------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 97c3c43..1e30d2a 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.84 -
====================================
+ Ensure global mutex is being hold when working with dmeventd thread.
Drop taking timeout mutex for un/registering dmeventd monitor.
Allow section names in config file data to be quoted strings.
Close fifos before exiting in dmeventd restart() error path.
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index 47a341e..baa4fc3 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -832,10 +832,8 @@ static void *_monitor_thread(void *arg)
_unlock_mutex();
break;
}
- _unlock_mutex();
if (thread->events & thread->current_events) {
- _lock_mutex();
thread->processing = 1;
_unlock_mutex();
@@ -847,6 +845,7 @@ static void *_monitor_thread(void *arg)
thread->processing = 0;
_unlock_mutex();
} else {
+ _unlock_mutex();
dm_task_destroy(task);
thread->current_task = NULL;
}
@@ -1000,8 +999,6 @@ static int _register_for_event(struct message_data *message_data)
goto out;
}
- _lock_mutex();
-
/* If creation of timeout thread fails (as it may), we fail
here completely. The client is responsible for either
retrying later or trying to register without timeout
@@ -1010,8 +1007,9 @@ static int _register_for_event(struct message_data *message_data)
almost as good as dead already... */
if ((thread_new->events & DM_EVENT_TIMEOUT) &&
(ret = -_register_for_timeout(thread_new)))
- goto outth;
+ goto out;
+ _lock_mutex();
if (!(thread = _lookup_thread_status(message_data))) {
_unlock_mutex();
@@ -1035,8 +1033,6 @@ static int _register_for_event(struct message_data *message_data)
/* Or event # into events bitfield. */
thread->events |= message_data->events_field;
-
- outth:
_unlock_mutex();
out:
@@ -1569,8 +1565,10 @@ static void _cleanup_unused_threads(void)
if (thread->status == DM_THREAD_DONE) {
dm_list_del(l);
+ _unlock_mutex();
join_ret = pthread_join(thread->thread, NULL);
_free_thread_status(thread);
+ _lock_mutex();
}
}
10 years, 3 months
master - dmeventd: drop taking timeout mutex
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4fc97980b6e0f3...
Commit: 4fc97980b6e0f31c04d0325cd7ac4e84cdc58cc6
Parent: 10a13dc03cd4da2df3518f7a94014f167ec13d47
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Jun 30 16:06:39 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 12 13:32:49 2013 +0100
dmeventd: drop taking timeout mutex
Taking _timeout_mutex is not needed when registering and unregistering.
Global mutex is already being hold for this case.
---
WHATS_NEW_DM | 1 +
daemons/dmeventd/dmeventd.c | 9 ++++-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index b737a3e..97c3c43 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.84 -
====================================
+ Drop taking timeout mutex for un/registering dmeventd monitor.
Allow section names in config file data to be quoted strings.
Close fifos before exiting in dmeventd restart() error path.
Move printf format string directly into dm_asprintf args list.
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index f2d6671..47a341e 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -751,10 +751,8 @@ static void _monitor_unregister(void *arg)
return;
}
thread->status = DM_THREAD_DONE;
- pthread_mutex_lock(&_timeout_mutex);
UNLINK_THREAD(thread);
LINK(thread, &_thread_registry_unused);
- pthread_mutex_unlock(&_timeout_mutex);
_unlock_mutex();
}
@@ -1083,17 +1081,18 @@ static int _unregister_for_event(struct message_data *message_data)
thread->events &= ~message_data->events_field;
- if (!(thread->events & DM_EVENT_TIMEOUT))
+ if (!(thread->events & DM_EVENT_TIMEOUT)) {
+ _unlock_mutex();
_unregister_for_timeout(thread);
+ _lock_mutex();
+ }
/*
* In case there's no events to monitor on this device ->
* unlink and terminate its monitoring thread.
*/
if (!thread->events) {
- pthread_mutex_lock(&_timeout_mutex);
UNLINK_THREAD(thread);
LINK(thread, &_thread_registry_unused);
- pthread_mutex_unlock(&_timeout_mutex);
}
_unlock_mutex();
10 years, 3 months
master - thin: enable build of thin provisioning by default
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=10a13dc03cd4da...
Commit: 10a13dc03cd4da2df3518f7a94014f167ec13d47
Parent: 9fcbe3c6f074443248922b61441bb2b37253a59c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Dec 12 13:07:59 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 12 13:31:23 2013 +0100
thin: enable build of thin provisioning by default
Use internal type by default for thin provisioning.
If user is not interested in thin provisiong and doesn't
have thin provisining supporting tools installed,
configure will just print warning at the end of configure
process about limited support.
---
WHATS_NEW | 1 +
configure.in | 65 ++++++++++++++++++++++++++++++++++++---------------------
2 files changed, 42 insertions(+), 24 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 4b469d4..704d0be 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Enable support for thin provisioning for default configuration.
Improve process_each_lv_in_vg() tag processing.
Reodered and simplified logging code.
Fix SYSTEMD_READY assignment for foreign devices in lvmetad udev rules.
diff --git a/configure.in b/configure.in
index 851d3f7..cf297e8 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
###############################################################################
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
-## Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
+## Copyright (C) 2004-2013 Red Hat, Inc. All rights reserved.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
@@ -409,8 +409,21 @@ AC_MSG_CHECKING(whether to include thin provisioning)
AC_ARG_WITH(thin,
AC_HELP_STRING([--with-thin=TYPE],
[thin provisioning support: internal/shared/none
- [[TYPE=none]]]),
- THIN=$withval, THIN=none)
+ [[TYPE=internal]]]),
+ THIN=$withval, THIN=internal)
+AC_ARG_WITH(thin-check,
+ AC_HELP_STRING([--with-thin-check=PATH],
+ [thin_check tool: [[thin_check]]]),
+ THIN_CHECK_CMD=$withval, THIN_CHECK_CMD="thin_check")
+AC_ARG_WITH(thin-dump,
+ AC_HELP_STRING([--with-thin-dump=PATH],
+ [thin_dump tool: [[thin_dump]]]),
+ THIN_DUMP_CMD=$withval, THIN_DUMP_CMD="thin_dump")
+AC_ARG_WITH(thin-repair,
+ AC_HELP_STRING([--with-thin-repair=PATH],
+ [thin_repair tool: [[thin_repair]]]),
+ THIN_REPAIR_CMD=$withval, THIN_REPAIR_CMD="thin_repair")
+
AC_MSG_RESULT($THIN)
case "$THIN" in
@@ -420,34 +433,36 @@ case "$THIN" in
*) AC_MSG_ERROR([--with-thin parameter invalid ($THIN)]) ;;
esac
+# Test if necessary thin tools are available
+# if not - use plain defaults and warn user
case "$THIN" in
internal|shared)
- AC_ARG_WITH(thin-check,
- AC_HELP_STRING([--with-thin-check=PATH],
- [thin_check tool: [[autodetect]]]),
- THIN_CHECK_CMD=$withval, THIN_CHECK_CMD="autodetect")
# Empty means a config way to ignore thin checking
- if test "$THIN_CHECK_CMD" = "autodetect"; then
- AC_PATH_PROG(THIN_CHECK_CMD, thin_check)
- test -z "$THIN_CHECK_CMD" && AC_MSG_ERROR(thin_check not found in path $PATH)
+ if test "$THIN_CHECK_CMD" = "thin_check"; then
+ AC_PATH_TOOL(THIN_CHECK_CMD, thin_check, thin_check)
+ test "$THIN_CHECK_CMD" = "thin_check" && {
+ AC_MSG_WARN([thin_check not found in path $PATH])
+ THIN_CHECK_CMD=thin_check
+ THIN_CONFIGURE_WARN=y
+ }
fi
- AC_ARG_WITH(thin-dump,
- AC_HELP_STRING([--with-thin-dump=PATH],
- [thin_dump tool: [[autodetect]]]),
- THIN_DUMP_CMD=$withval, THIN_DUMP_CMD="autodetect")
# Empty means a config way to ignore thin checking
- if test "$THIN_DUMP_CMD" = "autodetect"; then
- AC_PATH_PROG(THIN_DUMP_CMD, thin_dump)
- test -z "$THIN_DUMP_CMD" && AC_MSG_ERROR(thin_dump not found in path $PATH)
+ if test "$THIN_DUMP_CMD" = "thin_dump"; then
+ AC_PATH_TOOL(THIN_DUMP_CMD, thin_dump, thin_dump)
+ test "$THIN_DUMP_CMD" = "thin_dump" && {
+ AC_MSG_WARN(thin_dump not found in path $PATH)
+ THIN_DUMP_CMD=thin_dump
+ THIN_CONFIGURE_WARN=y
+ }
fi
- AC_ARG_WITH(thin-repair,
- AC_HELP_STRING([--with-thin-repair=PATH],
- [thin_repair tool: [[autodetect]]]),
- THIN_REPAIR_CMD=$withval, THIN_REPAIR_CMD="autodetect")
# Empty means a config way to ignore thin checking
- if test "$THIN_REPAIR_CMD" = "autodetect"; then
- AC_PATH_PROG(THIN_REPAIR_CMD, thin_repair)
- test -z "$THIN_REPAIR_CMD" && AC_MSG_ERROR(thin_repair not found in path $PATH)
+ if test "$THIN_REPAIR_CMD" = "thin_repair"; then
+ AC_PATH_TOOL(THIN_REPAIR_CMD, thin_repair)
+ test -z "$THIN_REPAIR_CMD" && {
+ AC_MSG_WARN(thin_repair not found in path $PATH)
+ THIN_REPAIR_CMD=thin_repair
+ THIN_CONFIGURE_WARN=y
+ }
fi
;;
esac
@@ -1774,6 +1789,8 @@ unit-tests/mm/Makefile
])
AC_OUTPUT
+test -n "$THIN_CONFIGURE_WARN" && AC_MSG_WARN([Support for thin provisioning is limited since some thin provisioning tools are missing!])
+
if test x$ODIRECT != xyes; then
AC_MSG_WARN(Warning: O_DIRECT disabled: low-memory pvmove may lock up)
fi
10 years, 3 months