Re: [Qemu-devel] [PATCH v8 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-03-16 Thread Anton Nefedov
On 16/3/2018 4:58 PM, Alberto Garcia wrote: On Mon 12 Mar 2018 11:16:57 AM CET, Anton Nefedov wrote: --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2584,6 +2584,8 @@ # # @cor_write: a write due to copy-on-read (since 2.11) # +# @cluster_alloc_space: an allocation of a cluster

Re: [Qemu-devel] [PATCH v8 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-03-16 Thread Alberto Garcia
On Mon 12 Mar 2018 11:16:57 AM CET, Anton Nefedov wrote: > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -2584,6 +2584,8 @@ > # > # @cor_write: a write due to copy-on-read (since 2.11) > # > +# @cluster_alloc_space: an allocation of a cluster file space (since 2.12) That doesn't

[Qemu-devel] [PATCH v8 8/9] qcow2: skip writing zero buffers to empty COW areas

2018-03-12 Thread Anton Nefedov
If COW areas of the newly allocated clusters are zeroes on the backing image, efficient bdrv_write_zeroes(flags=BDRV_REQ_ALLOCATE) can be used on the whole cluster instead of writing explicit zero buffers later in perform_cow(). iotest 060: write to the discarded cluster does not trigger COW