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 <pbonz...@redhat.com>
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