1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Don't really change monitoring status when in test mode.

This commit is contained in:
Alasdair Kergon 2010-08-16 23:29:09 +00:00
parent ed878c8a9a
commit 85a80e0505
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.73 -
================================
Don't really change monitoring status when in test mode.
Fix some exit statuses when starting/stopping monitoring fails.
Enable snapshot monitoring by default when dmeventd is enabled.
Move cloned libdevmapper-event client code from segments into lib/activate.

View File

@ -940,7 +940,12 @@ int monitor_dev_for_events(struct cmd_context *cmd,
if (!monitor_fn)
continue;
log_verbose("%sonitoring %s/%s", monitor ? "M" : "Not m", lv->vg->name, lv->name);
log_verbose("%sonitoring %s/%s%s", monitor ? "M" : "Not m", lv->vg->name, lv->name,
test_mode() ? " [Test mode: skipping this]" : "");
/* FIXME Test mode should really continue a bit further. */
if (test_mode())
continue;
/* FIXME specify events */
if (!monitor_fn(seg, 0)) {
@ -964,7 +969,8 @@ int monitor_dev_for_events(struct cmd_context *cmd,
sleep(1);
}
r = (monitored && monitor) || (!monitored && !monitor);
if (r)
r = (monitored && monitor) || (!monitored && !monitor);
}
return r;