mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +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:
parent
962a40b981
commit
a20de8af20
@ -152,6 +152,16 @@ static int _wait_for_single_lv(struct cmd_context *cmd, const char *name, const
|
|||||||
return 0;
|
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)) {
|
if (!_check_lv_status(cmd, vg, lv, name, parms, &finished)) {
|
||||||
unlock_and_release_vg(cmd, vg, vg->name);
|
unlock_and_release_vg(cmd, vg, vg->name);
|
||||||
return_0;
|
return_0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user