FIX: Cannot load container information

When container is passed to grow_reshape(), load_container() function
has to be used to get all required information from metadata.
So load_super is never correct here - in particular, cfd is a
'container fd' so we must 'load_container' on it.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-01-13 10:15:54 +11:00 committed by NeilBrown
parent 819bc6345e
commit eb744788d1
1 changed files with 2 additions and 4 deletions

6
Grow.c
View File

@ -1351,10 +1351,8 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
fmt_devname(container_buf, container_dev);
container = container_buf;
if (subarray)
rv = st->ss->load_container(st, cfd, NULL);
else
rv = st->ss->load_super(st, cfd, NULL);
rv = st->ss->load_container(st, cfd, NULL);
if (rv) {
fprintf(stderr, Name ": Cannot read superblock for %s\n",
devname);