1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00

Fix pvmove test mode to not fail and do not poll.

Test mode should not fail nor try to poll non-existent devices.
This commit is contained in:
Milan Broz 2009-12-03 19:22:24 +00:00
parent b917086464
commit 29f011314d
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.57 -
====================================
Fix pvmove test mode to not fail and do not poll.
Fix error message if VG already exist in vgcreate.
Fix tools to use log_error when stopped by user.
Fix lvcreate --readahead.

View File

@ -312,8 +312,10 @@ static int _update_metadata(struct cmd_context *cmd, struct volume_group *vg,
/* FIXME: Add option to use a log */
if (first_time) {
if (!_activate_lv(cmd, lv_mirr, exclusive)) {
if (test_mode())
if (test_mode()) {
r = 1;
goto out;
}
/*
* Nothing changed yet, try to revert pvmove.
@ -570,6 +572,9 @@ static struct poll_functions _pvmove_fns = {
int pvmove_poll(struct cmd_context *cmd, const char *pv_name,
unsigned background)
{
if (test_mode())
return ECMD_PROCESSED;
return poll_daemon(cmd, pv_name, NULL, background, PVMOVE, &_pvmove_fns,
"Moved");
}