]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow: fix small bug when reshape interrupted.
authorNeilBrown <neilb@suse.de>
Wed, 3 Jul 2013 01:39:28 +0000 (11:39 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 4 Jul 2013 07:10:37 +0000 (17:10 +1000)
progress_reshape() may not set reshape_completed if the reshape is
interrupted, so we need to initialize it to the current value before
hand, so the value used afterwards is credible.

Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index 8ca57e84ee6b460ff3af67a1a01c5ff25128fadf..20ecf3fd42895adb88dc9c4320f2147ee4f03ed2 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -4203,6 +4203,7 @@ int child_monitor(int afd, struct mdinfo *sra, struct reshape *reshape,
                                wait_point = __le64_to_cpu(bsb.arraystart2);
                }
 
+               reshape_completed = sra->reshape_progress;
                rv = progress_reshape(sra, reshape,
                                      backup_point, wait_point,
                                      &suspend_point, &reshape_completed);