On Mon, 02/24 12:51, Paolo Bonzini wrote: > 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. :) >
I see. I could only tell in VMDK cluster doesn't have this "mapped and zeroed" state, so maybe we need some flexibility here and reduce assumption. Fam