summaryrefslogtreecommitdiffstats
path: root/super1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-11-17 13:15:34 +1100
committerNeilBrown <neilb@suse.de>2009-11-17 13:15:34 +1100
commitb8ab2a50aba72c7316d92d0fb414167844673136 (patch)
treec774854f3687f0f4a9d00e17001bf697639992ea /super1.c
parentff94fb86fd22842c06e8fad08c27a4e365d7834a (diff)
downloadmdadm-b8ab2a50aba72c7316d92d0fb414167844673136.tar.gz
mdadm-b8ab2a50aba72c7316d92d0fb414167844673136.tar.xz
mdadm-b8ab2a50aba72c7316d92d0fb414167844673136.zip
Set default bitmap-chunksize for internal bitmaps to at least 64Meg
A small bitmap-chunksize hurts performance without helping resync speed much - particularly on internal bitmaps. So set the default to at least 64Meg. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/super1.c b/super1.c
index a21e7e3..8678e9f 100644
--- a/super1.c
+++ b/super1.c
@@ -1501,9 +1501,14 @@ add_internal_bitmap1(struct supertype *st,
min_chunk *= 2;
bits = (bits+1)/2;
}
- if (chunk == UnSet)
+ if (chunk == UnSet) {
+ /* For practical purpose, 64Meg is a good
+ * default chunk size for internal bitmaps.
+ */
chunk = min_chunk;
- else if (chunk < min_chunk)
+ if (chunk < 64*1024*1024)
+ chunk = 64*1024*1024;
+ } else if (chunk < min_chunk)
return 0; /* chunk size too small */
if (chunk == 0) /* rounding problem */
return 0;