Re: [Qemu-devel] [PATCH v1 03/13] qcow2: do not COW the empty areas

2017-05-23 Thread Denis V. Lunev
On 05/22/2017 10:24 PM, Eric Blake wrote: > On 05/19/2017 04:34 AM, Anton Nefedov wrote: >> If COW area of the newly allocated cluster is zeroes, there is no reason >> to write zero sectors in perform_cow() again now as whole clusters are >> zeroed out in single chunks by handle_alloc_space(). >

Re: [Qemu-devel] [PATCH v1 03/13] qcow2: do not COW the empty areas

2017-05-23 Thread Anton Nefedov
On 05/22/2017 10:24 PM, Eric Blake wrote: On 05/19/2017 04:34 AM, Anton Nefedov wrote: If COW area of the newly allocated cluster is zeroes, there is no reason to write zero sectors in perform_cow() again now as whole clusters are zeroed out in single chunks by handle_alloc_space(). But

Re: [Qemu-devel] [PATCH v1 03/13] qcow2: do not COW the empty areas

2017-05-22 Thread Eric Blake
On 05/19/2017 04:34 AM, Anton Nefedov wrote: > If COW area of the newly allocated cluster is zeroes, there is no reason > to write zero sectors in perform_cow() again now as whole clusters are > zeroed out in single chunks by handle_alloc_space(). But that's only true if you can guarantee that

[Qemu-devel] [PATCH v1 03/13] qcow2: do not COW the empty areas

2017-05-19 Thread Anton Nefedov
If COW area of the newly allocated cluster is zeroes, there is no reason to write zero sectors in perform_cow() again now as whole clusters are zeroed out in single chunks by handle_alloc_space(). Introduce QCowL2Meta field "reduced", since the existing fields (offset and nb_bytes) still has to