qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH] Add cache=unsafe parameter to -drive


From: Markus Armbruster
Subject: Re: [Qemu-devel] Re: [PATCH] Add cache=unsafe parameter to -drive
Date: Thu, 27 May 2010 07:42:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Anthony Liguori <address@hidden> writes:

> On 05/26/2010 10:51 AM, Alexander Graf wrote:
>> Usually the guest can tell the host to flush data to disk. In some cases we
>> don't want to flush though, but try to keep everything in cache.
>>
>> So let's add a new cache value to -drive that allows us to set the cache
>> policy to most aggressive, disabling flushes. We call this mode "unsafe",
>> as guest data is not guaranteed to survive host crashes anymore.
>>
>> This patch also adds a noop function for aio, so we can do nothing in AIO
>> fashion.
>>
>> Signed-off-by: Alexander Graf<address@hidden>
>>    
>
> I'm happy merging this for now, but I think it might make more sense
> to do this as per-device flush control qdev options since those bits
> are actually guest visible.  Christoph, does that seem reasonable?

The qdev property's default could be based on the host block device
cache option.

This is similar to how I intend to do readonly: if qdev's readonly
property is unset, match host block device's readonly option.  If qdev's
readonly property is off, host block device's must be off, too.  If it's
on, anything goes.

Some qdevs don't have a readonly property, because their readonlyness is
fixed, but that's detail.



reply via email to

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