[Qemu-devel] Re: [PATCH 13/13] blockdev: New -blockdev to define a host block device

2010-06-10 Thread Paolo Bonzini

On 06/10/2010 06:32 PM, Markus Armbruster wrote:

I understand why that's the most sensible cache setting.  But if the
user explicitly asks for something else, I think we better give it to
him, or tell him no.  Ignoring him silently isn't nice.


Ah, it's clearer now...

I guess one could use cache=something together with snapshot to do 
benchmarking.  Actually the same changes in behavior (unsafe as default, 
but observe a non-default value) can be done to -drive ...,snapshot too. 
 Maybe I'll give it a shot.


Paolo



[Qemu-devel] Re: [PATCH 13/13] blockdev: New -blockdev to define a host block device

2010-06-10 Thread Markus Armbruster
Paolo Bonzini  writes:

> On 06/02/2010 06:55 PM, Markus Armbruster wrote:
>> * Like -drive, -blockdev ignores cache= silently when snapshot=on.  Do
>>we really want that?
>
> Yes, the changes are throw-away by definition.  Might as well use
> cache=unsafe.

I understand why that's the most sensible cache setting.  But if the
user explicitly asks for something else, I think we better give it to
him, or tell him no.  Ignoring him silently isn't nice.

>> +if (snapshot) {
>> +/* always use write-back with snapshot */
>> +/* FIXME ignores explicit cache= *silently*; really want that? */
>> +flags &= ~BDRV_O_CACHE_MASK;
>> +flags |= (BDRV_O_SNAPSHOT | BDRV_O_CACHE_WB);
>> +flags |= BDRV_O_SNAPSHOT;
>
> Cut and paste?

Pasto indeed, will fix.  Thanks!



[Qemu-devel] Re: [PATCH 13/13] blockdev: New -blockdev to define a host block device

2010-06-10 Thread Paolo Bonzini

On 06/02/2010 06:55 PM, Markus Armbruster wrote:

* Like -drive, -blockdev ignores cache= silently when snapshot=on.  Do
   we really want that?


Yes, the changes are throw-away by definition.  Might as well use 
cache=unsafe.



+if (snapshot) {
+/* always use write-back with snapshot */
+/* FIXME ignores explicit cache= *silently*; really want that? */
+flags &= ~BDRV_O_CACHE_MASK;
+flags |= (BDRV_O_SNAPSHOT | BDRV_O_CACHE_WB);
+flags |= BDRV_O_SNAPSHOT;


Cut and paste?

Paolo