public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/activate/activate.c
Date: Fri, 21 May 2010 14:34:00 -0000	[thread overview]
Message-ID: <20100521143403.30825.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2010-05-21 14:34:02

Modified files:
	.              : WHATS_NEW 
	lib/activate   : activate.c 

Log message:
	Replicator: activate checks for missing vgs
	
	Activation needs to have all remote VGs locked to pass for replicator.
	So if activated LV is replicator-dev LV - read all remote VGs.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1588&r2=1.1589
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.168&r2=1.169

--- LVM2/WHATS_NEW	2010/05/21 14:29:49	1.1588
+++ LVM2/WHATS_NEW	2010/05/21 14:34:01	1.1589
@@ -1,6 +1,7 @@
 Version 2.02.67 -
 ===============================
-  Check for missing VGs before taking lock_lv_vol (for Replicator).
+  Activation code read and releases also remote VGs (Replicator).
+  Check for missing VGs before taking lock_vol (Replicator).
   Update process_each_lv_in_vg() to use cmd_vg structure.
   Update _process_one_vg() to work with cmd_vg structure.
   Add functions for read and release VGs list.
--- LVM2/lib/activate/activate.c	2010/03/26 22:15:43	1.168
+++ LVM2/lib/activate/activate.c	2010/05/21 14:34:02	1.169
@@ -865,6 +865,9 @@
 		goto out;
 	}
 
+	if (!lv_read_replicator_vgs(lv))
+		goto_out;
+
 	lv_calculate_readahead(lv, NULL);
 
 	/* If VG was precommitted, preload devices for the LV */
@@ -894,8 +897,10 @@
 out:
 	if (lv_pre)
 		vg_release(lv_pre->vg);
-	if (lv)
+	if (lv) {
+		lv_release_replicator_vgs(lv);
 		vg_release(lv->vg);
+	}
 
 	return r;
 }
@@ -1025,6 +1030,9 @@
 			goto_out;
 	}
 
+	if (!lv_read_replicator_vgs(lv))
+		goto_out;
+
 	lv_calculate_readahead(lv, NULL);
 
 	if (!monitor_dev_for_events(cmd, lv, 0))
@@ -1038,8 +1046,10 @@
 	if (!lv_info(cmd, lv, &info, 1, 0) || info.exists)
 		r = 0;
 out:
-	if (lv)
+	if (lv) {
+		lv_release_replicator_vgs(lv);
 		vg_release(lv->vg);
+	}
 
 	return r;
 }
@@ -1118,6 +1128,9 @@
 		goto out;
 	}
 
+	if (!lv_read_replicator_vgs(lv))
+		goto_out;
+
 	lv_calculate_readahead(lv, NULL);
 
 	if (exclusive)
@@ -1133,8 +1146,10 @@
 		stack;
 
 out:
-	if (lv)
+	if (lv) {
+		lv_release_replicator_vgs(lv);
 		vg_release(lv->vg);
+	}
 
 	return r;
 }


             reply	other threads:[~2010-05-21 14:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21 14:34 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-25 22:16 zkabelac
2011-02-18 14:26 zkabelac
2010-08-16 23:29 agk
2010-07-12 11:37 prajnoha
2010-01-27 13:24 mbroz
2009-12-03 19:23 mbroz
2009-12-01 19:10 mbroz
2009-10-30 13:07 agk
2009-09-29 18:50 agk
2009-09-29 15:17 mbroz
2007-08-01 20:29 jbrassow
2006-12-20 16:19 agk
2005-12-22 16:13 agk
2004-05-11 17:09 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100521143403.30825.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).