mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
lvconvert: reject changing number of stripes on single core
Reject any stripe adding/removing reshape on raid4/5/6/10 because of related MD kernel deadlock on single core systems until we get a proper fix in MD. Related: rhbz1443999
This commit is contained in:
parent
c245996d70
commit
3719f4bc54
@ -2322,6 +2322,12 @@ static int _raid_reshape(struct logical_volume *lv,
|
||||
|
||||
/* Handle disk addition reshaping */
|
||||
if (old_image_count < new_image_count) {
|
||||
/* FIXME: remove once MD kernel rhbz1443999 got fixed. */
|
||||
if (sysconf(_SC_NPROCESSORS_ONLN) < 2) {
|
||||
log_error("Can't add stripes to LV %s on single core.", display_lvname(lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!_raid_reshape_add_images(lv, new_segtype, yes,
|
||||
old_image_count, new_image_count,
|
||||
new_stripes, new_stripe_size, allocate_pvs))
|
||||
@ -2329,6 +2335,12 @@ static int _raid_reshape(struct logical_volume *lv,
|
||||
|
||||
/* Handle disk removal reshaping */
|
||||
} else if (old_image_count > new_image_count) {
|
||||
/* FIXME: remove once MD kernel rhbz1443999 got fixed. */
|
||||
if (sysconf(_SC_NPROCESSORS_ONLN) < 2) {
|
||||
log_error("Can't remove stripes from LV %s on single core.", display_lvname(lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!_raid_reshape_remove_images(lv, new_segtype, yes, force,
|
||||
old_image_count, new_image_count,
|
||||
new_stripes, new_stripe_size,
|
||||
|
Loading…
Reference in New Issue
Block a user