Skip to contentSkip to conversation

lvconvert: change how to get failed mirrors number

PATCH New Lidong Zhong 2 participants 2 messages May 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lvconvert: change how to get failed mirrors number

It's probably a typo since the segment type can't be AREA_LV and AREA_PV simultaneously.

---
 tools/lvconvert.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/lvconvert.c +3 -3
index 6e47f81..4c0cb10 100644
@@ -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;
 		}
 	}
 
Signature · 1 line
1.8.1.4