imsm: FIX: Do not allow spare activation during rebuild
Do not allow for spare device activation while rebuild is in progress, when additional degradation occur. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
94002678b6
commit
fc8ca06447
|
@ -6784,6 +6784,14 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
|
||||||
if (imsm_reshape_blocks_arrays_changes(super))
|
if (imsm_reshape_blocks_arrays_changes(super))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
/* Cannot activate another spare if rebuild is in progress already
|
||||||
|
*/
|
||||||
|
if (is_rebuilding(dev)) {
|
||||||
|
dprintf("imsm: No spare activation allowed. "
|
||||||
|
"Rebuild in progress already.\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (a->info.array.level == 4)
|
if (a->info.array.level == 4)
|
||||||
/* No repair for takeovered array
|
/* No repair for takeovered array
|
||||||
* imsm doesn't support raid4
|
* imsm doesn't support raid4
|
||||||
|
|
Loading…
Reference in New Issue