summaryrefslogtreecommitdiffstats
path: root/Create.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-03-05 00:36:21 +0100
committerNeilBrown <neilb@suse.de>2013-03-05 00:36:21 +0100
commit748952f73e34f9963ea82347f4d71d67dcb1096a (patch)
tree2a8fba749f92eb275fee410f1b54ad5fabf7f0b7 /Create.c
parentEnhance incremental removal. (diff)
downloadmdadm-748952f73e34f9963ea82347f4d71d67dcb1096a.tar.xz
mdadm-748952f73e34f9963ea82347f4d71d67dcb1096a.zip
Create: default to bitmap=internal for large arrays.
Here, "large" means components are 100G or more. It is usually beneficial to have write-intent bitmaps on such arrays. They can be suppressed with --bitmap=none Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Create.c')
-rw-r--r--Create.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Create.c b/Create.c
index a4aab41f..b7e4c2ea 100644
--- a/Create.c
+++ b/Create.c
@@ -506,6 +506,17 @@ int Create(struct supertype *st, char *mddev,
pr_err("size set to %lluK\n", s->size);
}
}
+
+ if (!s->bitmap_file &&
+ s->level >= 1 &&
+ (s->write_behind || s->size > 100*1024*1024ULL)) {
+ if (c->verbose > 0)
+ pr_err("automatically enabling write-intent bitmap on large array\n");
+ s->bitmap_file = "internal";
+ }
+ if (s->bitmap_file && strcmp(s->bitmap_file, "none") == 0)
+ s->bitmap_file = NULL;
+
if (!have_container && s->level > 0 && ((maxsize-s->size)*100 > maxsize)) {
if (c->runstop != 1 || c->verbose >= 0)
pr_err("largest drive (%s) exceeds size (%lluK) by more than 1%%\n",