Subject: [PATCH] mdadm: raid0: support chunks of 4K*n for raid0

raz ben yehuda
2009-05-14T17:12:11Z

Neil.
I do not know what is policy for mdadm patches. I would thankful for some instructions.
The bellow is the patch I applied to support raid0 chunk sizes 4K*n.
---
--- mdadm.c (revision 16152)
+++ mdadm.c (working copy)
@@ -314,7 +314,8 @@
exit(2);
}
chunk = strtol(optarg, &c, 10);
- if (!optarg[0] || *c || chunk<4 || (chunk%4)) {
+ if (!optarg[0] || *c || chunk<4 || (((chunk-1)&chunk) && level !=0)
+ || (((chunk%4) && level ==0) )) {
fprintf(stderr, Name ": invalid chunk/rounding value: %s\n",
optarg);
exit(2);