[PATCH 2/2] imsm: FIX: Be more patient during loading matadata

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

 



Sometimes occurs that metadata cannot be loaded e.g. wrong check sum
It can happen due to metadata update racing with mdmon condition.
If mpb loading is tried again, it is loaded successfully.
Try to load metadata again before really giving up.

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

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

diff --git a/super-intel.c b/super-intel.c
index dc5e34e..d23267a 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2773,8 +2773,14 @@ load_and_parse_mpb(int fd, struct intel_super *super, char *devname, int keep_fd
 	int err;
 
 	err = load_imsm_mpb(fd, super, devname);
-	if (err)
-		return err;
+	if (err) {
+		/* try to load mpb again,
+		 * in case of mdmon race we could have more luck...
+		 */
+		err = load_imsm_mpb(fd, super, devname);
+		if (err)
+			return err;
+	}
 	err = load_imsm_disk(fd, super, devname, keep_fd);
 	if (err)
 		return err;

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