diff options
author | NeilBrown <neilb@suse.de> | 2009-11-17 03:08:55 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-11-17 03:08:55 +0100 |
commit | 5f175898dedb2bb2635d4d1dcb2afa8c420d5eae (patch) | |
tree | 8da1e54dcedb1584b8227124375d7d73b650dc1d /Create.c | |
parent | Replace all relevant occurrences of -4 with LEVEL_MULTIPATH (diff) | |
download | mdadm-5f175898dedb2bb2635d4d1dcb2afa8c420d5eae.tar.xz mdadm-5f175898dedb2bb2635d4d1dcb2afa8c420d5eae.zip |
Increase default chunk size to 512K
This seems more appropriate for current (and recent) model drives than
64K.
64K is still the default for '--build' as changing that could corrupt
data.
64K is also the default rounding for 'linear' on kernels older than
2.6.16.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Create.c')
-rw-r--r-- | Create.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -234,8 +234,15 @@ int Create(struct supertype *st, char *mddev, case 10: case 6: case 0: - case LEVEL_LINEAR: /* linear */ if (chunk == 0) { + chunk = 512; + if (verbose > 0) + fprintf(stderr, Name ": chunk size defaults to 512K\n"); + } + break; + case LEVEL_LINEAR: + /* a chunksize of zero 0s perfectly valid (and preferred) since 2.6.16 */ + if (get_linux_version() < 2006016 && chunk == 0) { chunk = 64; if (verbose > 0) fprintf(stderr, Name ": chunk size defaults to 64K\n"); |