summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-09-27 16:58:42 +1000
committerNeilBrown <neilb@suse.de>2012-09-27 16:58:42 +1000
commitc5c56d68ff098c10dd549a9feaa320d3db475bdd (patch)
treec4c53b61dc89a18edf00cfb3f43a1573a063e631
parent80841df260bdf76d903a9f0c296c22c8b69603d4 (diff)
downloadmdadm-c5c56d68ff098c10dd549a9feaa320d3db475bdd.tar.gz
mapfile: fix mapfile rebuild for containers
When recreating the mapfile entry for a container we need to use ->getinfo_super, not ->container_content, just like we do in Detail(). Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--mapfile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mapfile.c b/mapfile.c
index 70ff355..d416408 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -403,7 +403,12 @@ void RebuildMap(void)
close(dfd);
if (ok != 0)
continue;
- info = st->ss->container_content(st, subarray);
+ if (subarray)
+ info = st->ss->container_content(st, subarray);
+ else {
+ info = malloc(sizeof(*info));
+ st->ss->getinfo_super(st, info, NULL);
+ }
if (!info)
continue;