From a84d0d0c7b843168516a940a8bc4debafc5f980c Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 21 Sep 2014 01:10:53 +0200 Subject: [PATCH] snapshot: use lv_update_and_reload --- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 18 ++---------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 7f37f2435..39282c230 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.112 - ===================================== + Use lv_update_and_reload() for snapshot reload. Don't print message in adjusted_mirror_region_size() in activation. Improve lv_update_and_reload() to find out proper lock holding LV. Improve search of LV in lv_ondisk(). diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 14000b841..81cc997f6 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -7124,22 +7124,8 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, } /* store vg on disk(s) */ - if (!vg_write(vg)) - return_NULL; - - if (!suspend_lv(cmd, org)) { - log_error("Failed to suspend origin %s", org->name); - vg_revert(vg); - return NULL; - } - - if (!vg_commit(vg)) - return_NULL; - - if (!resume_lv(cmd, org)) { - log_error("Problem reactivating origin %s", org->name); - return NULL; - } + if (!lv_update_and_reload(org)) + return_0; } /* FIXME out of sequence */ backup(vg);