summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-06-02 05:33:40 +0000
committerNeil Brown <neilb@suse.de>2006-06-02 05:33:40 +0000
commit058574b1da29e875104043fe6ea5ff5cfb81ebd0 (patch)
treefc12fbcbc7f5bfa8a2019d8d865417b317aa6a3f /config.c
parent1d1e104b0dee92f91e6b5037661a17f48748e934 (diff)
downloadmdadm-058574b1da29e875104043fe6ea5ff5cfb81ebd0.tar.gz
mdadm-058574b1da29e875104043fe6ea5ff5cfb81ebd0.tar.xz
mdadm-058574b1da29e875104043fe6ea5ff5cfb81ebd0.zip
Allow default metadata to be specified in mdadm.conf
CREATE metadata=1 in mdadm.conf will cause version-1 superblocks to be the default. Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/config.c b/config.c
index 5accf15..20dc725 100644
--- a/config.c
+++ b/config.c
@@ -354,6 +354,16 @@ static void createline(char *line)
fprintf(stderr, Name ": unrecognised CREATE mode %s\n",
w+5);
}
+ } else if (strncasecmp(w, "metadata=", 9) == 0) {
+ /* style of metadata to use by default */
+ int i;
+ for (i=0; superlist[i] && !createinfo.supertype; i++)
+ createinfo.supertype =
+ superlist[i]->match_metadata_desc(w+9);
+ if (!createinfo.supertype)
+ fprintf(stderr, Name ": metadata format %s unknown, ignoring\n",
+ w+9);
+
} else {
fprintf(stderr, Name ": unrecognised word on CREATE line: %s\n",
w);