Number of failed disks MUST be half of initial number of disks. If number of failed disks is different we should not update metadata- data corruption may occur after array reassemlation. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@xxxxxxxxx> --- super-intel.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/super-intel.c b/super-intel.c index e284a4a..b25d4fb 100644 --- a/super-intel.c +++ b/super-intel.c @@ -5835,6 +5835,10 @@ static int apply_takeover_update(struct imsm_update_takeover *u, map = get_imsm_map(dev, 0); if (u->direction == R10_TO_R0) { + /* Number of failed disks must be half of initial disk number */ + if (imsm_count_failed(super, dev) != (map->num_members / 2)) + return 0; + /* iterate through devices to mark removed disks as spare */ for (dm = super->disks; dm; dm = dm->next) { if (dm->disk.status & FAILED_DISK) { -- 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