Ignore error when setting sync_min

When restarting an array that is in the middle of a reshape,
sync_min cannot be set.  So just ignore any errors we get
when trying to set it.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2011-01-17 09:51:33 +11:00
parent 77a73a17be
commit 18eaf9e553
1 changed files with 4 additions and 1 deletions

5
Grow.c
View File

@ -633,7 +633,10 @@ int start_reshape(struct mdinfo *sra)
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);
/* Setting sync_min can fail if the recovery is already 'running',
* which can happen when restarting an array which is reshaping.
* So don't worry about errors here */
sysfs_set_num(sra, NULL, "sync_min", 0);
err = err ?: sysfs_set_num(sra, NULL, "sync_max", 0);
err = err ?: sysfs_set_str(sra, NULL, "sync_action", "reshape");