summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-09-27 16:57:09 +1000
committerNeilBrown <neilb@suse.de>2012-09-27 16:57:09 +1000
commitc5d61cac12624eed78e783a6b8eda3a06374be08 (patch)
treefcdef2ee2ef4cc172a60425f7164ecead9cfe4f4
parent3a84db51a7ea0caf4bd5ca947f53f6156bdd6b2b (diff)
downloadmdadm-c5d61cac12624eed78e783a6b8eda3a06374be08.tar.gz
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 <neilb@suse.de>
-rw-r--r--super-ddf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 9ea62e0..2b0dabf 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -2629,7 +2629,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,