Skip to contentSkip to conversation

LVM2/lib/metadata pv_map.c

PATCH [email protected] 2 participants 2 messages Apr 23, 2009 – Apr 24, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2009-04-23 16:41:28

Modified files:
lib/metadata : pv_map.c

Log message:
Do not include MISSING_PVs in allocation maps.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/pv_map.c.diff?cvsroot=lvm2&r1=1.33&r2=1.34

lib/metadata/pv_map.c +3 -0
@@ -129,6 +129,9 @@
 	dm_list_iterate_items(pvl, pvs) {
 		if (!(pvl->pv->status & ALLOCATABLE_PV))
 			continue;
+		if (pvl->pv->status & MISSING_PV)
+			continue;
+		assert(pvl->pv->dev);
 
 		pvm = NULL;
 
#1 lore raw
Quoted 1 line · mornfall at sourceware.org

Do not include MISSING_PVs in allocation maps.

Ack.

WHATS_NEW ?

lib/metadata/pv_map.c line 134

Quoted 1 line
lib/metadata/pv_map.c +1 -0
+		assert(pvl->pv->dev);

Please don't use 'assert'. It bypasses our logging mechanisms and aborts the code making debugging harder.

Use log_error() with an informative message instead, for example.

Alasdair

Signature · 1 line
agk at redhat.com