qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file
Date: Tue, 28 Aug 2012 15:38:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 28.08.2012 15:25, schrieb Paolo Bonzini:
> Il 28/08/2012 15:04, Stefan Hajnoczi ha scritto:
>> Zero writes have cluster granularity in QED.  Therefore they can only be
>> used to zero entire clusters.
>>
>> If the zero write request leaves sectors untouched, zeroing the entire
>> cluster would obscure the backing file.  Instead return -ENOTSUP, which
>> is handled by block.c:bdrv_co_do_write_zeroes() and falls back to a
>> regular write.
>>
>> The qemu-iotests 034 test cases covers this scenario.
> 
> Reviewed-by: Paolo Bonzini <address@hidden>

Thanks, applied to the block branch.

> Makes sense since both streaming and copy-on-read will do cluster-aligned 
> writes.
> 
> The "right fix" would not be much more complex though, something like this, 
> right?
> (untested).

I think Stefan's fix is the right one. It does the same thing as yours
and it's much simpler.

Kevin



reply via email to

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