]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
ddf: hack to fix container recognition.
authorNeilBrown <neilb@suse.de>
Wed, 15 Aug 2012 00:07:26 +0000 (10:07 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 15 Aug 2012 00:07:26 +0000 (10:07 +1000)
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 <neilb@suse.de>
super-ddf.c

index ca517e3942b10df01d3ce941bf78d7e8a5d88cb4..14a8e3b143158761974f1aaa4ddcd6f703f8b5cb 100644 (file)
@@ -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,