qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIREC


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT)
Date: Tue, 20 May 2008 14:47:05 -0500
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Laurent Vivier wrote:
This patch is the original patch from Kevin Wolf modified according
comments given on the qemu-devel Mailing list.

Original Description:

"In December a patch was applied which introduced the cache=off option
to -drive. When using this option files are opened with the O_DIRECT
flag.
This means that all accesses have to be aligned. The patch made a couple
of changes in this respect, still in other places they are missing (e.g.
you can't use cache=off with qcow(2) files).

This patch implements wrappers for raw_pread and raw_pwrite which align
all file accesses and make qcow(2) work with cache=off. This method
might not be the most performant one (compared to fixing qcow, qcow2 and
everything else that might be using unaligned accesses), but unaligned
accesses don't happen that frequently and with this patch really all
image accesses should be covered."

Modifications:

- Kevin has modified his patch to call the read/write AIO callback
outside the aio_read/write
- I've modified the buffer management to allocate buffer on open and not
on each read/write.

As mentioned by Kevin, this patch is really needed to be able to manage
all disk images with "cache=off" option, so pleeeaaaase, apply (or
comment...)

A la GIT:

Signed-off-by: Kevin Wolf <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>

Looks better to me.

Acked-by: Anthony Liguori <address@hidden>

Regads,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]