Blame SOURCES/mdadm-3.3.2-imsm-don-t-update-migration-record-when-reshape-is-i.patch

efb5be
From c85338c67570ec346bbd7fb0948bb0da4b43bcc3 Mon Sep 17 00:00:00 2001
efb5be
From: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
efb5be
Date: Tue, 5 Jan 2016 17:16:16 +0100
efb5be
Subject: [PATCH] imsm: don't update migration record when reshape is
efb5be
 interrupted
efb5be
efb5be
Abort imsm_manage_reshape() without updating the migration record if any
efb5be
error occurs when checking progress. If reshape is interrupted and the
efb5be
migration record is then updated, the checkpoint will be wrong and will
efb5be
cause reshape to fail when the array is restarted.
efb5be
efb5be
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
efb5be
Signed-off-by: NeilBrown <neilb@suse.com>
efb5be
---
efb5be
 super-intel.c | 4 ++--
efb5be
 1 file changed, 2 insertions(+), 2 deletions(-)
efb5be
efb5be
diff --git a/super-intel.c b/super-intel.c
efb5be
index 3b3d561..90b7b6d 100644
efb5be
--- a/super-intel.c
efb5be
+++ b/super-intel.c
efb5be
@@ -10373,7 +10373,7 @@ int wait_for_reshape_imsm(struct mdinfo *sra, int ndata)
efb5be
 		dprintf("imsm: wait_for_reshape_imsm() "
efb5be
 			"cannot read reshape_position (no reshape in progres)\n");
efb5be
 		close(fd);
efb5be
-		return 0;
efb5be
+		return 1;
efb5be
 	}
efb5be
 
efb5be
 	if (completed > position_to_set) {
efb5be
@@ -10662,7 +10662,7 @@ static int imsm_manage_reshape(
efb5be
 		sra->reshape_progress = next_step;
efb5be
 
efb5be
 		/* wait until reshape finish */
efb5be
-		if (wait_for_reshape_imsm(sra, ndata) < 0) {
efb5be
+		if (wait_for_reshape_imsm(sra, ndata)) {
efb5be
 			dprintf("wait_for_reshape_imsm returned error!\n");
efb5be
 			goto abort;
efb5be
 		}
efb5be
-- 
efb5be
2.5.0
efb5be