]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
FIX: Use sysfs to change array parameters
authorAdam Kwolek <adam.kwolek@intel.com>
Thu, 6 Jan 2011 07:29:03 +0000 (18:29 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 6 Jan 2011 07:29:03 +0000 (18:29 +1100)
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>
Grow.c

diff --git a/Grow.c b/Grow.c
index 66b8efb558cc53e8ee4e30abc4ff1b5937464fe8..36bb7de4e9f2b27d14016baa55c690c10dd1842b 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -1891,7 +1891,8 @@ static int reshape_array(char *container, int fd, char *devname,
        sync_metadata(st);
 
        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;
                if (ioctl(fd, SET_ARRAY_INFO, &array) != 0) {
                        int err = errno;