mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-21 22:04:19 +03:00
lv_manip: extension of raid0 causes livelock
A livelock occurs on extension in lv_manip when adjusting the region size, which doesn't apply to any raid0/raid0_meta LVs (these don't have a bitmap). Fix by prohibiting the region size adjustment on any such LVs. - resolves rhbz1354604
This commit is contained in:
parent
9c27573493
commit
df5021a201
@ -3921,14 +3921,16 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The MD bitmap is limited to being able to track 2^21 regions.
|
* The MD bitmap is limited to being able to track 2^21 regions.
|
||||||
* The region_size must be adjusted to meet that criteria.
|
* The region_size must be adjusted to meet that criteria
|
||||||
|
* unless raid0/raid0_meta, which doesn't have a bitmap.
|
||||||
*/
|
*/
|
||||||
while (seg_is_raid(seg) && (seg->region_size < (lv->size / (1 << 21)))) {
|
if (seg_is_raid(seg) && !seg_is_any_raid0(seg))
|
||||||
seg->region_size *= 2;
|
while (seg->region_size < (lv->size / (1 << 21))) {
|
||||||
log_very_verbose("Adjusting RAID region_size from %uS to %uS"
|
seg->region_size *= 2;
|
||||||
" to support large LV size",
|
log_very_verbose("Adjusting RAID region_size from %uS to %uS"
|
||||||
seg->region_size/2, seg->region_size);
|
" to support large LV size",
|
||||||
}
|
seg->region_size/2, seg->region_size);
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user