All of lore.kernel.org
 help / color / mirror / Atom feed
* master - pvmove.c: relocate id components extraction
@ 2015-05-15 18:37 okozina
  0 siblings, 0 replies; only message in thread
From: okozina @ 2015-05-15 18:37 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=04c77bd8863b071b9e376c76708af6cede596a45
Commit:        04c77bd8863b071b9e376c76708af6cede596a45
Parent:        67657f1ff938b2afd17ab0ce6476a561725a6781
Author:        Ondrej Kozina <okozina@redhat.com>
AuthorDate:    Fri May 15 17:06:14 2015 +0200
Committer:     Ondrej Kozina <okozina@redhat.com>
CommitterDate: Fri May 15 20:33:21 2015 +0200

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.
---
 tools/pvmove.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/pvmove.c b/tools/pvmove.c
index 202c87c..94a5ffc 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -686,13 +686,13 @@ static int _set_up_pvmove(struct cmd_context *cmd, const char *pv_name,
 	/* init_pvmove(1); */
 	/* vg->status |= PVMOVE; */
 
+	if (!_copy_id_components(cmd, lv_mirr, vg_name, lv_mirr_name, lvid))
+		goto out;
+
 	if (flags & PVMOVE_FIRST_TIME)
 		if (!_update_metadata(cmd, vg, lv_mirr, lvs_changed, exclusive))
 			goto_out;
 
-	if (!_copy_id_components(cmd, lv_mirr, vg_name, lv_mirr_name, lvid))
-		goto out;
-
 	/* LVs are all in status LOCKED */
 	r = ECMD_PROCESSED;
 out:



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-15 18:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 18:37 master - pvmove.c: relocate id components extraction okozina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.