summaryrefslogtreecommitdiff
path: root/Create.c
diff options
context:
space:
mode:
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>2014-04-15 10:01:44 +0200
committerNeilBrown <neilb@suse.de>2014-05-01 10:14:59 +1000
commit39917e56ccbabe0b53771ea698c1284b14c62fa3 (patch)
tree4f9a162cb545270a9bcf8cc47f29faf684130945 /Create.c
parent19ad4b2cb2f95202f615af57184c702fb098c011 (diff)
Create: don't default to bitmap=internal when it is not supported
For large arrays (component size > 100GB) if write-intent bitmap is not enabled, then it is set by default to "internal", even if the metadata format does support internal bitmaps, which causes Create to fail. This patch adds checking if add_internal_bitmap is set in the superswitch before setting bitmap_file to "internal". Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Create.c')
-rw-r--r--Create.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Create.c b/Create.c
index 98bbdd40..1ab43640 100644
--- a/Create.c
+++ b/Create.c
@@ -509,6 +509,7 @@ int Create(struct supertype *st, char *mddev,
if (!s->bitmap_file &&
s->level >= 1 &&
+ st->ss->add_internal_bitmap &&
(s->write_behind || s->size > 100*1024*1024ULL)) {
if (c->verbose > 0)
pr_err("automatically enabling write-intent bitmap on large array\n");