[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH] Disable automatic MISSING_PV recovery when handles_missing_pvs is set (BZ 653643)



Hi,

it seems I did everything but actually posted the proposed patch for BZ
653643. The explanation of what goes wrong where and how the patch fixes
that is in BZ comments.

Yours,
   Petr.

diff -rN -up old-vgextend-restoremissing/lib/metadata/metadata.c new-vgextend-restoremissing/lib/metadata/metadata.c
--- old-vgextend-restoremissing/lib/metadata/metadata.c	2010-11-25 21:37:03.000000000 +0100
+++ new-vgextend-restoremissing/lib/metadata/metadata.c	2010-11-25 21:37:03.000000000 +0100
@@ -2613,6 +2613,14 @@ static void check_reappeared_pv(struct v
 {
 	struct pv_list *pvl;
 
+        /*
+         * Skip these checks in case the tool is going to deal with missing
+         * PVs, especially since the resulting messages can be pretty
+         * confusing.
+         */
+        if (correct_vg->cmd->handles_missing_pvs)
+            return;
+
 	dm_list_iterate_items(pvl, &correct_vg->pvs)
 		if (pv->dev == pvl->pv->dev && is_missing_pv(pvl->pv)) {
 			log_warn("Missing device %s reappeared, updating "

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]