[PATCH] imsm: do not fail load_container when first 2 disks are missing

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

 



Failure to find migration record should not fail the whole load_container.
It causes that degraded raid10 with first 2 disks missing cannot be assembled.

Signed-off-by: Anna Czarnowska <anna.czarnowska@xxxxxxxxx>
---
 super-intel.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index a0672bf..21147c2 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -3953,15 +3953,9 @@ static int load_super_imsm_all(struct supertype *st, int fd, void **sbp,
 		goto error;
 	}
 
-	/* load migration record */
-	err = load_imsm_migr_rec(super, NULL);
-	if (err) {
-		err = 4;
-		goto error;
-	}
-
 	/* Check migration compatibility */
-	if (check_mpb_migr_compatibility(super) != 0) {
+	if (load_imsm_migr_rec(super, NULL) == 0 &&
+	    check_mpb_migr_compatibility(super) != 0) {
 		fprintf(stderr, Name ": Unsupported migration detected");
 		if (devname)
 			fprintf(stderr, " on %s\n", devname);
-- 


--
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