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 <neilb@suse.de>
This commit is contained in:
NeilBrown 2011-01-11 13:23:16 +11:00
parent 4867e068e3
commit 0f28668b93
1 changed files with 1 additions and 0 deletions

1
Grow.c
View File

@ -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);