[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_D
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT) |
Date: |
Wed, 21 May 2008 02:04:33 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Anthony Liguori wrote:
> Paul Brook wrote:
> >>When sector-aligned guest offsets are converted to sector-unaligned
> >>writes (e.g. due to qcow2 etc.), that property is no longer satisfied,
> >>and power failure of the host disk can cause more damage than the
> >>guest is designed to be resistant to.
> >>
> >
> >Seems like the easiest solution would be to have qcow always align its
> >writes.
> >We don't do on the fly compression, so it should be fairly easy to make
> >this happen with minimal overhead.
> >
>
> That's not sufficient. O_DIRECT imposes not only offset alignment
> requirements but also requirements on the buffer being read to. Most of
> the code in QEMU does not properly align the read/write buffers.
The offset when reading is not so important. And of course, can't be
guaranteed with qcow2 - as the sector being read may be compressed.
For writing, if the memory isn't suitably aligned for the
_transformed_ offset, you can either transform it differently, or copy
the memory to somewhere with the right offset first.
-- Jamie
- [Qemu-devel] [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Laurent Vivier, 2008/05/20
- Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Paul Brook, 2008/05/20
- Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Anthony Liguori, 2008/05/20
- Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Kevin Wolf, 2008/05/21
- Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Jamie Lokier, 2008/05/21
- Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Avi Kivity, 2008/05/21
- Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Jamie Lokier, 2008/05/21
- Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Anthony Liguori, 2008/05/21
- Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT), Avi Kivity, 2008/05/21