[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive |
Date: |
Wed, 12 May 2010 17:36:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 |
Am 12.05.2010 17:05, schrieb Alexander Graf:
> Kevin Wolf wrote:
>> Am 10.05.2010 23:51, schrieb Alexander Graf:
>>
>>> 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 parameter to -drive that allows us to set the flushing
>>> behavior to "on" or "off", defaulting to enabling the guest to flush.
>>>
>>> Signed-off-by: Alexander Graf <address@hidden>
>>>
>>
>> What about another cache=... value instead of adding more options? I'm
>> quite sure you'll only ever need this with writeback caching. So we
>> could have cache=none|writethrough|writeback|wb-noflush or something
>> like that.
>>
>>
>
> Yes, cache=volatile seems reasonable. Or cache=unsafe.
>
>>> ---
>>> block/raw-posix.c | 13 +++++++++++++
>>>
>>
>> This is obviously wrong. If you want to introduce new behaviour to the
>> block layer, you must do it consistently and not just for one block
>> driver. So these changes should be made to the generic functions in
>> block.c instead.
>>
>
> How so? The callback functions are called using bdrv->drv->xxx. If I
> modify that pointer, I end up affecting all other virtual disks as well.
By doing the check in bdrv_flush/bdrv_aio_flush before this function
pointer is even called.
Kevin
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, (continued)
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Jamie Lokier, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Paul Brook, 2010/05/11
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Jamie Lokier, 2010/05/12
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Christoph Hellwig, 2010/05/17
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Markus Armbruster, 2010/05/14
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Christoph Hellwig, 2010/05/17
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Alexander Graf, 2010/05/17
- Re: [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Avi Kivity, 2010/05/11
- [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Alexander Graf, 2010/05/12
- [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive,
Kevin Wolf <=
- [Qemu-devel] Re: [PATCH 2/2] Add flush=off parameter to -drive, Alexander Graf, 2010/05/12
Re: [Qemu-devel] [PATCH 1/2] Add no-op aio emulation stub, Stefan Hajnoczi, 2010/05/11
[Qemu-devel] Re: [PATCH 1/2] Add no-op aio emulation stub, Kevin Wolf, 2010/05/11
Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush, Anthony Liguori, 2010/05/10
- Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush, Alexander Graf, 2010/05/10
- Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush, Anthony Liguori, 2010/05/10
- Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush, Jamie Lokier, 2010/05/11
- Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush, Stefan Hajnoczi, 2010/05/12
- Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush, Jamie Lokier, 2010/05/12
- Re: [Qemu-devel] [PATCH 0/2] Enable qemu block layer to not flush, Stefan Hajnoczi, 2010/05/12