mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Don't attempt to restart pvmoves when deactivating LVs in vgchange.
Restart lvconverts in vgchange by sharing lv_spawn_background_polling.
This commit is contained in:
parent
724de2791e
commit
93bbc31c83
@ -1,5 +1,7 @@
|
||||
Version 2.02.54 -
|
||||
=====================================
|
||||
Don't attempt to restart pvmoves when deactivating LVs in vgchange.
|
||||
Restart lvconverts in vgchange by sharing lv_spawn_background_polling.
|
||||
Generalise polldaemon code by changing mirror-specific variable names.
|
||||
Don't attempt to deactivate an LV if any of its snapshots are in use.
|
||||
Return fail if lv_deactivate fails to remove device from kernel.
|
||||
|
@ -105,7 +105,6 @@ static int lvchange_availability(struct cmd_context *cmd,
|
||||
struct logical_volume *lv)
|
||||
{
|
||||
int activate;
|
||||
const char *pvname;
|
||||
|
||||
activate = arg_uint_value(cmd, available_ARG, 0);
|
||||
|
||||
@ -136,18 +135,7 @@ static int lvchange_availability(struct cmd_context *cmd,
|
||||
return_0;
|
||||
}
|
||||
|
||||
if ((lv->status & LOCKED) &&
|
||||
(pvname = get_pvmove_pvname_from_lv(lv))) {
|
||||
log_verbose("Spawning background pvmove process for %s",
|
||||
pvname);
|
||||
pvmove_poll(cmd, pvname, 1);
|
||||
}
|
||||
|
||||
if (lv->status & CONVERTING) {
|
||||
log_verbose("Spawning background lvconvert process for %s",
|
||||
lv->name);
|
||||
lvconvert_poll(cmd, lv, 1);
|
||||
}
|
||||
lv_spawn_background_polling(cmd, lv);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -1247,3 +1247,22 @@ int vg_refresh_visible(struct cmd_context *cmd, struct volume_group *vg)
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void lv_spawn_background_polling(struct cmd_context *cmd,
|
||||
struct logical_volume *lv)
|
||||
{
|
||||
const char *pvname;
|
||||
|
||||
if ((lv->status & LOCKED) &&
|
||||
(pvname = get_pvmove_pvname_from_lv(lv))) {
|
||||
log_verbose("Spawning background pvmove process for %s",
|
||||
pvname);
|
||||
pvmove_poll(cmd, pvname, 1);
|
||||
}
|
||||
|
||||
if (lv->status & CONVERTING) {
|
||||
log_verbose("Spawning background lvconvert process for %s",
|
||||
lv->name);
|
||||
lvconvert_poll(cmd, lv, 1);
|
||||
}
|
||||
}
|
||||
|
@ -105,4 +105,7 @@ int fill_vg_create_params(struct cmd_context *cmd,
|
||||
|
||||
int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv);
|
||||
int vg_refresh_visible(struct cmd_context *cmd, struct volume_group *vg);
|
||||
void lv_spawn_background_polling(struct cmd_context *cmd,
|
||||
struct logical_volume *lv);
|
||||
|
||||
#endif
|
||||
|
@ -91,13 +91,9 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd,
|
||||
} else if (!activate_lv(cmd, lv))
|
||||
continue;
|
||||
|
||||
if ((lv->status & PVMOVE) &&
|
||||
(pvname = get_pvmove_pvname_from_lv_mirr(lv))) {
|
||||
log_verbose("Spawning background process for %s %s",
|
||||
lv->name, pvname);
|
||||
pvmove_poll(cmd, pvname, 1);
|
||||
continue;
|
||||
}
|
||||
if (activate != CHANGE_AN && activate != CHANGE_ALN &&
|
||||
(lv->status & (PVMOVE|CONVERTING)))
|
||||
lv_spawn_background_polling(cmd, lv);
|
||||
|
||||
count++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user