linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] super-intel: ensure suspended region is removed when reshape completes.
@ 2016-02-18  4:53 NeilBrown
  2016-02-18 19:03 ` Jes Sorensen
  0 siblings, 1 reply; 5+ messages in thread
From: NeilBrown @ 2016-02-18  4:53 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: linux-raid, Ken Moffat, Artur Paszkiewicz

[-- Attachment #1: Type: text/plain, Size: 1857 bytes --]


A recent commit removed a call to abort_reshape() when IMSM reshape
completed.  An unanticipated result of this is that the suspended
region is not cleared as it should be.
So after a reshape, a region of the array will cause all IO to block.

Re-instate the required updates to suspend_{lo,hi} coped from
abort_reshape().

This is caught (sometimes) by the test suite.

Also fix a couple of typos found while exploring the code.

Reported-by: Ken Moffat <zarniwhoop@ntlworld.com>
Cc: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Fixes: 2139b03c2080 ("imsm: don't call abort_reshape() in imsm_manage_reshape()")
Signed-off-by: NeilBrown <neilb@suse.com>
---
 super-intel.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 90b7b6dee5d0..80b48d0fdd47 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -10465,7 +10465,7 @@ int check_degradation_change(struct mdinfo *info,
  * Function:	imsm_manage_reshape
  * Description:	Function finds array under reshape and it manages reshape
  *		process. It creates stripes backups (if required) and sets
- *		checheckpoits.
+ *		checkpoints.
  * Parameters:
  *	afd		: Backup handle (nattive) - not used
  *	sra		: general array info
@@ -10595,7 +10595,7 @@ static int imsm_manage_reshape(
 
 		start = current_position * 512;
 
-		/* allign reading start to old geometry */
+		/* align reading start to old geometry */
 		start_buf_shift = start % old_data_stripe_length;
 		start_src = start - start_buf_shift;
 
@@ -10700,6 +10700,9 @@ static int imsm_manage_reshape(
 	ret_val = 1;
 abort:
 	free(buf);
+	sysfs_set_num(sra, NULL, "suspend_lo", 0x7FFFFFFFFFFFFFFFULL);
+	sysfs_set_num(sra, NULL, "suspend_hi", 0);
+	sysfs_set_num(sra, NULL, "suspend_lo", 0);
 
 	return ret_val;
 }
-- 
2.7.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-22 14:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18  4:53 [PATCH] super-intel: ensure suspended region is removed when reshape completes NeilBrown
2016-02-18 19:03 ` Jes Sorensen
2016-02-18 21:57   ` NeilBrown
2016-02-19 22:36     ` Jes Sorensen
2016-02-22 14:53     ` Jes Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).