diff options
author | NeilBrown <neilb@suse.de> | 2013-03-05 00:36:21 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-03-05 00:36:21 +0100 |
commit | 748952f73e34f9963ea82347f4d71d67dcb1096a (patch) | |
tree | 2a8fba749f92eb275fee410f1b54ad5fabf7f0b7 /Create.c | |
parent | Enhance incremental removal. (diff) | |
download | mdadm-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.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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", |