summaryrefslogtreecommitdiffstats
path: root/Create.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-05-15 16:48:14 +1000
committerNeil Brown <neilb@suse.de>2008-05-15 16:48:14 +1000
commita322f70c41a1c381e19b1913b8ad2a8b77078800 (patch)
tree8bc0b5968ad74979e6248d5a8ff7a0ed0f8cefbc /Create.c
parentd03373f1deea242eaacfab6b2b0c4afc6d7702d2 (diff)
downloadmdadm-a322f70c41a1c381e19b1913b8ad2a8b77078800.tar.gz
mdadm-a322f70c41a1c381e19b1913b8ad2a8b77078800.tar.xz
mdadm-a322f70c41a1c381e19b1913b8ad2a8b77078800.zip
Initial DDF support code.
Create a ddf array by naming the device /dev/ddf* or specifying metadata 'ddf'. If ddf is specified with no level, assume a container (indeed, anything else would be wrong). **Need to use text_Version to set external metadata... More ddf support Load a ddf container. Now --examine /dev/ddf works. super-ddf: fix compile warning From: Dan Williams <dan.j.williams@intel.com> super-ddf.c:723: format %lu expects type long unsigned int, but argument 3 has type unsigned int Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Create.c')
-rw-r--r--Create.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Create.c b/Create.c
index 6e58b53..1099dcb 100644
--- a/Create.c
+++ b/Create.c
@@ -93,6 +93,14 @@ int Create(struct supertype *st, char *mddev, int mdfd,
}
}
if (level == UnSet) {
+ /* "ddf" metadata only supports one level - should possibly
+ * push this into metadata handler??
+ */
+ if (st && st->ss == &super_ddf)
+ level = LEVEL_CONTAINER;
+ }
+
+ if (level == UnSet) {
fprintf(stderr,
Name ": a RAID level is needed to create an array.\n");
return 1;