FIX: Use sysfs to change array parameters
For external metadata parameters has to be changed via sysfs. i.e. change of raid_disks requires handshake mdmon<->md (md_allow_write()) Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
9ff87c16ce
commit
7477d51305
3
Grow.c
3
Grow.c
|
@ -1891,7 +1891,8 @@ static int reshape_array(char *container, int fd, char *devname,
|
||||||
sync_metadata(st);
|
sync_metadata(st);
|
||||||
|
|
||||||
if (info->array.chunk_size == info->new_chunk &&
|
if (info->array.chunk_size == info->new_chunk &&
|
||||||
reshape.before.layout == reshape.after.layout) {
|
reshape.before.layout == reshape.after.layout &&
|
||||||
|
st->ss->external == 0) {
|
||||||
array.raid_disks = reshape.after.data_disks + reshape.parity;
|
array.raid_disks = reshape.after.data_disks + reshape.parity;
|
||||||
if (ioctl(fd, SET_ARRAY_INFO, &array) != 0) {
|
if (ioctl(fd, SET_ARRAY_INFO, &array) != 0) {
|
||||||
int err = errno;
|
int err = errno;
|
||||||
|
|
Loading…
Reference in New Issue