summaryrefslogtreecommitdiffstats
path: root/super1.c
diff options
context:
space:
mode:
authormartin f. krafft <madduck@debian.org>2010-05-28 14:12:41 +0200
committerNeilBrown <neilb@suse.de>2010-05-31 12:52:37 +1000
commit26f467a9548dcebe07d576deb6ceb02b947eaecc (patch)
treeb3ab159f6a3875b9af96733a61c30f641d961a2c /super1.c
parent5082750467726d7cad6059ee8a41713da23426d3 (diff)
downloadmdadm-26f467a9548dcebe07d576deb6ceb02b947eaecc.tar.gz
mdadm-26f467a9548dcebe07d576deb6ceb02b947eaecc.tar.xz
mdadm-26f467a9548dcebe07d576deb6ceb02b947eaecc.zip
Compile-time switch to enable 0.9 metadata as default
This commit introduces DEFAULT_OLD_METADATA as a preprocessor definition. If defined, it causes mdadm to assume metadata version 0.9 as default. If not defined, version 1.x (currently 1.2) is used as default. The man page mdadm.8 is also modified to reflect the chosen default. The selftests will not work if the old default is chosen. This patch was requested by Debian so they could distribute a current mdadm together with boot loaders that only understand 0.90 metadata for md-raid. Preferred usage is simply make DEFAULT_OLD_METADATA=yes Signed-off-by: martin f. krafft <madduck@debian.org> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/super1.c b/super1.c
index 8fa0745..216690d 100644
--- a/super1.c
+++ b/super1.c
@@ -1381,7 +1381,9 @@ static struct supertype *match_metadata_desc1(char *arg)
return st;
}
if (strcmp(arg, "1.2") == 0 ||
+#ifndef DEFAULT_OLD_METADATA /* ifdef in super0.c */
strcmp(arg, "default") == 0 ||
+#endif /* DEFAULT_OLD_METADATA */
strcmp(arg, "1.02") == 0) {
st->minor_version = 2;
return st;