From: Marcin Labun Date: Wed, 12 Jan 2011 06:11:56 +0000 (+1100) Subject: Make text_version available to reshape_array for subarray processing. X-Git-Tag: mdadm-3.2~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fa436ace267a11708b235593dca48a028fc6453;p=thirdparty%2Fmdadm.git Make text_version available to reshape_array for subarray processing. reshape_array uses text_version to reload the container content, so make sure it is available. Signed-off-by: Marcin Labun Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index 0bf6d767..b3edbc59 100644 --- a/Grow.c +++ b/Grow.c @@ -1379,8 +1379,9 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, return 1; } - sra = sysfs_read(fd, 0, GET_LEVEL | GET_DISKS | GET_DEVS | GET_STATE); - if (sra) { + sra = sysfs_read(fd, 0, GET_LEVEL | GET_DISKS | GET_DEVS + | GET_STATE | GET_VERSION); + if (sra) { if (st->ss->external && subarray == NULL) { array.level = LEVEL_CONTAINER; sra->array.level = LEVEL_CONTAINER; @@ -1470,6 +1471,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, info.array = array; sysfs_init(&info, fd, NoMdDev); + strcpy(info.text_version, sra->text_version); info.component_size = size*2; info.new_level = level; info.new_chunk = chunksize * 1024;