Hi,
write(4,
"bitm\4\0\0\0~\332I'%L\33n\363\303\24J\237AY\322\267\252J\0\0\0\0\0"...,
2560) = -1 EINVAL (Invalid argument)
This mdadm version has a problem of opening the device with O_DIRECT,
but then using an unaligned buffer for write().
Your strace doesn't contain the open() command for fd=4, so please
look earlier in your strace to confirm the O_DIRECT part. Also,
confirm that this write that returns EINVAL uses an unaligned buffer.
Once you confirmed these, grab mdadm 3.2.4 or the following commit:
6ef8905 super1: make aread/awrite always use an aligned buffer.
Thanks,
Alex.