Hi Laurent, Laurent Vivier schrieb: > But if we want too keep simplicity without memcpy(), we could only > de-activate O_DIRECT on pread() or pwrite() : You're right, this approach is simpler, better and makes the patch smaller. I've attached a new version of the patch. However, now that you've pointed me to your patch I realize that my patch might be simple but it is incomplete as well. Normal read/write operation on qcow images should work fine (only metadata is unaligned and there pread is used). Snapshots don't work though because they end up in aio requests which are not routed to raw_pread. Disabling O_DIRECT for a single aio request is impossible (after all, aio is asynchronous), and disabling it for at least one aio request is going to be ugly. So maybe we better turn O_DIRECT off for snapsnot saving/loading, even if it's not the generic fix I wanted to have when I started. I'm still undecided, though. What do you think? Kevin