summaryrefslogtreecommitdiff
path: root/sysfs.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-06-25 15:52:58 +1000
committerNeilBrown <neilb@suse.de>2013-06-25 15:52:58 +1000
commitdea3786ae2cf74ecb0087d1bea1aa04e9091ad5c (patch)
treecec1e61f075532d0421c95d03f815cb616192ceb /sysfs.c
parent688eb823bc07b080d045c415836ceb6fff02cce0 (diff)
Grow: fix bug in raid0 -> raid5 conversion.
The moment we change a RAID0 to a RAID5 it will try to recovery. This will abort quite quickly as there are not spare devices, but it could confuse the attempt to freeze the array. So allow 'freeze' to work even on a recovering array. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysfs.c b/sysfs.c
index 5512a302..cde8f197 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -838,7 +838,7 @@ int sysfs_freeze_array(struct mdinfo *sra)
if (strcmp(buf, "frozen\n") == 0)
/* Already frozen */
return 0;
- if (strcmp(buf, "idle\n") != 0)
+ if (strcmp(buf, "idle\n") != 0 && strcmp(buf, "recover\n") != 0)
return -1;
if (sysfs_set_str(sra, NULL, "sync_action", "frozen") < 0)
return 0;