When during assembly degradation occurs restoring metadata critical section fails whole assembly. Allow for degradation during assembly and not restore data on degraded disk. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- super-intel.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/super-intel.c b/super-intel.c index 0fc907d..ccd9883 100644 --- a/super-intel.c +++ b/super-intel.c @@ -7984,6 +7984,10 @@ static void imsm_delete(struct intel_super *super, struct dl **dlp, unsigned ind int open_backup_targets(struct mdinfo *info, int raid_disks, int *raid_fds) { struct mdinfo *sd; + int i; + + for (i = 0; i < raid_disks; i++) + raid_fds[i] = -1; for (sd = info->devs ; sd ; sd = sd->next) { char *dn; @@ -8293,7 +8297,11 @@ int recover_backup_imsm(struct supertype *st, struct mdinfo *info) if (!targets) goto abort; - open_backup_targets(info, new_disks, targets); + if (open_backup_targets(info, new_disks, targets)) { + fprintf(stderr, + Name ": Cannot open devices belongs to array.\n"); + goto abort; + } for (i = 0; i < new_disks; i++) { if (targets[i] < 0) { -- 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