From: NeilBrown Date: Wed, 15 Aug 2012 00:07:26 +0000 (+1000) Subject: ddf: hack to fix container recognition. X-Git-Tag: mdadm-3.3-rc1~234 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=542ef4ece49ec1b18154fc8e850cdecf1c1fdb98;p=thirdparty%2Fmdadm.git ddf: hack to fix container recognition. When adding a spare to a DDF there is some confusion about the 'level' of the container. It is reported by kernel as unknown -1000000. I don't know why this broke but until I figure out why and fix it, this hack gets us going again. Signed-off-by: NeilBrown --- diff --git a/super-ddf.c b/super-ddf.c index ca517e39..14a8e3b1 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -2609,6 +2609,7 @@ static int validate_geometry_ddf(struct supertype *st, if (chunk && *chunk == UnSet) *chunk = DEFAULT_CHUNK; + if (level == -1000000) level = LEVEL_CONTAINER; if (level == LEVEL_CONTAINER) { /* Must be a fresh device to add to a container */ return validate_geometry_ddf_container(st, level, layout,