|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [4367] Align file accesses with cache=off (Kevin Wolf, Laurent Vivier) |
Date: | Tue, 06 May 2008 17:33:09 -0500 |
User-agent: | Thunderbird 2.0.0.12 (X11/20080227) |
Fabrice Bellard wrote:
A note: in order to avoid uncontrolled recursions, it is better to call the read/write AIO callback outside the aio_read/write (see bdrv_aio_read_em). Personally I would not trust the OS to correctly handle the mix of O_DIRECT and buffered operations, especially if the corresponding file regions intersect !
Indeed, why not just allocate a temporary buffer and realign the access such that it's correct? If that involves doing a read first then a write, so be it.
Messing with file flags is very dangerous as there may be a request in-flight already in a different thread. I don't think this patch is safe at all.
Regards, Anthony Liguori
Fabrice. Blue Swirl wrote:Revision: 4367 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4367 Author: blueswir1 Date: 2008-05-06 17:26:59 +0000 (Tue, 06 May 2008) Log Message: ----------- Align file accesses with cache=off (Kevin Wolf, Laurent Vivier) Modified Paths: -------------- trunk/block-raw-posix.c [...]
[Prev in Thread] | Current Thread | [Next in Thread] |