From 0f28668b93b94521f8ffafa9aab0c608b7c99081 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 11 Jan 2011 13:23:16 +1100 Subject: [PATCH] Ensure start_reshape copes with unexpected state We want start_reshape to work no matter what the current values of suspend_lo/suspend_hi are. So initialise suspend_lo very high as this allows suspend_hi to be set to anything. Signed-off-by: NeilBrown --- Grow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Grow.c b/Grow.c index 1222263..91f47b4 100644 --- a/Grow.c +++ b/Grow.c @@ -634,6 +634,7 @@ static int subarray_set_num(char *container, struct mdinfo *sra, char *name, int int start_reshape(struct mdinfo *sra) { int err; + sysfs_set_num(sra, NULL, "suspend_lo", 0x7FFFFFFFFFFFFFFFULL); err = sysfs_set_num(sra, NULL, "suspend_hi", 0); err = err ?: sysfs_set_num(sra, NULL, "suspend_lo", 0); err = err ?: sysfs_set_num(sra, NULL, "sync_min", 0);