summaryrefslogtreecommitdiff
path: root/Grow.c
diff options
context:
space:
mode:
authorAdam Kwolek <adam.kwolek@intel.com>2011-03-10 11:41:28 +1100
committerNeilBrown <neilb@suse.de>2011-03-10 11:41:28 +1100
commitfcdfb8148853e33757171cc2c12e4c95795063cd (patch)
tree567b817e8b24e7ed38e24894fa75cf6515a1621e /Grow.c
parent82a7851e5f5575991967d953c33116f6f2d60072 (diff)
FIX: Set 'active' array state before array configuration
For not reshaped array in container during assembly array is in auto-read-only state. It is not possible to set disk slot for such array and later reshape cannot be started also. To move array from 'auto-read-only' to 'active' state storing 'active' state to sysfs is added. This allows for disks configuration and reshape. During reshaped array restart it is disabled by condition on restart variable. When reshape is starting, storing 'active' state to already active array should not matter. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Grow.c b/Grow.c
index 734fa6dc..d596c2de 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1654,6 +1654,9 @@ static int reshape_array(char *container, int fd, char *devname,
info->new_level = UnSet;
msg = analyse_change(info, &reshape);
info->new_level = new_level;
+ if (!restart)
+ /* Make sure the array isn't read-only */
+ ioctl(fd, RESTART_ARRAY_RW, 0);
} else
msg = analyse_change(info, &reshape);
if (msg) {