Replace various load_super calls with load_container

When we call load_super expecting to find a container, we now
just call load_container directly.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-11-22 20:58:06 +11:00
parent 5083d66b9c
commit 0fb69d1dae
3 changed files with 7 additions and 7 deletions

View File

@ -169,15 +169,15 @@ int Create(struct supertype *st, char *mddev,
inf.raid_disks == 0) {
/* yep, looks like a container */
if (st) {
rv = st->ss->load_super(st, fd,
devlist->devname);
rv = st->ss->load_container(st, fd,
devlist->devname);
if (rv == 0)
have_container = 1;
} else {
st = guess_super(fd);
st = super_by_fd(fd, NULL);
if (st && !(rv = st->ss->
load_super(st, fd,
devlist->devname)))
load_container(st, fd,
devlist->devname)))
have_container = 1;
else
st = NULL;

View File

@ -609,7 +609,7 @@ int Manage_subdevs(char *devname, int fd,
if (tst->sb)
/* already loaded */;
else if (tst->ss->external) {
tst->ss->load_super(tst, fd, NULL);
tst->ss->load_container(tst, fd, NULL);
} else for (j = 0; j < tst->max_devs; j++) {
char *dev;
int dfd;

View File

@ -468,7 +468,7 @@ static int mdmon(char *devname, int devnum, int must_fork, int takeover)
}
close(victim_sock);
}
if (container->ss->load_super(container, mdfd, devname)) {
if (container->ss->load_container(container, mdfd, devname)) {
fprintf(stderr, "mdmon: Cannot load metadata for %s\n",
devname);
exit(3);