master - snapshot: check it's still snapshot
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=435c82f8f6312758e1d198d4cb0a2158b7a51bac Commit: 435c82f8f6312758e1d198d4cb0a2158b7a51bac Parent: a20de8af208725ff2054209aa7ff7f41cc770db6 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Jun 16 13:38:35 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Jun 17 13:36:07 2014 +0200
snapshot: check it's still snapshot
While polling for snapshot, detect first the snapshot still exits. It's valid to have multiple polling threads watching for the same thing and just 1 can 'win' the finish part. All others should nicely 'fail'.
--- tools/lvconvert.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
tools/lvconvert.c +2 -1
@@ -801,7 +801,8 @@ static progress_t _poll_merge_progress(struct cmd_context *cmd, {percent_t percent =PERCENT_0 ; -if (!lv_snapshot_percent (lv, &percent)) { +if (!lv_is_merging_origin (lv) || + !lv_snapshot_percent (lv, &percent)) {log_error ("%s: Failed query for merging percentage. Aborting merge." , lv->name);return PROGRESS_CHECK_FAILED ; }else if (percent ==PERCENT_INVALID ) {