]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Make text_version available to reshape_array for subarray processing.
authorMarcin Labun <marcin.labun@intel.com>
Wed, 12 Jan 2011 06:11:56 +0000 (17:11 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 12 Jan 2011 06:11:56 +0000 (17:11 +1100)
reshape_array uses text_version to reload the container content,
so make sure it is available.

Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index 0bf6d7673b0222f67b445b2df5f710fed844e45e..b3edbc5928f1fa25b1a50983fd0f3a2277563570 100644 (file)
--- 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;