Il 24/02/2014 12:33, Fam Zheng ha scritto:
> This is (or should be) bdrv_co_write_zeroes without BDRV_REQ_MAY_UNMAP.

But IIUC bdrv_co_write_zeroes without BDRV_REQ_MAY_UNMAP doesn't require
cluster allocation if it's allocated yet, which is a bit different.

Yeah, that's why I wrote "or should be". Those are the intended semantics of bdrv_co_write_zeroes without BDRV_REQ_MAY_UNMAP: always allocate a cluster that will read as zeroes (allocating even if it does not necessarily write the zeroes).

For legacy reasons it may not be exactly what is implemented. I asked Kevin a couple of weeks ago and he sent a patch, but even he wasn't sure of what qcow2 was doing util he looked at the code. :)

Paolo

Reply via email to