[PATCH 4/9] imsm: FIX: Do not allow spare activation during rebuild

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do not allow for spare device activation while rebuild is in progress,
when additional degradation occur.

Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
---

 super-intel.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index c6509af..973b22f 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -6784,6 +6784,14 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
 	if (imsm_reshape_blocks_arrays_changes(super))
 			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)
 		/* No repair for takeovered array
 		 * imsm doesn't support raid4

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux