From c192e88bcd34c7e57e5e8ac9b394ed610b98b2f2 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Thu, 1 Jul 2010 10:10:52 +0000 Subject: [PATCH] Restore the "removemissing" behaviour of lvconvert --repair --use-policies. --- tools/lvconvert.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index d7b48d090..0752b2e9a 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -790,7 +790,6 @@ static void _remove_missing_empty_pv(struct volume_group *vg, struct dm_list *re stack; return; } - log_warn("%d missing and now unallocated Physical Volumes removed from VG.", removed); } } @@ -1177,7 +1176,6 @@ static int _lvconvert_mirrors_repair(struct cmd_context *cmd, int replace_log = 0; int replace_mirrors = 0; uint32_t new_log_count, log_count; - struct dm_list *failed_pvs = NULL; struct logical_volume *log_lv; cmd->handles_missing_pvs = 1; @@ -1232,14 +1230,14 @@ static int _lvconvert_mirrors_repair(struct cmd_context *cmd, /* * First phase - remove faulty devices */ - if (!(failed_pvs = _failed_pv_list(lv->vg))) + if (!(lp->failed_pvs = _failed_pv_list(lv->vg))) return_0; /* * We must adjust the log first, or the entire mirror * will get stuck during a suspend. */ - if (!_lv_update_mirrored_log(lv, failed_pvs, new_log_count)) + if (!_lv_update_mirrored_log(lv, lp->failed_pvs, new_log_count)) return 0; if (lp->mirrors == 1) @@ -1252,7 +1250,7 @@ static int _lvconvert_mirrors_repair(struct cmd_context *cmd, return 0; } - if (!_lv_update_log_type(cmd, lp, lv, failed_pvs, + if (!_lv_update_log_type(cmd, lp, lv, lp->failed_pvs, new_log_count)) return 0; -- 2.43.5