main - pvscan: filter does not need to be checked for symlink names
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bd05318ba2fc588be63...
Commit: bd05318ba2fc588be6339f5dc61f09195996b0e9
Parent: 07cd341bd87a7559f33862a5a7480687b30e5f9c
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Feb 15 10:08:25 2023 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Feb 15 10:19:57 2023 -0600
pvscan: filter does not need to be checked for symlink names
With the recent use of DEVLINKS, there is no longer any real
point in checking the filter for symlink names. Removing
this check should not change behavior with or without symlinks
in the filter.
---
lib/filters/filter-regex.c | 45 ---------------------------------------------
lib/filters/filter.h | 2 --
lib/label/label.c | 5 +----
tools/pvscan.c | 3 +--
4 files changed, 2 insertions(+), 53 deletions(-)
diff --git a/lib/filters/filter-regex.c b/lib/filters/filter-regex.c
index ecc32914b..5f348674d 100644
--- a/lib/filters/filter-regex.c
+++ b/lib/filters/filter-regex.c
@@ -253,48 +253,3 @@ struct dev_filter *regex_filter_create(const struct dm_config_value *patterns, i
dm_pool_destroy(mem);
return NULL;
}
-
-static int _filter_contains_symlink(struct cmd_context *cmd, int filter_cfg)
-{
- const struct dm_config_node *cn;
- const struct dm_config_value *cv;
- const char *fname;
-
- if ((cn = find_config_tree_array(cmd, filter_cfg, NULL))) {
- for (cv = cn->v; cv; cv = cv->next) {
- if (cv->type != DM_CFG_STRING)
- continue;
- if (!cv->v.str)
- continue;
-
- fname = cv->v.str;
-
- if (fname[0] != 'a')
- continue;
-
- if (strstr(fname, "/dev/disk/"))
- return 1;
- if (strstr(fname, "/dev/mapper/"))
- return 1;
-
- /* In case /dev/disk/by was omitted */
- if (strstr(fname, "lvm-pv-uuid"))
- return 1;
- if (strstr(fname, "dm-uuid"))
- return 1;
- if (strstr(fname, "wwn-"))
- return 1;
- if (strstr(fname, "pci-"))
- return 1;
- }
- }
-
- return 0;
-}
-
-int regex_filter_contains_symlink(struct cmd_context *cmd)
-{
- return _filter_contains_symlink(cmd, devices_filter_CFG) ||
- _filter_contains_symlink(cmd, devices_global_filter_CFG);
-}
-
diff --git a/lib/filters/filter.h b/lib/filters/filter.h
index 0678e5e11..4cdfa2c9b 100644
--- a/lib/filters/filter.h
+++ b/lib/filters/filter.h
@@ -64,6 +64,4 @@ struct dev_filter *usable_filter_create(struct cmd_context *cmd, struct dev_type
#define DEV_FILTERED_DEVICES_LIST 0x00001000
#define DEV_FILTERED_IS_LV 0x00002000
-int regex_filter_contains_symlink(struct cmd_context *cmd);
-
#endif /* _LVM_FILTER_H */
diff --git a/lib/label/label.c b/lib/label/label.c
index 42d7b6709..c122a4ebb 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -1109,10 +1109,7 @@ int label_scan_vg_online(struct cmd_context *cmd, const char *vgname,
* filter. We get devs from the pvs_online files, so we inherit the
* regex filtering from pvscan and don't have to do it ourself.
*/
- if (!cmd->enable_devices_file &&
- !cmd->enable_devices_list &&
- regex_filter_contains_symlink(cmd))
- cmd->filter_regex_skip = 1;
+ cmd->filter_regex_skip = 1;
cmd->filter_nodata_only = 1;
diff --git a/tools/pvscan.c b/tools/pvscan.c
index 8f60b2522..b834dfd4c 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -1502,8 +1502,7 @@ static int _pvscan_cache_args(struct cmd_context *cmd, int argc, char **argv,
*/
if ((dm_list_size(&pvscan_devs) == 1) &&
!cmd->enable_devices_file &&
- !cmd->enable_devices_list &&
- regex_filter_contains_symlink(cmd)) {
+ !cmd->enable_devices_list) {
char *env_str;
struct dm_list *env_aliases;
devl = dm_list_item(dm_list_first(&pvscan_devs), struct device_list);
3 months, 2 weeks
main - configure: update
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=07cd341bd87a7559f33...
Commit: 07cd341bd87a7559f33862a5a7480687b30e5f9c
Parent: 1e55e5c60a1b6067d7a46f881d78b2ab7d1431eb
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 10 22:54:33 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 14:30:47 2023 +0100
configure: update
---
configure | 86 +++++++++++++++++++++++++++++----------------------------------
1 file changed, 39 insertions(+), 47 deletions(-)
diff --git a/configure b/configure
index 7b160639f..3e09aa265 100755
--- a/configure
+++ b/configure
@@ -674,7 +674,6 @@ SILENT_RULES
USE_TRACKING
UDEV_HAS_BUILTIN_BLKID
UDEV_RULE_EXEC_DETECTION
-UDEV_SYSTEMD_BACKGROUND_JOBS
UDEV_SYNC
UDEV_RULES
UDEV_PC
@@ -773,6 +772,7 @@ CLDNOWHOLEARCHIVE
CLDFLAGS
CACHE
BUILD_DMFILEMAPD
+BUILD_LOCKDIDM
BUILD_LOCKDDLM_CONTROL
BUILD_LOCKDDLM
BUILD_LOCKDSANLOCK
@@ -9623,8 +9623,8 @@ fi
if test -z "$THIN_CHECK_CMD"
then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thin_check not found in path $PATH" >&5
-printf "%s\n" "$as_me: WARNING: thin_check not found in path $PATH" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thin_check not found in path $PATH_SBIN" >&5
+printf "%s\n" "$as_me: WARNING: thin_check not found in path $PATH_SBIN" >&2;}
THIN_CHECK_CMD="/usr/sbin/thin_check"
THIN_CONFIGURE_WARN="y"
@@ -9772,8 +9772,8 @@ fi
if test -z "$THIN_DUMP_CMD"
then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_dump not found in path $PATH\"" >&5
-printf "%s\n" "$as_me: WARNING: \"thin_dump not found in path $PATH\"" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_dump not found in path $PATH_SBIN\"" >&5
+printf "%s\n" "$as_me: WARNING: \"thin_dump not found in path $PATH_SBIN\"" >&2;}
THIN_DUMP_CMD="/usr/sbin/thin_dump"
THIN_CONFIGURE_WARN="y"
@@ -9895,8 +9895,8 @@ fi
if test -z "$THIN_REPAIR_CMD"
then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_repair not found in path $PATH\"" >&5
-printf "%s\n" "$as_me: WARNING: \"thin_repair not found in path $PATH\"" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_repair not found in path $PATH_SBIN\"" >&5
+printf "%s\n" "$as_me: WARNING: \"thin_repair not found in path $PATH_SBIN\"" >&2;}
THIN_REPAIR_CMD="/usr/sbin/thin_repair"
THIN_CONFIGURE_WARN="y"
@@ -10018,8 +10018,8 @@ fi
if test -z "$THIN_RESTORE_CMD"
then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_restore not found in path $PATH\"" >&5
-printf "%s\n" "$as_me: WARNING: \"thin_restore not found in path $PATH\"" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"thin_restore not found in path $PATH_SBIN\"" >&5
+printf "%s\n" "$as_me: WARNING: \"thin_restore not found in path $PATH_SBIN\"" >&2;}
THIN_RESTORE_CMD="/usr/sbin/thin_restore"
THIN_CONFIGURE_WARN="y"
@@ -10252,8 +10252,8 @@ fi
if test -z "$CACHE_CHECK_CMD"
then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache_check not found in path $PATH" >&5
-printf "%s\n" "$as_me: WARNING: cache_check not found in path $PATH" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache_check not found in path $PATH_SBIN" >&5
+printf "%s\n" "$as_me: WARNING: cache_check not found in path $PATH_SBIN" >&2;}
CACHE_CHECK_CMD="/usr/sbin/cache_check"
CACHE_CONFIGURE_WARN="y"
@@ -10419,8 +10419,8 @@ fi
if test -z "$CACHE_DUMP_CMD"
then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_dump not found in path $PATH\"" >&5
-printf "%s\n" "$as_me: WARNING: \"cache_dump not found in path $PATH\"" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_dump not found in path $PATH_SBIN\"" >&5
+printf "%s\n" "$as_me: WARNING: \"cache_dump not found in path $PATH_SBIN\"" >&2;}
CACHE_DUMP_CMD="/usr/sbin/cache_dump"
CACHE_CONFIGURE_WARN="y"
@@ -10542,8 +10542,8 @@ fi
if test -z "$CACHE_REPAIR_CMD"
then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_repair not found in path $PATH\"" >&5
-printf "%s\n" "$as_me: WARNING: \"cache_repair not found in path $PATH\"" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_repair not found in path $PATH_SBIN\"" >&5
+printf "%s\n" "$as_me: WARNING: \"cache_repair not found in path $PATH_SBIN\"" >&2;}
CACHE_REPAIR_CMD="/usr/sbin/cache_repair"
CACHE_CONFIGURE_WARN="y"
@@ -10665,8 +10665,8 @@ fi
if test -z "$CACHE_RESTORE_CMD"
then :
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_restore not found in path $PATH\"" >&5
-printf "%s\n" "$as_me: WARNING: \"cache_restore not found in path $PATH\"" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"cache_restore not found in path $PATH_SBIN\"" >&5
+printf "%s\n" "$as_me: WARNING: \"cache_restore not found in path $PATH_SBIN\"" >&2;}
CACHE_RESTORE_CMD="/usr/sbin/cache_restore"
CACHE_CONFIGURE_WARN="y"
@@ -12051,15 +12051,13 @@ printf %s "checking whether to build lvmlockdsanlock... " >&6; }
# Check whether --enable-lvmlockd-sanlock was given.
if test ${enable_lvmlockd_sanlock+y}
then :
- enableval=$enable_lvmlockd_sanlock; LOCKDSANLOCK=$enableval
+ enableval=$enable_lvmlockd_sanlock; BUILD_LOCKDSANLOCK=$enableval
else $as_nop
- LOCKDSANLOCK="no"
+ BUILD_LOCKDSANLOCK="no"
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCKDSANLOCK" >&5
-printf "%s\n" "$LOCKDSANLOCK" >&6; }
-
-BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_LOCKDSANLOCK" >&5
+printf "%s\n" "$BUILD_LOCKDSANLOCK" >&6; }
if test "$BUILD_LOCKDSANLOCK" = "yes"
then :
@@ -12133,7 +12131,7 @@ else
LOCKD_SANLOCK_LIBS=$pkg_cv_LOCKD_SANLOCK_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
- HAVE_LOCKD_SANLOCK=yes
+ HAVE_LOCKD_SANLOCK="yes"
fi
printf "%s\n" "#define LOCKDSANLOCK_SUPPORT 1" >>confdefs.h
@@ -12148,15 +12146,13 @@ printf %s "checking whether to build lvmlockddlm... " >&6; }
# Check whether --enable-lvmlockd-dlm was given.
if test ${enable_lvmlockd_dlm+y}
then :
- enableval=$enable_lvmlockd_dlm; LOCKDDLM=$enableval
+ enableval=$enable_lvmlockd_dlm; BUILD_LOCKDDLM=$enableval
else $as_nop
- LOCKDDLM="no"
+ BUILD_LOCKDDLM="no"
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCKDDLM" >&5
-printf "%s\n" "$LOCKDDLM" >&6; }
-
-BUILD_LOCKDDLM=$LOCKDDLM
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_LOCKDDLM" >&5
+printf "%s\n" "$BUILD_LOCKDDLM" >&6; }
if test "$BUILD_LOCKDDLM" = "yes"
then :
@@ -12230,7 +12226,7 @@ else
LOCKD_DLM_LIBS=$pkg_cv_LOCKD_DLM_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
- HAVE_LOCKD_DLM=yes
+ HAVE_LOCKD_DLM="yes"
fi
printf "%s\n" "#define LOCKDDLM_SUPPORT 1" >>confdefs.h
@@ -12245,15 +12241,13 @@ printf %s "checking whether to build lvmlockddlmcontrol... " >&6; }
# Check whether --enable-lvmlockd-dlmcontrol was given.
if test ${enable_lvmlockd_dlmcontrol+y}
then :
- enableval=$enable_lvmlockd_dlmcontrol; LOCKDDLM_CONTROL=$enableval
+ enableval=$enable_lvmlockd_dlmcontrol; BUILD_LOCKDDLM_CONTROL=$enableval
else $as_nop
- LOCKDDLM_CONTROL="no"
+ BUILD_LOCKDDLM_CONTROL="no"
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCKDDLM_CONTROL" >&5
-printf "%s\n" "$LOCKDDLM_CONTROL" >&6; }
-
-BUILD_LOCKDDLM_CONTROL=$LOCKDDLM_CONTROL
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_LOCKDDLM_CONTROL" >&5
+printf "%s\n" "$BUILD_LOCKDDLM_CONTROL" >&6; }
if test "$BUILD_LOCKDDLM_CONTROL" = "yes"
then :
@@ -12342,15 +12336,13 @@ printf %s "checking whether to build lvmlockdidm... " >&6; }
# Check whether --enable-lvmlockd-idm was given.
if test ${enable_lvmlockd_idm+y}
then :
- enableval=$enable_lvmlockd_idm; LOCKDIDM=$enableval
+ enableval=$enable_lvmlockd_idm; BUILD_LOCKDIDM=$enableval
else $as_nop
- LOCKDIDM="no"
+ BUILD_LOCKDIDM="no"
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCKDIDM" >&5
-printf "%s\n" "$LOCKDIDM" >&6; }
-
-BUILD_LOCKDIDM=$LOCKDIDM
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_LOCKDIDM" >&5
+printf "%s\n" "$BUILD_LOCKDIDM" >&6; }
if test "$BUILD_LOCKDIDM" = "yes"
then :
@@ -12672,9 +12664,9 @@ if test -n "$PKG_CONFIG" && \
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- SYSTEMD_MIN_VERSION=234 APP_MACHINEID_SUPPORT=maybe
+ SYSTEMD_MIN_VERSION=234 APP_MACHINEID_SUPPORT="maybe"
else
- APP_MACHINEID_SUPPORT=no
+ APP_MACHINEID_SUPPORT="no"
fi
ac_fn_c_check_header_compile "$LINENO" "systemd/sd-id128.h" "ac_cv_header_systemd_sd_id128_h" "$ac_includes_default"
if test "x$ac_cv_header_systemd_sd_id128_h" = xyes
@@ -12684,7 +12676,7 @@ then :
APP_MACHINEID_SUPPORT="yes"
fi
else $as_nop
- APP_MACHINEID_SUPPORT=no
+ APP_MACHINEID_SUPPORT="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to support systemd appmachineid" >&5
@@ -14885,7 +14877,7 @@ then :
printf "%s\n" "#define READLINE_SUPPORT 1" >>confdefs.h
- READLINE=yes
+ READLINE="yes"
LIBS=$lvm_saved_libs
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_line_buffer in -lreadline" >&5
printf %s "checking for rl_line_buffer in -lreadline... " >&6; }
3 months, 3 weeks
main - configure.ac: more cleanup
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1e55e5c60a1b6067d7a...
Commit: 1e55e5c60a1b6067d7a46f881d78b2ab7d1431eb
Parent: f46610e9b0a75ce9610c146a317cfc6dfe1ac6f0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 13 00:07:01 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 14:30:47 2023 +0100
configure.ac: more cleanup
Some variable simplification,
correct messages with PATH_SBIN.
---
configure.ac | 52 ++++++++++++++++++++++------------------------------
1 file changed, 22 insertions(+), 30 deletions(-)
diff --git a/configure.ac b/configure.ac
index 079bbd07f..e8dc7a92c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
###############################################################################
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
-## Copyright (C) 2004-2022 Red Hat, Inc. All rights reserved.
+## Copyright (C) 2004-2023 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
@@ -403,7 +403,7 @@ AS_CASE(["$THIN"],
AS_IF([test "$THIN_CHECK_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_CHECK_CMD, thin_check, [], [$PATH_SBIN])
AS_IF([test -z "$THIN_CHECK_CMD"], [
- AC_MSG_WARN([thin_check not found in path $PATH])
+ AC_MSG_WARN([thin_check not found in path $PATH_SBIN])
THIN_CHECK_CMD="/usr/sbin/thin_check"
THIN_CONFIGURE_WARN="y"
])
@@ -427,7 +427,7 @@ AS_CASE(["$THIN"],
AS_IF([test "$THIN_DUMP_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_DUMP_CMD, thin_dump, [], [$PATH_SBIN])
AS_IF([test -z "$THIN_DUMP_CMD"], [
- AC_MSG_WARN(["thin_dump not found in path $PATH"])
+ AC_MSG_WARN(["thin_dump not found in path $PATH_SBIN"])
THIN_DUMP_CMD="/usr/sbin/thin_dump"
THIN_CONFIGURE_WARN="y"
])
@@ -436,7 +436,7 @@ AS_CASE(["$THIN"],
AS_IF([test "$THIN_REPAIR_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_REPAIR_CMD, thin_repair, [], [$PATH_SBIN])
AS_IF([test -z "$THIN_REPAIR_CMD"], [
- AC_MSG_WARN(["thin_repair not found in path $PATH"])
+ AC_MSG_WARN(["thin_repair not found in path $PATH_SBIN"])
THIN_REPAIR_CMD="/usr/sbin/thin_repair"
THIN_CONFIGURE_WARN="y"
])
@@ -445,7 +445,7 @@ AS_CASE(["$THIN"],
AS_IF([test "$THIN_RESTORE_CMD" = "autodetect"], [
AC_PATH_TOOL(THIN_RESTORE_CMD, thin_restore, [], [$PATH_SBIN])
AS_IF([test -z "$THIN_RESTORE_CMD"], [
- AC_MSG_WARN(["thin_restore not found in path $PATH"])
+ AC_MSG_WARN(["thin_restore not found in path $PATH_SBIN"])
THIN_RESTORE_CMD="/usr/sbin/thin_restore"
THIN_CONFIGURE_WARN="y"
])
@@ -515,7 +515,7 @@ AS_CASE(["$CACHE"],
AS_IF([test "$CACHE_CHECK_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_CHECK_CMD, cache_check, [], [$PATH_SBIN])
AS_IF([test -z "$CACHE_CHECK_CMD"], [
- AC_MSG_WARN([cache_check not found in path $PATH])
+ AC_MSG_WARN([cache_check not found in path $PATH_SBIN])
CACHE_CHECK_CMD="/usr/sbin/cache_check"
CACHE_CONFIGURE_WARN="y"
])
@@ -550,7 +550,7 @@ AS_CASE(["$CACHE"],
AS_IF([test "$CACHE_DUMP_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_DUMP_CMD, cache_dump, [], [$PATH_SBIN])
AS_IF([test -z "$CACHE_DUMP_CMD"], [
- AC_MSG_WARN(["cache_dump not found in path $PATH"])
+ AC_MSG_WARN(["cache_dump not found in path $PATH_SBIN"])
CACHE_DUMP_CMD="/usr/sbin/cache_dump"
CACHE_CONFIGURE_WARN="y"
])
@@ -559,7 +559,7 @@ AS_CASE(["$CACHE"],
AS_IF([test "$CACHE_REPAIR_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_REPAIR_CMD, cache_repair, [], [$PATH_SBIN])
AS_IF([test -z "$CACHE_REPAIR_CMD"], [
- AC_MSG_WARN(["cache_repair not found in path $PATH"])
+ AC_MSG_WARN(["cache_repair not found in path $PATH_SBIN"])
CACHE_REPAIR_CMD="/usr/sbin/cache_repair"
CACHE_CONFIGURE_WARN="y"
])
@@ -568,7 +568,7 @@ AS_CASE(["$CACHE"],
AS_IF([test "$CACHE_RESTORE_CMD" = "autodetect"], [
AC_PATH_TOOL(CACHE_RESTORE_CMD, cache_restore, [], [$PATH_SBIN])
AS_IF([test -z "$CACHE_RESTORE_CMD"], [
- AC_MSG_WARN(["cache_restore not found in path $PATH"])
+ AC_MSG_WARN(["cache_restore not found in path $PATH_SBIN"])
CACHE_RESTORE_CMD="/usr/sbin/cache_restore"
CACHE_CONFIGURE_WARN="y"
])
@@ -908,14 +908,12 @@ AC_MSG_CHECKING([whether to build lvmlockdsanlock])
AC_ARG_ENABLE(lvmlockd-sanlock,
AS_HELP_STRING([--enable-lvmlockd-sanlock],
[enable the LVM lock daemon using sanlock]),
- LOCKDSANLOCK=$enableval, LOCKDSANLOCK="no")
-AC_MSG_RESULT([$LOCKDSANLOCK])
-
-BUILD_LOCKDSANLOCK=$LOCKDSANLOCK
+ BUILD_LOCKDSANLOCK=$enableval, BUILD_LOCKDSANLOCK="no")
+AC_MSG_RESULT([$BUILD_LOCKDSANLOCK])
dnl -- Look for sanlock libraries
AS_IF([test "$BUILD_LOCKDSANLOCK" = "yes"], [
- PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client >= 3.3.0, [HAVE_LOCKD_SANLOCK=yes], $bailout)
+ PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client >= 3.3.0, [HAVE_LOCKD_SANLOCK="yes"], $bailout)
AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
BUILD_LVMLOCKD=yes
])
@@ -926,14 +924,12 @@ AC_MSG_CHECKING([whether to build lvmlockddlm])
AC_ARG_ENABLE(lvmlockd-dlm,
AS_HELP_STRING([--enable-lvmlockd-dlm],
[enable the LVM lock daemon using dlm]),
- LOCKDDLM=$enableval, LOCKDDLM="no")
-AC_MSG_RESULT([$LOCKDDLM])
-
-BUILD_LOCKDDLM=$LOCKDDLM
+ BUILD_LOCKDDLM=$enableval, BUILD_LOCKDDLM="no")
+AC_MSG_RESULT([$BUILD_LOCKDDLM])
dnl -- Look for dlm libraries
AS_IF([test "$BUILD_LOCKDDLM" = "yes"], [
- PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM=yes], $bailout)
+ PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM="yes"], $bailout)
AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
BUILD_LVMLOCKD=yes
])
@@ -944,10 +940,8 @@ AC_MSG_CHECKING([whether to build lvmlockddlmcontrol])
AC_ARG_ENABLE(lvmlockd-dlmcontrol,
AS_HELP_STRING([--enable-lvmlockd-dlmcontrol],
[enable lvmlockd remote refresh using libdlmcontrol]),
- LOCKDDLM_CONTROL=$enableval, LOCKDDLM_CONTROL="no")
-AC_MSG_RESULT([$LOCKDDLM_CONTROL])
-
-BUILD_LOCKDDLM_CONTROL=$LOCKDDLM_CONTROL
+ BUILD_LOCKDDLM_CONTROL=$enableval, BUILD_LOCKDDLM_CONTROL="no")
+AC_MSG_RESULT([$BUILD_LOCKDDLM_CONTROL])
dnl -- Look for libdlmcontrol libraries
AS_IF([test "$BUILD_LOCKDDLM_CONTROL" = "yes"], [
@@ -962,10 +956,8 @@ AC_MSG_CHECKING([whether to build lvmlockdidm])
AC_ARG_ENABLE(lvmlockd-idm,
AS_HELP_STRING([--enable-lvmlockd-idm],
[enable the LVM lock daemon using idm]),
- LOCKDIDM=$enableval, LOCKDIDM="no")
-AC_MSG_RESULT([$LOCKDIDM])
-
-BUILD_LOCKDIDM=$LOCKDIDM
+ BUILD_LOCKDIDM=$enableval, BUILD_LOCKDIDM="no")
+AC_MSG_RESULT([$BUILD_LOCKDIDM])
dnl -- Look for Seagate IDM libraries
AS_IF([test "$BUILD_LOCKDIDM" = "yes"], [
@@ -1080,10 +1072,10 @@ AS_IF([test "$SYSTEMD_JOURNAL_SUPPORT" = "yes"],
################################################################################
dnl -- Build appmachineid when header file sd-id128.h is present
-PKG_CHECK_EXISTS(systemd >= 234, [SYSTEMD_MIN_VERSION=234 APP_MACHINEID_SUPPORT=maybe], [APP_MACHINEID_SUPPORT=no])
+PKG_CHECK_EXISTS(systemd >= 234, [SYSTEMD_MIN_VERSION=234 APP_MACHINEID_SUPPORT="maybe"], [APP_MACHINEID_SUPPORT="no"])
AC_CHECK_HEADER([systemd/sd-id128.h],
[AS_IF([test "$APP_MACHINEID_SUPPORT" != "no"], [APP_MACHINEID_SUPPORT="yes"])],
- [APP_MACHINEID_SUPPORT=no])
+ [APP_MACHINEID_SUPPORT="no"])
AC_MSG_CHECKING([whether to support systemd appmachineid])
AC_ARG_ENABLE(app-machineid,
AS_HELP_STRING([--disable-app-machineid],
@@ -1508,7 +1500,7 @@ Note: (n)curses also seems to work as a substitute for termcap. This was
AC_DEFINE([READLINE_SUPPORT], 1,
[Define to 1 to include the LVM readline shell.])
dnl -- Try only with -lreadline and check for different symbol
- READLINE=yes
+ READLINE="yes"
LIBS=$lvm_saved_libs
AC_CHECK_LIB([readline], [rl_line_buffer],
[ READLINE_LIBS="-lreadline" ], [
3 months, 3 weeks
main - configure.ac: remove UDEV_SYSTEMD_BACKGROUND_JOBS
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f46610e9b0a75ce9610...
Commit: f46610e9b0a75ce9610c146a317cfc6dfe1ac6f0
Parent: b6efa827ee764d0297ee1631f3a96507a18f9488
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 11 15:42:31 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 14:30:47 2023 +0100
configure.ac: remove UDEV_SYSTEMD_BACKGROUND_JOBS
Missed to go with 042fbd43d25f4cc69ceec1aea4d0658bec54b6e3.
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ae7b9d8c5..079bbd07f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1941,7 +1941,6 @@ AC_SUBST(CACHE_RESTORE_CMD)
AC_SUBST(UDEV_PC)
AC_SUBST(UDEV_RULES)
AC_SUBST(UDEV_SYNC)
-AC_SUBST(UDEV_SYSTEMD_BACKGROUND_JOBS)
AC_SUBST(UDEV_RULE_EXEC_DETECTION)
AC_SUBST(UDEV_HAS_BUILTIN_BLKID)
AC_SUBST(USE_TRACKING)
3 months, 3 weeks
main - configure.ac: fix support for LOCKDIDM
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b6efa827ee764d0297e...
Commit: b6efa827ee764d0297ee1631f3a96507a18f9488
Parent: 7f2864b5b1b1174846c3131f6c3962bd3806da72
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 10 22:53:43 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 14:30:47 2023 +0100
configure.ac: fix support for LOCKDIDM
Commit 7a8b7b4adde5c31c79aee8b0792cd8369652afc6 introducing lockidm
support missed to use AC_SUBST() for a variable and provide it only
in prebuilt configure, so with the next autoreconf this variable
was lost and IDM support was no longer compiled.
Fixes: https://github.com/lvmteam/lvm2/issues/98
Reported-by: Tom Prohofsky
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac
index 1c4d5fd1f..ae7b9d8c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1826,6 +1826,7 @@ AC_SUBST(BUILD_LVMLOCKD)
AC_SUBST(BUILD_LOCKDSANLOCK)
AC_SUBST(BUILD_LOCKDDLM)
AC_SUBST(BUILD_LOCKDDLM_CONTROL)
+AC_SUBST(BUILD_LOCKDIDM)
AC_SUBST(BUILD_DMFILEMAPD)
AC_SUBST(CACHE)
AC_SUBST(CFLAGS)
3 months, 3 weeks
main - acinclude.m4: add local copy of PKG_CHECK_VAR
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7f2864b5b1b1174846c...
Commit: 7f2864b5b1b1174846c3131f6c3962bd3806da72
Parent: 8630a19d1e37e2f7e532c75ec26b7d1b071f1f8d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 11 00:26:08 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 14:30:46 2023 +0100
acinclude.m4: add local copy of PKG_CHECK_VAR
Just in case an old distro tries to autoreconf and doesn't
come with newer pkg_ macros.
---
acinclude.m4 | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/acinclude.m4 b/acinclude.m4
index 4ac611dd2..47fdd59c3 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -62,6 +62,24 @@ AC_DEFUN([AC_TRY_LDFLAGS],
fi
])
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
+
+
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_gcc_builtin.html
# ===========================================================================
3 months, 3 weeks
main - tests: use PWD for dbus testing
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8630a19d1e37e2f7e53...
Commit: 8630a19d1e37e2f7e532c75ec26b7d1b071f1f8d
Parent: 7ea62f640cbe41b981c56ee334d6924da3bb3c0a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 13 14:29:38 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 14:30:43 2023 +0100
tests: use PWD for dbus testing
lvmdbusd ATM is leaking too many log files.
At least try to keep them removed with test failure.
---
test/api/dbustest.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/api/dbustest.sh b/test/api/dbustest.sh
index f4c9c9c2a..d69c0e89c 100644
--- a/test/api/dbustest.sh
+++ b/test/api/dbustest.sh
@@ -31,6 +31,8 @@ aux extend_filter_LVMTEST
# output
aux prepare_profiles "lvmdbusd"
+# Keep generating test file within test dir
+export TMPDIR=$PWD
aux prepare_lvmdbusd
# Example for testing individual test:
3 months, 3 weeks
main - tests: skip test without mkfs.ext4
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7ea62f640cbe41b981c...
Commit: 7ea62f640cbe41b981c56ee334d6924da3bb3c0a
Parent: 2241982f9636592268fc75b17d1a00e0ee786a65
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 10 23:07:52 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 13:41:59 2023 +0100
tests: skip test without mkfs.ext4
---
test/shell/fsadm-crypt-fsresize.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/shell/fsadm-crypt-fsresize.sh b/test/shell/fsadm-crypt-fsresize.sh
index 56cd5c508..4ad2ab980 100644
--- a/test/shell/fsadm-crypt-fsresize.sh
+++ b/test/shell/fsadm-crypt-fsresize.sh
@@ -23,6 +23,8 @@ export LVM_TEST_PREFER_BRD=0
aux prepare_vg 1 300
# Tests require a libblkid version that shows FSLASTBLOCK
+which mkfs.ext4 || skip
+
lvcreate -n $lv1 -L 100 $vg
mkfs.ext4 "$DM_DEV_DIR/$vg/$lv1"
blkid -p "$DM_DEV_DIR/$vg/$lv1" | grep FSLASTBLOCK || skip
3 months, 3 weeks
main - cov: drop unneeded header
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2241982f9636592268f...
Commit: 2241982f9636592268fc75b17d1a00e0ee786a65
Parent: 02fdb2480e8ec1d7b3da14e620295d0f93bff52a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 13 09:34:20 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 13:41:59 2023 +0100
cov: drop unneeded header
---
tools/vgchange.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 7d1bbd70a..09ade96a6 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -16,7 +16,6 @@
#include "tools.h"
#include "lib/device/device_id.h"
#include "lib/label/hints.h"
-#include "lib/filters/filter.h"
struct vgchange_params {
int lock_start_count;
3 months, 3 weeks
main - man: update lvmcache cache setting
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=02fdb2480e8ec1d7b3d...
Commit: 02fdb2480e8ec1d7b3da14e620295d0f93bff52a
Parent: 31076942f10bdd2ef449697c1a315372b71ee8c1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 11 20:32:45 2023 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 13:41:59 2023 +0100
man: update lvmcache cache setting
Correct setting of migration_threshold and add clarify
how the user can restore default cache settings for cache policies.
Also document mq aliasing with smq for newer kernels.
---
man/lvmcache.7_main | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/man/lvmcache.7_main b/man/lvmcache.7_main
index 965e1cbdd..3beb8dea4 100644
--- a/man/lvmcache.7_main
+++ b/man/lvmcache.7_main
@@ -501,7 +501,18 @@ Checking migration threshold (in sectors) of running cached LV:
.br
.B lvs -o+kernel_cache_settings VG/LV
.
-.SS dm-cache migration threshold
+.SS dm-cache cache settings
+.
+To set dm-cache cache setting use:
+.P
+--cachesettings 'option1=N option2=N ...'
+.P
+To unset/drop cache setting and restore its default kernel value
+use special keyword 'default' as option parameter:
+.P
+--cachesettings 'option1=default option2=default ...'
+.
+.SS dm-cache migration threshold cache setting
.
Migrating data between the origin and cache LV uses bandwidth.
The user can set a throttle to prevent more than a certain amount of
@@ -510,17 +521,22 @@ account of normal io traffic going to the devices.
.P
User can set migration threshold via cache policy settings as
"migration_threshold=<#sectors>" to set the maximum number
-of sectors being migrated, the default being 2048 sectors (1 MiB).
+of sectors being migrated, the default being 2048 sectors (1 MiB)
+or 8 cache chunks whichever of those two values is larger.
.P
Command to set migration threshold to 2 MiB (4096 sectors):
.P
-.B lvcreate --cachepolicy 'migration_threshold=4096' VG/LV
+.B lvcreate --cachesettings 'migration_threshold=4096' VG/LV
.P
Command to display the migration threshold:
.P
.B lvs -o+kernel_cache_settings,cache_settings VG/LV
.br
.B lvs -o+chunksize VG/LV
+.P
+Command to restore/revert to default value:
+.P
+.B lvchange --cachesettings 'migration_threshold=default' VG/LV
.
.SS dm-cache cache policy
.
@@ -533,6 +549,11 @@ back (flush) all cached writes to the origin LV.
The older "mq" policy has a number of tunable parameters. The defaults are
chosen to be suitable for the majority of systems, but in special
circumstances, changing the settings can improve performance.
+Newer kernels however alias this policy with "smq" policy. Cache settings
+used to configure "mq" policy [random_threshold, sequential_threshold,
+discard_promote_adjustment, read_promote_adjustment,
+write_promote_adjustment] are thus silently ignored also performance
+matches "smq".
.P
With the --cachepolicy and --cachesettings options, the cache policy and
settings can be set when caching is started, or changed on an existing
@@ -582,7 +603,6 @@ cache_settings {
smq {
.RS
migration_threshold=8192
-random_threshold=4096
.RE
}
.RE
3 months, 3 weeks