mirror of
git://sourceware.org/git/lvm2.git
synced 2025-09-14 09:44:18 +03:00
lvchange: allow a transiently failed RaidLV to be refreshed
Enhance commit 0b8bf73a63
to refresh the top-level LV correctly
in case of a clustered, remotely activated RaidLV.
Related: rhbz1399844
This commit is contained in:
@@ -1417,17 +1417,23 @@ int lv_refresh_suspend_resume(const struct logical_volume *lv)
|
|||||||
* with transient failures of SubLVs.
|
* with transient failures of SubLVs.
|
||||||
*/
|
*/
|
||||||
if (lv_is_raid(lv)) {
|
if (lv_is_raid(lv)) {
|
||||||
uint32_t s;
|
if (vg_is_clustered(lv->vg) &&
|
||||||
struct lv_segment *seg = first_seg(lv);
|
lv_is_active_remotely(lv)) {
|
||||||
|
if (!_lv_refresh_suspend_resume(lv))
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
uint32_t s;
|
||||||
|
struct lv_segment *seg = first_seg(lv);
|
||||||
|
|
||||||
for (s = 0; s < seg->area_count; s++) {
|
for (s = 0; s < seg->area_count; s++) {
|
||||||
if (seg_type(seg, s) == AREA_LV &&
|
if (seg_type(seg, s) == AREA_LV &&
|
||||||
!_lv_refresh_suspend_resume(seg_lv(seg, s)))
|
!_lv_refresh_suspend_resume(seg_lv(seg, s)))
|
||||||
return 0;
|
return 0;
|
||||||
if (seg->meta_areas &&
|
if (seg->meta_areas &&
|
||||||
seg_metatype(seg, s) == AREA_LV &&
|
seg_metatype(seg, s) == AREA_LV &&
|
||||||
!_lv_refresh_suspend_resume(seg_metalv(seg, s)))
|
!_lv_refresh_suspend_resume(seg_metalv(seg, s)))
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user