c56de49a0b
find-free-devnum.fix mapfile-rebuild.fix udev-offroot Fix various issues will installation on IMSM RAID arrays, booting from those arrays, and clean shutdown when such an array is used for '/'. (bnc#752107 bnc#732294 bnc#770351) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=69
30 lines
821 B
Plaintext
30 lines
821 B
Plaintext
From a74e5731ba8c32f74c60e45c244735d602d14dca Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Mon, 20 Aug 2012 12:34:28 +1000
|
|
Subject: [PATCH] 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>
|
|
|
|
diff --git a/mapfile.c b/mapfile.c
|
|
index fa23883..6712733 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;
|
|
|