On 16.01.20 17:00, Richard W.M. Jones wrote:
> On Thu, Jan 16, 2020 at 05:38:03PM +0200, Maxim Levitsky wrote:
>> How about doing write zeros without discard only in this particular case 
>> (convert to existing image)
>> Basically omitting the BDRV_REQ_MAY_UNMAP flag to blk_co_pwrite_zeroes.
>> It will be slow, but maybe for this particular case, it is acceptable?
> 
> I should probably say that we don't want to break the other case
> (which is likely more important) where we write a sparse source to a
> sparse target and want the target to contain only the union of the two
> sparse maps, not fully allocated :-)
> 
> It would be fine, I think, to have a new "make this disk fully
> allocated" operation.  qemu-img resize could almost do it with a
> request to add 0 extra bytes, but the --preallocation flag only
> applies to the new space.

Well, that works with -S 0, as Kevin has said.  But that will take time
because it will write actual zeroes wherever the source is zero.

Max

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to