public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: agk@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/metadata/metadata-exporte ...
Date: Tue, 16 Mar 2010 14:37:00 -0000	[thread overview]
Message-ID: <20100316143743.16877.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2010-03-16 14:37:39

Modified files:
	.              : WHATS_NEW 
	lib/metadata   : metadata-exported.h metadata.c pv_map.c 
	tools          : lvconvert.c toollib.c vgreduce.c 

Log message:
	Introduce is_missing_pv().

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1460&r2=1.1461
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.133&r2=1.134
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.318&r2=1.319
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/pv_map.c.diff?cvsroot=lvm2&r1=1.34&r2=1.35
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.121&r2=1.122
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/toollib.c.diff?cvsroot=lvm2&r1=1.185&r2=1.186
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.99&r2=1.100

--- LVM2/WHATS_NEW	2010/03/16 08:47:46	1.1460
+++ LVM2/WHATS_NEW	2010/03/16 14:37:38	1.1461
@@ -1,5 +1,6 @@
 Version 2.02.63 - 
 ================================
+  Introduce is_missing_pv().
   Fix clvmd Makefile to not overwrite LIBS from template definition.
 
 Version 2.02.62 - 9th March 2010
--- LVM2/lib/metadata/metadata-exported.h	2010/02/24 18:15:49	1.133
+++ LVM2/lib/metadata/metadata-exported.h	2010/03/16 14:37:38	1.134
@@ -415,6 +415,7 @@
 			const char *lv_name);
 int is_orphan_vg(const char *vg_name);
 int is_orphan(const struct physical_volume *pv);
+int is_missing_pv(const struct physical_volume *pv);
 int vgs_are_compatible(struct cmd_context *cmd,
 		       struct volume_group *vg_from,
 		       struct volume_group *vg_to);
--- LVM2/lib/metadata/metadata.c	2010/03/02 21:56:14	1.318
+++ LVM2/lib/metadata/metadata.c	2010/03/16 14:37:38	1.319
@@ -2068,7 +2068,7 @@
 	dm_list_iterate_items(lvseg, &lv->segments) {
 		for (s = 0; s < lvseg->area_count; ++s) {
 			if (seg_type(lvseg, s) == AREA_PV) {
-				if (seg_pv(lvseg, s)->status & MISSING_PV)
+				if (is_missing_pv(seg_pv(lvseg, s)))
 					lv->status |= PARTIAL_LV;
 			}
 		}
@@ -2513,7 +2513,7 @@
 	int ret = 0;
 	struct pv_list *pvl;
 	dm_list_iterate_items(pvl, &vg->pvs) {
-		if (pvl->pv->status & MISSING_PV)
+		if (is_missing_pv(pvl->pv))
 			++ ret;
 	}
 	return ret;
@@ -2525,7 +2525,7 @@
 	struct pv_list *pvl;
 
 	dm_list_iterate_items(pvl, &correct_vg->pvs)
-		if (pv->dev == pvl->pv->dev && pvl->pv->status & MISSING_PV) {
+		if (pv->dev == pvl->pv->dev && is_missing_pv(pvl->pv)) {
 			log_warn("Missing device %s reappeared, updating "
 				 "metadata for VG %s to version %u.",
 				 pv_dev_name(pvl->pv),  pv_vg_name(pvl->pv), 
@@ -2705,7 +2705,7 @@
 				correct_vg = NULL;
 			}
 		} else dm_list_iterate_items(pvl, &correct_vg->pvs) {
-			if (pvl->pv->status & MISSING_PV)
+			if (is_missing_pv(pvl->pv))
 				continue;
 			if (!str_list_match_item(pvids, pvl->pv->dev->pvid)) {
 				log_debug("Cached VG %s had incorrect PV list",
@@ -3275,6 +3275,11 @@
 {
 	return (pv_field(pv, vg_name) ? 1 : 0);
 }
+ 
+int is_missing_pv(const struct physical_volume *pv)
+{
+	return pv_field(pv, status) & MISSING_PV ? 1 : 0;
+}
 
 /*
  * Returns:
--- LVM2/lib/metadata/pv_map.c	2009/04/23 16:41:27	1.34
+++ LVM2/lib/metadata/pv_map.c	2010/03/16 14:37:38	1.35
@@ -129,7 +129,7 @@
 	dm_list_iterate_items(pvl, pvs) {
 		if (!(pvl->pv->status & ALLOCATABLE_PV))
 			continue;
-		if (pvl->pv->status & MISSING_PV)
+		if (is_missing_pv(pvl->pv))
 			continue;
 		assert(pvl->pv->dev);
 
--- LVM2/tools/lvconvert.c	2010/02/17 22:59:46	1.121
+++ LVM2/tools/lvconvert.c	2010/03/16 14:37:39	1.122
@@ -527,7 +527,7 @@
 		if (seg_lv(lvseg, s)->status & PARTIAL_LV)
 			return 1;
 	} else if ((seg_type(lvseg, s) == AREA_PV) &&
-		   (seg_pv(lvseg, s)->status & MISSING_PV))
+		   (is_missing_pv(seg_pv(lvseg, s))))
 		return 1;
 
 	return 0;
@@ -564,7 +564,7 @@
 	dm_list_init(failed_pvs);
 
 	dm_list_iterate_items(pvl, &vg->pvs) {
-		if (!(pvl->pv->status & MISSING_PV))
+		if (!is_missing_pv(pvl->pv))
 			continue;
 
 		/* 
@@ -688,7 +688,7 @@
 	dm_list_iterate_items(pvl, remove_pvs) {
 		dm_list_iterate_items_safe(pvl_vg, pvlt, &vg->pvs) {
 			if (!id_equal(&pvl->pv->id, &pvl_vg->pv->id) ||
-			    !(pvl_vg->pv->status & MISSING_PV) ||
+			    !is_missing_pv(pvl_vg->pv) ||
 			    pvl_vg->pv->pe_alloc_count != 0)
 				continue;
 
--- LVM2/tools/toollib.c	2010/02/03 14:08:40	1.185
+++ LVM2/tools/toollib.c	2010/03/16 14:37:39	1.186
@@ -1001,7 +1001,7 @@
 		return 1;
 	}
 
-	if (allocatable_only && (pvl->pv->status & MISSING_PV)) {
+	if (allocatable_only && is_missing_pv(pvl->pv)) {
 		log_error("Physical volume %s is missing", pvname);
 		return 1;
 	}
--- LVM2/tools/vgreduce.c	2009/12/17 13:54:46	1.99
+++ LVM2/tools/vgreduce.c	2010/03/16 14:37:39	1.100
@@ -152,7 +152,7 @@
 	}
 
 	dm_list_iterate_items(pvl, &vg->pvs) {
-		if (pvl->pv->dev && !(pvl->pv->status & MISSING_PV))
+		if (pvl->pv->dev && !is_missing_pv(pvl->pv))
 			continue;
 		if (r && !_remove_pv(vg, pvl, 0))
 			return_0;
@@ -193,7 +193,7 @@
 
 				pv = seg_pv(seg, s);
 				if (!pv || !pv_dev(pv) ||
-				    (pv->status & MISSING_PV)) {
+				    is_missing_pv(pv)) {
 					if (arg_count(cmd, mirrorsonly_ARG) &&
 					    !(lv->status & MIRROR_IMAGE)) {
 						log_error("Non-mirror-image LV %s found: can't remove.", lv->name);
@@ -224,7 +224,7 @@
 	 */
 	dm_list_iterate_safe(pvh, pvht, &vg->pvs) {
 		pvl = dm_list_item(pvh, struct pv_list);
-		if (pvl->pv->dev && !(pvl->pv->status & MISSING_PV))
+		if (pvl->pv->dev && !is_missing_pv(pvl->pv))
 			continue;
 		if (!_remove_pv(vg, pvl, 0))
 			return_0;


             reply	other threads:[~2010-03-16 14:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 14:37 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-01  0:09 jbrassow
2011-10-28 20:12 zkabelac
2011-10-07 14:56 jbrassow
2011-09-14  9:57 zkabelac
2011-09-07  8:34 zkabelac
2011-08-18 19:43 jbrassow
2011-08-18 19:34 jbrassow
2011-03-11 14:56 prajnoha
2011-03-02 20:00 mbroz
2011-02-25 14:02 prajnoha
2010-05-21 14:07 zkabelac
2010-05-21 12:55 zkabelac
2010-05-21 12:52 zkabelac
2010-05-14 15:19 jbrassow
2010-03-16 15:30 agk
2009-07-14  2:19 wysochanski
2009-06-05 20:00 mbroz
2009-06-01 14:43 mbroz
2009-02-03 16:19 wysochanski
2008-04-23 14:33 wysochanski
2008-02-13 20:01 meyering
2008-01-18 22:02 agk
2008-01-16 18:15 agk
2008-01-07 20:42 mbroz
2007-11-15  2:20 agk
2007-10-12 14:08 wysochanski
2007-09-20 21:39 wysochanski
2007-08-30 20:30 wysochanski
2007-08-21 17:38 wysochanski
2007-07-23 17:27 wysochanski

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=20100316143743.16877.qmail@sourceware.org \
    --to=agk@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).