dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

Blame SOURCES/mdadm-3.3.2-super-intel-ensure-suspended-region-is-removed-when-.patch

efb5be
From 942e1cdb4a6a5be02672bc686169c679e775c2be Mon Sep 17 00:00:00 2001
efb5be
From: NeilBrown <neilb@suse.com>
efb5be
Date: Thu, 18 Feb 2016 15:53:32 +1100
efb5be
Subject: [PATCH] super-intel: ensure suspended region is removed when reshape
efb5be
 completes.
efb5be
efb5be
A recent commit removed a call to abort_reshape() when IMSM reshape
efb5be
completed.  An unanticipated result of this is that the suspended
efb5be
region is not cleared as it should be.
efb5be
So after a reshape, a region of the array will cause all IO to block.
efb5be
efb5be
Re-instate the required updates to suspend_{lo,hi} coped from
efb5be
abort_reshape().
efb5be
efb5be
This is caught (sometimes) by the test suite.
efb5be
efb5be
Also fix a couple of typos found while exploring the code.
efb5be
efb5be
Reported-by: Ken Moffat <zarniwhoop@ntlworld.com>
efb5be
Cc: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
efb5be
Fixes: 2139b03c2080 ("imsm: don't call abort_reshape() in imsm_manage_reshape()")
efb5be
Signed-off-by: NeilBrown <neilb@suse.com>
efb5be
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
efb5be
---
efb5be
 super-intel.c | 8 ++++++--
efb5be
 1 file changed, 6 insertions(+), 2 deletions(-)
efb5be
efb5be
diff --git a/super-intel.c b/super-intel.c
efb5be
index 90b7b6d..ff0506d 100644
efb5be
--- a/super-intel.c
efb5be
+++ b/super-intel.c
efb5be
@@ -10465,7 +10465,7 @@ int check_degradation_change(struct mdinfo *info,
efb5be
  * Function:	imsm_manage_reshape
efb5be
  * Description:	Function finds array under reshape and it manages reshape
efb5be
  *		process. It creates stripes backups (if required) and sets
efb5be
- *		checheckpoits.
efb5be
+ *		checkpoints.
efb5be
  * Parameters:
efb5be
  *	afd		: Backup handle (nattive) - not used
efb5be
  *	sra		: general array info
efb5be
@@ -10595,7 +10595,7 @@ static int imsm_manage_reshape(
efb5be
 
efb5be
 		start = current_position * 512;
efb5be
 
efb5be
-		/* allign reading start to old geometry */
efb5be
+		/* align reading start to old geometry */
efb5be
 		start_buf_shift = start % old_data_stripe_length;
efb5be
 		start_src = start - start_buf_shift;
efb5be
 
efb5be
@@ -10700,6 +10700,10 @@ static int imsm_manage_reshape(
efb5be
 	ret_val = 1;
efb5be
 abort:
efb5be
 	free(buf);
efb5be
+	/* See Grow.c: abort_reshape() for further explanation */
efb5be
+	sysfs_set_num(sra, NULL, "suspend_lo", 0x7FFFFFFFFFFFFFFFULL);
efb5be
+	sysfs_set_num(sra, NULL, "suspend_hi", 0);
efb5be
+	sysfs_set_num(sra, NULL, "suspend_lo", 0);
efb5be
 
efb5be
 	return ret_val;
efb5be
 }
efb5be
-- 
efb5be
2.5.0
efb5be