Sorry for the multiple posts, am thinking about this problem in between working on other stuff... and stuff comes up.
But bottom line -- I would look at the source of coreutils "dd" program and find out how they do direct I/O. I know they had to deal with alignment issues when the Linux kernel became alignment sensitive. So I'd see how they did things and make sure I had the same checks and bounds on my buffers. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html