For metadatas that container operation requires set of arrays operations for 2nd (and next) arrays in raid0 case reshape_array() is executed before array is monitored and before metadat update is stored, because in such case mdmon updates metadata via set_array_state(). for such cases some of parameters (i.e. delta_disks) should be used from input parameters, instead from metadata. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Grow.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/Grow.c b/Grow.c index c88df1b..4d12eda 100644 --- a/Grow.c +++ b/Grow.c @@ -2128,6 +2128,7 @@ int reshape_container(char *container, int cfd, char *devname, { struct mdinfo *cc; struct mdinfo *cc_fresh = NULL; + int delta_disks = 0; if (reshape_super(st, info->component_size, info->new_level, info->new_layout, info->new_chunk, @@ -2184,6 +2185,10 @@ int reshape_container(char *container, int cfd, char *devname, sysfs_free(cc_fresh); st->ss->load_container(st, cfd, NULL); cc_fresh = st->ss->container_content(st, subarray); + if (delta_disks && cc_fresh->array.level == 0) { + cc_fresh->delta_disks = delta_disks; + } else + delta_disks = cc_fresh->delta_disks; rv = reshape_array(container, fd, adev, st, cc_fresh, force, backup_file, quiet, 1); -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html