From 0fb69d1dae8851316bee2a7c0b4ca557de7273ee Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 22 Nov 2010 20:58:06 +1100 Subject: [PATCH] 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 --- Create.c | 10 +++++----- Manage.c | 2 +- mdmon.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Create.c b/Create.c index b9fe799..9a0ac42 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 f0b197c..fa300c7 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 4936260..f56e57f 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);