File 0006-Grow-Add-documentation-to-abort_reshape-for-suspend_.patch of Package mdadm.7129
From bf08f6b1efed94b80c4cfb433db7202b6b7f794c Mon Sep 17 00:00:00 2001
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Date: Mon, 22 Feb 2016 09:43:43 -0500
Subject: [PATCH 227/359] Grow: Add documentation to abort_reshape() for
suspend_{lo,hi} setting
References: bsc#1081910
Add documentation for quirky reset procedure for resetting suspended
region range.
Suggested-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Coly Li <colyli@suse.de>
---
Grow.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Grow.c b/Grow.c
index bbdd46c..c4f417e 100755
--- a/Grow.c
+++ b/Grow.c
@@ -740,6 +740,14 @@ int start_reshape(struct mdinfo *sra, int already_running,
void abort_reshape(struct mdinfo *sra)
{
sysfs_set_str(sra, NULL, "sync_action", "idle");
+ /*
+ * Prior to kernel commit: 23ddff3792f6 ("md: allow suspend_lo and
+ * suspend_hi to decrease as well as increase.")
+ * you could only increase suspend_{lo,hi} unless the region they
+ * covered was empty. So to reset to 0, you need to push suspend_lo
+ * up past suspend_hi first. So to maximize the chance of mdadm
+ * working on all kernels, we want to keep doing that.
+ */
sysfs_set_num(sra, NULL, "suspend_lo", 0x7FFFFFFFFFFFFFFFULL);
sysfs_set_num(sra, NULL, "suspend_hi", 0);
sysfs_set_num(sra, NULL, "suspend_lo", 0);
--
2.16.1