From 9d558fbcc232314dc93a405b4da3079f5d8e9cb7 Mon Sep 17 00:00:00 2001 From: Lidong Zhong Date: Fri, 22 May 2015 15:50:42 +0800 Subject: [PATCH] lvconvert: change how to get failed mirrors number Commit b00711e3128c9cb38da90f303a3b64cf3a30fc9b improperly convert _area_missing() replacment and moved check for AREA_PV seg_type() into same if() section. Signed-off-by: Lidong Zhong --- WHATS_NEW | 1 + tools/lvconvert.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index eecdca9c3..e5864ebfe 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.121 - ================================ + Fix test for AREA_PV when checking for failed mirrors. Do not use --sysinit in lvm2-activation{-early,-net}.service if lvmpolld used. Do not fail polling when poll LV not found (already finished or removed). Replace poll_get_copy_vg/lv fns with vg_read() and find_lv() in polldaemon. diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 6e47f81d2..4c0cb1096 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -839,10 +839,10 @@ static int _failed_mirrors_count(struct logical_volume *lv) ret += _failed_mirrors_count(seg_lv(lvseg, s)); else if (seg_lv(lvseg, s)->status & PARTIAL_LV) ++ ret; - else if (seg_type(lvseg, s) == AREA_PV && - is_missing_pv(seg_pv(lvseg, s))) - ++ret; } + else if (seg_type(lvseg, s) == AREA_PV && + is_missing_pv(seg_pv(lvseg, s))) + ++ret; } }