]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow: Add documentation to abort_reshape() for suspend_{lo,hi} setting
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 22 Feb 2016 14:43:43 +0000 (09:43 -0500)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 22 Feb 2016 14:43:43 +0000 (09:43 -0500)
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>
Grow.c

diff --git a/Grow.c b/Grow.c
index bbdd46c0e600dc8c245e9e8a51766ae9bcaee4c0..c4f417ee283527c86f7344a4df7396c0541625ab 100755 (executable)
--- 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);