[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug? qemu-img convert to preallocated image makes it sparse
From: |
Max Reitz |
Subject: |
Re: Bug? qemu-img convert to preallocated image makes it sparse |
Date: |
Thu, 16 Jan 2020 17:02:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 |
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
signature.asc
Description: OpenPGP digital signature
Re: Bug? qemu-img convert to preallocated image makes it sparse, David Edmondson, 2020/01/17
Re: Bug? qemu-img convert to preallocated image makes it sparse, Max Reitz, 2020/01/16