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

pvmove.c: relocate id components extraction

we don't want to fail properly set pvmove after metadata
update. failure to copy id components could end with dangling
mirror moving PV segments but no monitoring from lvmpolld or
classical polldaemon.
This commit is contained in:
Ondrej Kozina 2015-05-15 17:06:14 +02:00
parent 67657f1ff9
commit 04c77bd886

View File

@ -686,13 +686,13 @@ static int _set_up_pvmove(struct cmd_context *cmd, const char *pv_name,
/* init_pvmove(1); */ /* init_pvmove(1); */
/* vg->status |= PVMOVE; */ /* vg->status |= PVMOVE; */
if (!_copy_id_components(cmd, lv_mirr, vg_name, lv_mirr_name, lvid))
goto out;
if (flags & PVMOVE_FIRST_TIME) if (flags & PVMOVE_FIRST_TIME)
if (!_update_metadata(cmd, vg, lv_mirr, lvs_changed, exclusive)) if (!_update_metadata(cmd, vg, lv_mirr, lvs_changed, exclusive))
goto_out; goto_out;
if (!_copy_id_components(cmd, lv_mirr, vg_name, lv_mirr_name, lvid))
goto out;
/* LVs are all in status LOCKED */ /* LVs are all in status LOCKED */
r = ECMD_PROCESSED; r = ECMD_PROCESSED;
out: out: