diff options
author | NeilBrown <neilb@suse.de> | 2011-05-10 09:35:41 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-05-10 09:35:41 +0200 |
commit | a252c078142d938b716f8c8e9c5866bedb630a18 (patch) | |
tree | becccd055127d4e201da118e103615653354cda6 /Create.c | |
parent | Give suitable error for mdadm /dev/md0 --stop (diff) | |
download | mdadm-a252c078142d938b716f8c8e9c5866bedb630a18.tar.xz mdadm-a252c078142d938b716f8c8e9c5866bedb630a18.zip |
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 '')
-rw-r--r-- | Create.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -930,6 +930,10 @@ int Create(struct supertype *st, char *mddev, if (ioctl(mdfd, RUN_ARRAY, ¶m)) { fprintf(stderr, Name ": RUN_ARRAY failed: %s\n", strerror(errno)); + if (info.array.chunk_size & (info.array.chunk_size-1)) { + fprintf(stderr, " : Problem may be that " + "chunk size is not a power of 2\n"); + } ioctl(mdfd, STOP_ARRAY, NULL); goto abort; } |