summaryrefslogtreecommitdiff
path: root/Build.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-05-10 17:35:41 +1000
committerNeilBrown <neilb@suse.de>2011-05-10 17:35:41 +1000
commita252c078142d938b716f8c8e9c5866bedb630a18 (patch)
treebecccd055127d4e201da118e103615653354cda6 /Build.c
parentdec18cae724516353ef911f5bed6c3bfee5845f1 (diff)
Create: allow chunksize to be non-power-of-2.
RAID0 has accepted chunksizes that are not a power of 2 since 2.6.30. So it time mdadm allowed that to be used. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Build.c')
-rw-r--r--Build.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Build.c b/Build.c
index cb9f01e3..4338e190 100644
--- a/Build.c
+++ b/Build.c
@@ -254,6 +254,10 @@ int Build(char *mddev, int chunk, int level, int layout,
if (ioctl(mdfd, RUN_ARRAY, &param)) {
fprintf(stderr, Name ": RUN_ARRAY failed: %s\n",
strerror(errno));
+ if (chunk & (chunk-1)) {
+ fprintf(stderr, " : Problem may be that chunk size"
+ " is not a power of 2\n");
+ }
goto abort;
}
} else {