From: NeilBrown Date: Mon, 20 Aug 2012 02:34:28 +0000 (+1000) Subject: mapfile: fix mapfile rebuild for containers X-Git-Tag: mdadm-3.3-rc1~230 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a74e5731ba8c32f74c60e45c244735d602d14dca;p=thirdparty%2Fmdadm.git 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 --- diff --git a/mapfile.c b/mapfile.c index fa238832..6712733f 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 = xmalloc(sizeof(*info)); + st->ss->getinfo_super(st, info, NULL); + } if (!info) continue;