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

pvmove: activation changes

Do not use precommitted LV for suspend of pvmoving LVs.
This commit is contained in:
Zdenek Kabelac 2017-11-15 14:26:10 +01:00
parent a25f9b2106
commit b978f505ff
2 changed files with 5 additions and 28 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.177 -
====================================
Avoid using precommitted metadata for suspending pvmove tree.
Ehnance pvmove locking.
Deactivate activated LVs on error path when pvmove activation fails.
Add "io" to log/debug_classes for logging low-level I/O.

View File

@ -2214,10 +2214,6 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
/* FIXME Consider aborting here */
stack;
critical_section_inc(cmd, "suspending");
if (pvmove_lv)
critical_section_inc(cmd, "suspending pvmove LV");
if (!laopts->origin_only &&
(lv_is_origin(lv_pre) || lv_is_cow(lv_pre)))
lockfs = 1;
@ -2229,30 +2225,10 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
if (laopts->origin_only && lv_is_thin_volume(lv) && lv_is_thin_volume(lv_pre))
lockfs = 1;
/*
* Suspending an LV directly above a PVMOVE LV also
* suspends other LVs using that same PVMOVE LV.
* FIXME Remove this and delay the 'clear node' until
* after the code knows whether there's a different
* inactive table to load or not instead so lv_suspend
* can be called separately for each LV safely.
*/
if ((lv_pre->vg->status & PRECOMMITTED) &&
lv_is_locked(lv_pre) && find_pvmove_lv_in_lv(lv_pre)) {
if (!_lv_suspend_lv(lv_pre, laopts, lockfs, flush_required)) {
critical_section_dec(cmd, "failed precommitted suspend");
if (pvmove_lv)
critical_section_dec(cmd, "failed precommitted suspend (pvmove)");
goto_out;
}
} else {
/* Normal suspend */
if (!_lv_suspend_lv(lv, laopts, lockfs, flush_required)) {
critical_section_dec(cmd, "failed suspend");
if (pvmove_lv)
critical_section_dec(cmd, "failed suspend (pvmove)");
goto_out;
}
critical_section_inc(cmd, "suspending");
if (!_lv_suspend_lv(lv, laopts, lockfs, flush_required)) {
critical_section_dec(cmd, "failed suspend");
goto_out;
}
r = 1;