Re: [Qemu-block] [PATCH v12 09/10] qcow2: skip writing zero buffers to empty COW areas

2019-01-16 Thread Alberto Garcia
On Wed 16 Jan 2019 10:32:33 AM CET, Anton Nefedov wrote: >>> +ret = handle_alloc_space(bs, l2meta); >> >> I insist that it would be nice to have a short comment explaining >> what this does. > > Right sorry forgot your comment. > I'd go with: > > +/* Try to efficiently initialize

Re: [Qemu-block] [PATCH v12 09/10] qcow2: skip writing zero buffers to empty COW areas

2019-01-16 Thread Anton Nefedov
On 15/1/2019 6:27 PM, Alberto Garcia wrote: > On Mon 14 Jan 2019 12:18:30 PM CET, Anton Nefedov wrote: >> 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

Re: [Qemu-block] [PATCH v12 09/10] qcow2: skip writing zero buffers to empty COW areas

2019-01-15 Thread Alberto Garcia
On Mon 14 Jan 2019 12:18:30 PM CET, Anton Nefedov wrote: > 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(). > >

[Qemu-block] [PATCH v12 09/10] qcow2: skip writing zero buffers to empty COW areas

2019-01-14 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