public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/activate activate.c
@ 2006-04-28 14:06 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2006-04-28 14:06 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2006-04-28 14:06:07

Modified files:
	lib/activate   : activate.c 

Log message:
	_register_dev_for_events to return error on failure

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.106&r2=1.107


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2012-01-25  9:00 zkabelac
  0 siblings, 0 replies; 16+ messages in thread
From: zkabelac @ 2012-01-25  9:00 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-01-25 09:00:18

Modified files:
	lib/activate   : activate.c 

Log message:
	lv_info using -real layer only for origin_only LV
	
	If the origin_only flag is passed for non lv_is_origin LVs,
	the extension is not added.
	
	Thin volumes may also use origin_only flag.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.235&r2=1.236

--- LVM2/lib/activate/activate.c	2012/01/25 08:51:29	1.235
+++ LVM2/lib/activate/activate.c	2012/01/25 09:00:18	1.236
@@ -552,7 +552,7 @@
 			fs_unlock(); /* For non clustered - wait if there are non-delete ops */
 	}
 
-	if (!dev_manager_info(lv->vg->cmd->mem, lv, origin_only ? "real" : NULL, with_open_count,
+	if (!dev_manager_info(lv->vg->cmd->mem, lv, (lv_is_origin(lv) && origin_only) ? "real" : NULL, with_open_count,
 			      with_read_ahead, &dminfo, &info->read_ahead))
 		return_0;
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2012-01-20  3:46 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2012-01-20  3:46 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2012-01-20 03:46:52

Modified files:
	lib/activate   : activate.c 

Log message:
	improve comment

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.231&r2=1.232

--- LVM2/lib/activate/activate.c	2012/01/20 00:27:19	1.231
+++ LVM2/lib/activate/activate.c	2012/01/20 03:46:52	1.232
@@ -1454,7 +1454,12 @@
 	return r;
 }
 
-/* Returns success if the device is not active */
+/*
+ * In a cluster, set exclusive to indicate that only one node is using the
+ * device.  Any preloaded tables may then use non-clustered targets.
+ *
+ * Returns success if the device is not active
+ */
 int lv_suspend_if_active(struct cmd_context *cmd, const char *lvid_s, unsigned origin_only, unsigned exclusive)
 {
 	struct lv_activate_opts laopts = {
@@ -1541,17 +1546,18 @@
 	return r;
 }
 
-/* Returns success if the device is not active */
+/*
+ * In a cluster, set exclusive to indicate that only one node is using the
+ * device.  Any tables loaded may then use non-clustered targets.
+ *
+ * Returns success if the device is not active
+ */
 int lv_resume_if_active(struct cmd_context *cmd, const char *lvid_s,
-			unsigned origin_only, unsigned exclusive, unsigned revert)
+			unsigned origin_only, unsigned exclusive,
+			unsigned revert)
 {
 	struct lv_activate_opts laopts = {
 		.origin_only = origin_only,
-		/*
-		 * When targets are activated exclusively in a cluster, the
-		 * non-clustered target should be used.  This only happens
-		 * if exclusive is set.
-		 */
 		.exclusive = exclusive,
 		.revert = revert
 	};


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2012-01-12  9:08 prajnoha
  0 siblings, 0 replies; 16+ messages in thread
From: prajnoha @ 2012-01-12  9:08 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2012-01-12 09:08:55

Modified files:
	lib/activate   : activate.c 

Log message:
	Missing const.
	
	"warning: assignment discards 'const' qualifier..."

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.227&r2=1.228

--- LVM2/lib/activate/activate.c	2012/01/12 01:51:56	1.227
+++ LVM2/lib/activate/activate.c	2012/01/12 09:08:55	1.228
@@ -395,7 +395,7 @@
 static int _passes_readonly_filter(struct cmd_context *cmd,
 				   struct logical_volume *lv)
 {
-	struct dm_config_node *cn;
+	const struct dm_config_node *cn;
 
 	if (!(cn = find_config_tree_node(cmd, "activation/read_only_volume_list")))
 		return 0;


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2011-07-08 15:35 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2011-07-08 15:35 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2011-07-08 15:35:50

Modified files:
	lib/activate   : activate.c 

Log message:
	Need to snapshot lookup by uuid instead of name in case it's renamed.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.208&r2=1.209

--- LVM2/lib/activate/activate.c	2011/07/08 12:48:41	1.208
+++ LVM2/lib/activate/activate.c	2011/07/08 15:35:50	1.209
@@ -1214,9 +1214,9 @@
 		 */
 		if (!laopts->origin_only && lv_is_origin(lv)) {
         		dm_list_iterate_items_gen(snap_seg, &lv->snapshot_segs, origin_list) {
-				if (!(lvl_pre = find_lv_in_vg(lv_pre->vg, snap_seg->cow->name))) {
-					log_error(INTERNAL_ERROR "LV %s missing from preload metadata",
-						  snap_seg->cow->name);
+				if (!(lvl_pre = find_lv_in_vg_by_lvid(lv_pre->vg, &snap_seg->cow->lvid))) {
+					log_error(INTERNAL_ERROR "LV %s (%s) missing from preload metadata",
+						  snap_seg->cow->name, snap_seg->cow->lvid.id[1].uuid);
 					goto out;
 				}
 				if (!lv_is_cow(lvl_pre->lv) &&


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2011-07-05 18:36 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2011-07-05 18:36 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2011-07-05 18:36:37

Modified files:
	lib/activate   : activate.c 

Log message:
	Always perform preload logic before suspending - not only in the case when we
	have precommitted metadata.  (Necessary to avoid loading tables
	while suspend in lvchange --refresh.)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.206&r2=1.207

--- LVM2/lib/activate/activate.c	2011/07/05 01:08:42	1.206
+++ LVM2/lib/activate/activate.c	2011/07/05 18:36:37	1.207
@@ -1168,49 +1168,47 @@
 	lv_calculate_readahead(lv, NULL);
 
 	/*
-	 * If VG was precommitted, preload devices for the LV.
+	 * Preload devices for the LV.
 	 * If the PVMOVE LV is being removed, it's only present in the old
 	 * metadata and not the new, so we must explicitly add the new
 	 * tables for all the changed LVs here, as the relationships
 	 * are not found by walking the new metadata.
 	 */
-	if ((lv_pre->vg->status & PRECOMMITTED)) {
-		if (!(lv_pre->status & LOCKED) &&
-		    (lv->status & LOCKED) &&
-		    (pvmove_lv = find_pvmove_lv_in_lv(lv))) {
-			/* Preload all the LVs above the PVMOVE LV */
-			dm_list_iterate_items(sl, &pvmove_lv->segs_using_this_lv) {
-				if (!(lvl_pre = find_lv_in_vg(lv_pre->vg, sl->seg->lv->name))) {
-					/* FIXME Internal error? */
-					log_error("LV %s missing from preload metadata", sl->seg->lv->name);
-					goto out;
-				}
-				if (!_lv_preload(lvl_pre->lv, laopts, &flush_required))
-					goto_out;
-			}
-			/* Now preload the PVMOVE LV itself */
-			if (!(lvl_pre = find_lv_in_vg(lv_pre->vg, pvmove_lv->name))) {
+	if (!(lv_pre->status & LOCKED) &&
+	    (lv->status & LOCKED) &&
+	    (pvmove_lv = find_pvmove_lv_in_lv(lv))) {
+		/* Preload all the LVs above the PVMOVE LV */
+		dm_list_iterate_items(sl, &pvmove_lv->segs_using_this_lv) {
+			if (!(lvl_pre = find_lv_in_vg(lv_pre->vg, sl->seg->lv->name))) {
 				/* FIXME Internal error? */
-				log_error("LV %s missing from preload metadata", pvmove_lv->name);
+				log_error("LV %s missing from preload metadata", sl->seg->lv->name);
 				goto out;
 			}
 			if (!_lv_preload(lvl_pre->lv, laopts, &flush_required))
 				goto_out;
-		} else {
-			if (!_lv_preload(lv_pre, laopts, &flush_required))
-				/* FIXME Revert preloading */
-				goto_out;
+		}
+		/* Now preload the PVMOVE LV itself */
+		if (!(lvl_pre = find_lv_in_vg(lv_pre->vg, pvmove_lv->name))) {
+			/* FIXME Internal error? */
+			log_error("LV %s missing from preload metadata", pvmove_lv->name);
+			goto out;
+		}
+		if (!_lv_preload(lvl_pre->lv, laopts, &flush_required))
+			goto_out;
+	} else {
+		if (!_lv_preload(lv_pre, laopts, &flush_required))
+			/* FIXME Revert preloading */
+			goto_out;
 
-			/*
-			 * Search for existing LVs that have become detached and preload them.
-			 */
-			detached.lv_pre = lv_pre;
-			detached.laopts = laopts;
-			detached.flush_required = &flush_required;
+		/*
+		 * Search for existing LVs that have become detached and preload them.
+		 */
+		detached.lv_pre = lv_pre;
+		detached.laopts = laopts;
+		detached.flush_required = &flush_required;
 
-			if (!for_each_sub_lv(cmd, lv, &_preload_detached_lv, &detached))
-				goto_out;
-		}
+		if (!for_each_sub_lv(cmd, lv, &_preload_detached_lv, &detached))
+			goto_out;
 	}
 
 	if (!monitor_dev_for_events(cmd, lv, laopts, 0))


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2011-07-05  1:08 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2011-07-05  1:08 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2011-07-05 01:08:43

Modified files:
	lib/activate   : activate.c 

Log message:
	Snapshots LVs are never loaded in their own right, only along with their
	origin.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.205&r2=1.206

--- LVM2/lib/activate/activate.c	2011/07/01 14:09:19	1.205
+++ LVM2/lib/activate/activate.c	2011/07/05 01:08:42	1.206
@@ -1112,7 +1112,7 @@
 	struct lv_list *lvl_pre;
 
 	if ((lvl_pre = find_lv_in_vg(detached->lv_pre->vg, lv->name))) {
-		if (lv_is_visible(lvl_pre->lv) && lv_is_active(lv) &&
+		if (lv_is_visible(lvl_pre->lv) && lv_is_active(lv) && !lv_is_cow(lv) &&
 		    !_lv_preload(lvl_pre->lv, detached->laopts, detached->flush_required))
 			return_0;
 	}


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2010-07-12 12:38 prajnoha
  0 siblings, 0 replies; 16+ messages in thread
From: prajnoha @ 2010-07-12 12:38 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2010-07-12 12:38:35

Modified files:
	lib/activate   : activate.c 

Log message:
	Addendum for previous patch - show VG/LV name everywhere so the messages
	are consistent.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.172&r2=1.173

--- LVM2/lib/activate/activate.c	2010/07/12 11:37:50	1.172
+++ LVM2/lib/activate/activate.c	2010/07/12 12:38:35	1.173
@@ -263,7 +263,8 @@
 
 	if (!(cn = find_config_tree_node(cmd, "activation/volume_list"))) {
 		log_verbose("activation/volume_list configuration setting "
-			    "not defined, checking host tags only");
+			    "not defined, checking only host tags for %s/%s",
+			    lv->vg->name, lv->name);
 
 		/* If no host tags defined, activate */
 		if (dm_list_empty(&cmd->tags))


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2008-09-19  7:12 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2008-09-19  7:12 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2008-09-19 07:12:45

Modified files:
	lib/activate   : activate.c 

Log message:
	rename var

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.138&r2=1.139

--- LVM2/lib/activate/activate.c	2008/09/19 06:41:57	1.138
+++ LVM2/lib/activate/activate.c	2008/09/19 07:12:45	1.139
@@ -1027,7 +1027,7 @@
 		return 0;
 	}
 
-	if ((!lv->vg->cmd->partial_activate) && (lv->status & PARTIAL_LV)) {
+	if ((!lv->vg->cmd->partial_activation) && (lv->status & PARTIAL_LV)) {
 		log_error("Refusing activation of partial LV %s. Use --partial to override.",
 			  lv->name);
 		return_0;


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2007-01-24 22:06 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2007-01-24 22:06 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2007-01-24 22:06:12

Modified files:
	lib/activate   : activate.c 

Log message:
	fix earlier checkin

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.118&r2=1.119

--- LVM2/lib/activate/activate.c	2007/01/24 16:51:23	1.118
+++ LVM2/lib/activate/activate.c	2007/01/24 22:06:11	1.119
@@ -651,7 +651,7 @@
 	int r = 1;
 	struct list *tmp;
 	struct lv_segment *seg;
-	int (*monitor_fn) (struct cmd_context *c, struct lv_segment *s, int e);
+	int (*monitor_fn) (struct lv_segment *s, int e);
 
 	/*
 	 * Nothing to do if dmeventd configured not to be used.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2006-01-27 20:39 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2006-01-27 20:39 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2006-01-27 20:39:37

Modified files:
	lib/activate   : activate.c 

Log message:
	When suspending, dmeventd deregistration needs to use existing details
	not precommitted ones.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.103&r2=1.104


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2006-01-27 18:38 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2006-01-27 18:38 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2006-01-27 18:38:14

Modified files:
	lib/activate   : activate.c 

Log message:
	Rename register_dev; fix missing initialisation; reduce number of ifdefs.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.102&r2=1.103


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2004-05-11 18:18 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2004-05-11 18:18 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-05-11 18:18:15

Modified files:
	lib/activate   : activate.c 

Log message:
	update comment

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.87&r2=1.88


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2004-04-14 17:33 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2004-04-14 17:33 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-04-14 17:33:06

Modified files:
	lib/activate   : activate.c 

Log message:
	Fix lvs_in_vg_opened counting.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.83&r2=1.84


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2004-03-26 19:13 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2004-03-26 19:13 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-03-26 19:13:39

Modified files:
	lib/activate   : activate.c 

Log message:
	Ignore open hidden LVs when checking if deactivation is OK.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.77&r2=1.78


^ permalink raw reply	[flat|nested] 16+ messages in thread

* LVM2/lib/activate activate.c
@ 2004-03-19 16:26 agk
  0 siblings, 0 replies; 16+ messages in thread
From: agk @ 2004-03-19 16:26 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-03-19 16:26:46

Modified files:
	lib/activate   : activate.c 

Log message:
	Only print warning message once when compiled without libdevmapper.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.74&r2=1.75


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-01-25  9:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-28 14:06 LVM2/lib/activate activate.c agk
  -- strict thread matches above, loose matches on Subject: below --
2012-01-25  9:00 zkabelac
2012-01-20  3:46 agk
2012-01-12  9:08 prajnoha
2011-07-08 15:35 agk
2011-07-05 18:36 agk
2011-07-05  1:08 agk
2010-07-12 12:38 prajnoha
2008-09-19  7:12 agk
2007-01-24 22:06 agk
2006-01-27 20:39 agk
2006-01-27 18:38 agk
2004-05-11 18:18 agk
2004-04-14 17:33 agk
2004-03-26 19:13 agk
2004-03-19 16:26 agk

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).