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

poll_daemon: Cleanly exit polling if the LV is no longer active

If the we are polling an LV due to some sort of conversion and it
becomes inactive, a rather worrisome message is produced, e.g.:
"  ABORTING: Mirror percentage check failed."

We can cleanly exit if we do a simple check to see if the LV is
active before performing the check.  This eliminates the scary
message.
This commit is contained in:
Jonathan Brassow 2014-06-16 18:56:32 -05:00
parent 962a40b981
commit a20de8af20

View File

@ -152,6 +152,16 @@ static int _wait_for_single_lv(struct cmd_context *cmd, const char *name, const
return 0;
}
/*
* If the LV is not active locally, the kernel cannot be
* queried for its status. We must exit in this case.
*/
if (!lv_is_active_locally(lv)) {
log_print_unless_silent("%s: Interrupted: No longer active.", name);
unlock_and_release_vg(cmd, vg, vg->name);
return 1;
}
if (!_check_lv_status(cmd, vg, lv, name, parms, &finished)) {
unlock_and_release_vg(cmd, vg, vg->name);
return_0;