Skip to contentSkip to conversation

Also clean up MISSING devices in --removemissing --force

PATCH New Petr Rockai 2 participants 2 messages Dec 17, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Also clean up MISSING devices in --removemissing --force

Hi,

this is a simple patch that makes --removemissing --force treat MISSING_PV devices the same way as --removemissing (without --force) does. This should fix the last bit of RHBZ 537954.

Yours,
Petr.

===================================================================
RCS file: /cvs/lvm2/LVM2/tools/vgreduce.c,v
retrieving revision 1.98

vgreduce.c +1 -1
diff -u -p -r1.98 vgreduce.c
@@ -224,7 +224,7 @@ static int _make_vg_consistent(struct cm
 	 */
 	dm_list_iterate_safe(pvh, pvht, &vg->pvs) {
 		pvl = dm_list_item(pvh, struct pv_list);
-		if (pvl->pv->dev)
+		if (pvl->pv->dev && !(pvl->pv->status & MISSING_PV))
 			continue;
 		if (!_remove_pv(vg, pvl, 0))
 			return_0;
#1 lore raw

PATCH 1/1 Also clean up MISSING devices in --removemissing --force

vgreduce.c static int _make_vg_consistent(struct cm · line 230

Quoted 9 lines · Petr Rockai

this is a simple patch that makes --removemissing --force treat MISSING_PV devices the same way as --removemissing (without --force) does. This should fix the last bit of RHBZ 537954.

vgreduce.c +1 -1
-		if (pvl->pv->dev)
+		if (pvl->pv->dev && !(pvl->pv->status & MISSING_PV))
 			continue;
 		if (!_remove_pv(vg, pvl, 0))
 			return_0;

ack.

Milan