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

snapshot: validate merge has started

Before starting polling process, validate the merge has actually started
so there is not pointless invoke of lvmpolld.

This also fixes reported message from command, so user has
correct info whether merging has already started or
if it's delayed for next activation.
This commit is contained in:
Zdenek Kabelac 2016-12-22 19:46:02 +01:00
parent 95e3dd5fb1
commit 2aee4769b4
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.169 -
=====================================
Detect if snapshot merge really started before polling for progress.
Checking LV for merging origin requires also it has merged snapshot.
Extend validation of metadata processing.
Enable usage of cached volumes as snapshot origin LV.

View File

@ -2497,8 +2497,13 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd,
if (!lv_update_and_reload(origin))
return_0;
lp->need_polling = 1;
lp->lv_to_poll = origin;
if (lv_has_target_type(origin->vg->vgmem, origin, NULL,
TARGET_NAME_SNAPSHOT_MERGE)) {
lp->need_polling = 1;
lp->lv_to_poll = origin;
} else
/* Race during table reload prevented merging */
merge_on_activate = 1;
}
if (merge_on_activate)