From: NeilBrown Date: Mon, 22 Nov 2010 09:58:06 +0000 (+1100) Subject: Replace various load_super calls with load_container X-Git-Tag: mdadm-3.2~278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fb69d1dae8851316bee2a7c0b4ca557de7273ee;p=thirdparty%2Fmdadm.git 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 --- diff --git a/Create.c b/Create.c index b9fe7998..9a0ac426 100644 --- a/Create.c +++ b/Create.c @@ -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; diff --git a/Manage.c b/Manage.c index f0b197c5..fa300c74 100644 --- a/Manage.c +++ b/Manage.c @@ -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; diff --git a/mdmon.c b/mdmon.c index 49362606..f56e57f3 100644 --- a/mdmon.c +++ b/mdmon.c @@ -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);