master - tests: more tolerable makefile
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2a7f2a3a244dd02cacb...
Commit: 2a7f2a3a244dd02cacb947b19f7400b53dd71ca4
Parent: 7d8bd97187b5eb8bbea10d95bc62b4a14c5e4d4e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 15 00:46:54 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jun 15 00:46:54 2018 +0200
tests: more tolerable makefile
---
test/Makefile.in | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index 48ecdd7..39093bf 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -239,7 +239,7 @@ LIB_LVMLOCKD_CONF = \
test-dlm-conf \
test-sanlock-conf
-LIB_LOCAL = paths runner
+LIB_LOCAL = paths runner mke2fs.conf
LIB_NOT = not
LIB_LINK_NOT = invalid fail should
LIB_SHARED = check aux inittest utils get lvm-wrapper
@@ -250,8 +250,8 @@ install: .tests-stamp lib/paths-installed
$(INSTALL_DATA) shell/*.sh $(DATADIR)/shell
$(INSTALL_DATA) unit/*.sh $(DATADIR)/unit
$(INSTALL_DATA) lib/mke2fs.conf $(DATADIR)/lib
- $(INSTALL_PROGRAM) unit/unit-test $(DATADIR)/unit
- $(INSTALL_PROGRAM) dbus/*.py $(DATADIR)/dbus/
+ -$(INSTALL_PROGRAM) unit/unit-test $(DATADIR)/unit
+ -$(INSTALL_PROGRAM) dbus/*.py $(DATADIR)/dbus/
$(INSTALL_DATA) lib/paths-installed $(DATADIR)/lib/paths
cd lib && $(INSTALL_DATA) \
$(LIB_FLAVOURS) \
@@ -340,6 +340,9 @@ lib/version-expected: $(top_srcdir)/VERSION .lib-dir-stamp
lib/dm-version-expected: $(top_srcdir)/VERSION_DM .lib-dir-stamp
cut -f 1 -d ' ' <$< >$@
+lib/mke2fs.conf: $(srcdir)/lib/mke2fs.conf
+ $(LN_S) -f $< $@
+
CMDS = lvm $(shell cat $(top_builddir)/tools/.commands 2>/dev/null)
LIB = $(addprefix lib/, $(LIB_SHARED) $(LIB_LOCAL) $(LIB_NOT) $(LIB_LINK_NOT) $(LIB_FLAVOURS))
4 years, 9 months
master - scripts: clvmd gone
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7d8bd97187b5eb8bbea...
Commit: 7d8bd97187b5eb8bbea10d95bc62b4a14c5e4d4e
Parent: 9d2b9e5bc6a5a887ab4423caabb4ec43031de662
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 15 00:46:24 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jun 15 00:46:24 2018 +0200
scripts: clvmd gone
---
scripts/Makefile.in | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index f0addc3..fc97544 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -69,9 +69,6 @@ endif
ifeq ("@BUILD_LVMPOLLD@", "yes")
$(INSTALL_SCRIPT) lvm2_lvmpolld_init_red_hat $(initdir)/lvm2-lvmpolld
endif
-ifneq ("@CLVMD@", "none")
- $(INSTALL_SCRIPT) clvmd_init_red_hat $(initdir)/clvmd
-endif
ifeq ("@BUILD_CMIRRORD@", "yes")
$(INSTALL_SCRIPT) cmirrord_init_red_hat $(initdir)/cmirrord
endif
@@ -110,11 +107,6 @@ endif
ifeq ("@BUILD_LVMLOCKD@", "yes")
$(INSTALL_DATA) lvm2_lvmlockd_systemd_red_hat.service $(systemd_unit_dir)/lvm2-lvmlockd.service
endif
-ifneq ("@CLVMD@", "none")
- $(INSTALL_DATA) lvm2_clvmd_systemd_red_hat.service $(systemd_unit_dir)/lvm2-clvmd.service
- $(INSTALL_DATA) lvm2_cluster_activation_systemd_red_hat.service $(systemd_unit_dir)/lvm2-cluster-activation.service
- $(INSTALL_SCRIPT) lvm2_cluster_activation_red_hat.sh $(systemd_dir)/lvm2-cluster-activation
-endif
ifeq ("@BUILD_CMIRRORD@", "yes")
$(INSTALL_DATA) lvm2_cmirrord_systemd_red_hat.service $(systemd_unit_dir)/lvm2-cmirrord.service
endif
4 years, 9 months
master - man: stop installing clvmd man page
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9d2b9e5bc6a5a887ab4...
Commit: 9d2b9e5bc6a5a887ab4423caabb4ec43031de662
Parent: 52e7270e23858509fd0da419ecbc4e42e22f04ac
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jun 15 00:46:08 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jun 15 00:46:08 2018 +0200
man: stop installing clvmd man page
---
man/Makefile.in | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/man/Makefile.in b/man/Makefile.in
index 844b0ca..aefda2d 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -29,7 +29,6 @@ DMFILEMAPDMAN = dmfilemapd.8
LVMETADMAN = lvmetad.8
LVMPOLLDMAN = lvmpolld.8
LVMLOCKDMAN = lvmlockd.8 lvmlockctl.8
-CLVMDMAN = clvmd.8
CMIRRORDMAN = cmirrord.8
LVMCACHEMAN = lvmcache.7
LVMTHINMAN = lvmthin.7
@@ -63,7 +62,7 @@ endif
ifeq ($(MAN_ALL),"yes")
MAN8+=$(FSADMMAN) $(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(LVMDBUSDMAN)
MAN8DM+=$(BLKDEACTIVATEMAN) $(DMEVENTDMAN) $(DMFILEMAPDMAN)
- MAN8CLUSTER+=$(CLVMDMAN) $(CMIRRORDMAN)
+ MAN8CLUSTER+=$(CMIRRORDMAN)
else
ifeq ("@FSADM@", "yes")
MAN8+=$(FSADMMAN)
@@ -97,10 +96,6 @@ else
MAN8DM+=$(DMFILEMAPDMAN)
endif
- ifneq ("@CLVMD@", "none")
- MAN8CLUSTER+=$(CLVMDMAN)
- endif
-
ifeq ("@BUILD_CMIRRORD@", "yes")
MAN8CLUSTER+=$(CMIRRORDMAN)
endif
@@ -119,7 +114,7 @@ include $(top_builddir)/make.tmpl
CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8:%.8=%.8_gen) $(MAN8CLUSTER) \
$(MAN8SYSTEMD_GENERATORS) $(MAN8DM) $(TESTMAN)
DISTCLEAN_TARGETS+=$(FSADMMAN) $(BLKDEACTIVATEMAN) $(DMEVENTDMAN) \
- $(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(CLVMDMAN) $(CMIRRORDMAN) \
+ $(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(CMIRRORDMAN) \
$(LVMCACHEMAN) $(LVMTHINMAN) $(LVMDBUSDMAN) $(LVMRAIDMAN) \
$(DMFILEMAPDMAN)
4 years, 9 months
master - man-generator: drop macro redefines
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=52e7270e23858509fd0...
Commit: 52e7270e23858509fd0da419ecbc4e42e22f04ac
Parent: faf3cc8f71a6e727e2124199eef25ff00e954c0f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 14 23:15:28 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 14 23:22:42 2018 +0200
man-generator: drop macro redefines
---
tools/command.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index e1391a1..eefc124 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -51,9 +51,6 @@ do { \
printf(fmt "\n", ##args); \
} while (0)
-#define malloc malloc
-#define strdup strdup
-#define free free
#define dm_snprintf snprintf
static int dm_strncpy(char *dest, const char *src, size_t n)
4 years, 9 months
master - tests: drop some clvmd refs
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=faf3cc8f71a6e727e21...
Commit: faf3cc8f71a6e727e2124199eef25ff00e954c0f
Parent: b2cb8f846ac8061bb3e71d5805edd72e67d277db
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 14 23:14:32 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 14 23:22:42 2018 +0200
tests: drop some clvmd refs
Do not try to link clvmd binary.
Ensure lib is created new and does not refer old binaries.
---
test/Makefile.in | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index ca2e2e1..48ecdd7 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -123,7 +123,6 @@ help:
@echo " LVM_TEST_CACHE_RESTORE_CMD Command for cache_restore [$(LVM_TEST_CACHE_RESTORE_CMD)]."
@echo " LVM_TEST_UNLIMITED Set to get unlimited test log (>32MB)"
@echo " LVM_VALGRIND Enable valgrind testing, execs $$"VALGRIND.
- @echo " LVM_VALGRIND_CLVMD Enable valgrind testing of clvmd (1)."
@echo " LVM_VALGRIND_DMEVENTD Enable valgrind testing of dmeventd (1)."
@echo " LVM_VALGRIND_LVMETAD Enable valgrind testing of lvmetad (1)."
@echo " LVM_STRACE Enable strace logging."
@@ -304,7 +303,6 @@ lib/paths-common: $(srcdir)/Makefile.in .lib-dir-stamp Makefile
echo 'LVMETAD_PIDFILE="@LVMETAD_PIDFILE@"' >> $@-t
echo 'LVMPOLLD_PIDFILE="@LVMPOLLD_PIDFILE@"' >> $@-t
echo 'DMEVENTD_PIDFILE="@DMEVENTD_PIDFILE@"' >> $@-t
- echo 'CLVMD_PIDFILE="@CLVMD_PIDFILE@"' >> $@-t
echo 'LVM_TEST_THIN_CHECK_CMD=$${LVM_TEST_THIN_CHECK_CMD-@THIN_CHECK_CMD@}' >> $@-t
echo 'LVM_TEST_THIN_DUMP_CMD=$${LVM_TEST_THIN_DUMP_CMD-@THIN_DUMP_CMD@}' >> $@-t
echo 'LVM_TEST_THIN_REPAIR_CMD=$${LVM_TEST_THIN_REPAIR_CMD-@THIN_REPAIR_CMD@}' >> $@-t
@@ -314,7 +312,7 @@ lib/paths-common: $(srcdir)/Makefile.in .lib-dir-stamp Makefile
echo 'LVM_TEST_CACHE_REPAIR_CMD=$${LVM_TEST_CACHE_REPAIR_CMD-@CACHE_REPAIR_CMD@}' >> $@-t
echo 'LVM_TEST_CACHE_RESTORE_CMD=$${LVM_TEST_CACHE_RESTORE_CMD-@CACHE_RESTORE_CMD@}' >> $@-t
echo 'export DM_UDEV_SYNCHRONISATION THIN RAID CACHE\' >> $@-t
- echo ' LVMETAD_PIDFILE LVMPOLLD_PIDFILE DMEVENTD_PIDFILE CLVMD_PIDFILE\' >> $@-t
+ echo ' LVMETAD_PIDFILE LVMPOLLD_PIDFILE DMEVENTD_PIDFILE \' >> $@-t
echo ' LVM_TEST_THIN_CHECK_CMD LVM_TEST_THIN_DUMP_CMD LVM_TEST_THIN_REPAIR_CMD LVM_TEST_THIN_RESTORE_CMD\' >> $@-t
echo ' LVM_TEST_CACHE_CHECK_CMD LVM_TEST_CACHE_DUMP_CMD LVM_TEST_CACHE_REPAIR_CMD LVM_TEST_CACHE_RESTORE_CMD' >> $@-t
mv $@-t $@
@@ -358,12 +356,13 @@ LIB = $(addprefix lib/, $(LIB_SHARED) $(LIB_LOCAL) $(LIB_NOT) $(LIB_LINK_NOT) $(
.lib-dir-stamp:
$(MKDIR_P) lib unit
+ $(RM) lib/clvmd
for i in $(CMDS); do $(LN_S) -f lvm-wrapper lib/$$i; done
- for i in daemons/clvmd/clvmd daemons/dmeventd/dmeventd \
- tools/dmsetup daemons/lvmetad/lvmetad \
+ for i in daemons/dmeventd/dmeventd \
+ libdm/dm-tools/dmsetup daemons/lvmetad/lvmetad \
daemons/lvmpolld/lvmpolld ; do \
$(LN_S) -f $(abs_top_builddir)/$$i lib/; done
- $(LN_S) -f $(abs_top_builddir)/tools/dmsetup lib/dmstats
+ $(LN_S) -f $(abs_top_builddir)/libdm/dm-tools/dmsetup lib/dmstats
$(LN_S) -f $(abs_top_srcdir)/conf/lvmdbusd.profile lib/
$(LN_S) -f $(abs_top_srcdir)/conf/thin-performance.profile lib/
$(LN_S) -f $(abs_top_srcdir)/scripts/fsadm.sh lib/fsadm
4 years, 9 months
master - build: cmirrord with internal dm lib
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b2cb8f846ac8061bb3e...
Commit: b2cb8f846ac8061bb3e71d5805edd72e67d277db
Parent: b1729dbcddb7243f556b286f958cd4a97f821d65
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 14 23:14:04 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 14 23:14:04 2018 +0200
build: cmirrord with internal dm lib
---
daemons/cmirrord/Makefile.in | 2 +-
daemons/cmirrord/functions.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/daemons/cmirrord/Makefile.in b/daemons/cmirrord/Makefile.in
index b6bab2d..a78dafe 100644
--- a/daemons/cmirrord/Makefile.in
+++ b/daemons/cmirrord/Makefile.in
@@ -30,7 +30,7 @@ LDFLAGS += $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS)
cmirrord: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \
- $(LVMLIBS) $(LMLIBS) $(LIBS)
+ $(LVMLIBS) $(LMLIBS) $(INTERNAL_LIBS) $(LIBS)
install: $(TARGETS)
$(INSTALL_PROGRAM) -D cmirrord $(usrsbindir)/cmirrord
diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c
index 61bcf16..f10a8d5 100644
--- a/daemons/cmirrord/functions.c
+++ b/daemons/cmirrord/functions.c
@@ -11,6 +11,7 @@
*/
#include "logging.h"
#include "functions.h"
+#include "base/memory/zalloc.h"
#include <sys/sysmacros.h>
#include <dirent.h>
4 years, 9 months
master - tests: bigger lv
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b1729dbcddb7243f556...
Commit: b1729dbcddb7243f556b286f958cd4a97f821d65
Parent: f4abbafde7ac1918ecb54c23ec90d2d9dcdc9c02
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 14 21:52:22 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 14 22:02:01 2018 +0200
tests: bigger lv
Although throttling slows down things considerable, it still could
reach the end before next test so use bigger LV.
---
test/shell/pvmove-abort.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/shell/pvmove-abort.sh b/test/shell/pvmove-abort.sh
index 49847c0..1445799 100644
--- a/test/shell/pvmove-abort.sh
+++ b/test/shell/pvmove-abort.sh
@@ -34,8 +34,8 @@ for backgroundarg in "-b" "" ;
do
# Create multisegment LV
-lvcreate -an -Zn -l30 -n $lv1 $vg "$dev1"
-lvcreate -an -Zn -l40 -n $lv2 $vg "$dev2"
+lvcreate -an -Zn -l40 -n $lv1 $vg "$dev1"
+lvcreate -an -Zn -l50 -n $lv2 $vg "$dev2"
cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3")
cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3")
4 years, 9 months
master - debug: missing trace
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f4abbafde7ac1918ecb...
Commit: f4abbafde7ac1918ecb54c23ec90d2d9dcdc9c02
Parent: b58160a1913fdd61c378479f6362bd904e7de942
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jun 13 15:56:58 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 14 22:02:01 2018 +0200
debug: missing trace
---
tools/toollib.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index 7caab45..f64bd58 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -1963,6 +1963,7 @@ static int _process_vgnameid_list(struct cmd_context *cmd, uint32_t read_flags,
log_very_verbose("Processing VG %s %s", vg_name, uuid);
if (!lockd_vg(cmd, vg_name, NULL, 0, &lockd_state)) {
+ stack;
ret_max = ECMD_FAILED;
report_log_ret_code(ret_max);
continue;
4 years, 9 months
master - systemd: add conficting sockets
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b58160a1913fdd61c37...
Commit: b58160a1913fdd61c378479f6362bd904e7de942
Parent: a35098b1102eb7f387e90bd16da4cf3ed833ca57
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jun 12 16:27:42 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 14 22:02:01 2018 +0200
systemd: add conficting sockets
Since we are using "DefaultDependencies=no" we do not get automatic STOP
job on socket connection - so automatically refuse connection on
shutdown by adding this Conflict definition to socket Unit.
---
scripts/lvm2_lvmetad_systemd_red_hat.socket.in | 1 +
scripts/lvm2_lvmpolld_systemd_red_hat.socket.in | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/scripts/lvm2_lvmetad_systemd_red_hat.socket.in b/scripts/lvm2_lvmetad_systemd_red_hat.socket.in
index 9575f98..2663c72 100644
--- a/scripts/lvm2_lvmetad_systemd_red_hat.socket.in
+++ b/scripts/lvm2_lvmetad_systemd_red_hat.socket.in
@@ -2,6 +2,7 @@
Description=LVM2 metadata daemon socket
Documentation=man:lvmetad(8)
DefaultDependencies=no
+Conflicts=shutdown.target
[Socket]
ListenStream=@DEFAULT_RUN_DIR(a)/lvmetad.socket
diff --git a/scripts/lvm2_lvmpolld_systemd_red_hat.socket.in b/scripts/lvm2_lvmpolld_systemd_red_hat.socket.in
index ca9f123..0537d7f 100644
--- a/scripts/lvm2_lvmpolld_systemd_red_hat.socket.in
+++ b/scripts/lvm2_lvmpolld_systemd_red_hat.socket.in
@@ -2,6 +2,7 @@
Description=LVM2 poll daemon socket
Documentation=man:lvmpolld(8)
DefaultDependencies=no
+Conflicts=shutdown.target
[Socket]
ListenStream=@DEFAULT_RUN_DIR(a)/lvmpolld.socket
4 years, 9 months
master - vgchange: start polling with activation
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a35098b1102eb7f387e...
Commit: a35098b1102eb7f387e90bd16da4cf3ed833ca57
Parent: 218c57410c32bfa7bf7044cc6d94fd9253d6b547
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 14 21:05:41 2018 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 14 22:02:01 2018 +0200
vgchange: start polling with activation
Shuffle code for better readability as set of conditions was
hard to follow.
Make it obvious the refresh & activate path is handling
monitoring and polling on its own.
So the only --monitor and --poll option needs explicit care.
Option --monitor without option --poll will now as a result
of this patch NOT start polling.
So command: vgchange --monitor n is no longer a polling starter.
---
tools/vgchange.c | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index c513470..c444c30 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -662,26 +662,21 @@ static int _vgchange_single(struct cmd_context *cmd, const char *vg_name,
activate = (activation_change_t) arg_uint_value(cmd, activate_ARG, 0);
if (!vgchange_activate(cmd, vg, activate))
return_ECMD_FAILED;
- }
-
- if (arg_is_set(cmd, refresh_ARG)) {
+ } else if (arg_is_set(cmd, refresh_ARG)) {
/* refreshes the visible LVs (which starts polling) */
if (!_vgchange_refresh(cmd, vg))
return_ECMD_FAILED;
- }
-
- if (!arg_is_set(cmd, activate_ARG) &&
- !arg_is_set(cmd, refresh_ARG) &&
- arg_is_set(cmd, monitor_ARG)) {
+ } else {
/* -ay* will have already done monitoring changes */
- if (!_vgchange_monitoring(cmd, vg))
+ if (arg_is_set(cmd, monitor_ARG) &&
+ !_vgchange_monitoring(cmd, vg))
return_ECMD_FAILED;
- }
- if (!arg_is_set(cmd, refresh_ARG) &&
- arg_is_set(cmd, poll_ARG) &&
- !vgchange_background_polling(cmd, vg))
- return_ECMD_FAILED;
+ /* When explicitelly specified --poll */
+ if (arg_is_set(cmd, poll_ARG) &&
+ !vgchange_background_polling(cmd, vg))
+ return_ECMD_FAILED;
+ }
return ret;
}
4 years, 9 months