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

2019-01-08 Thread Alberto Garcia
On Tue 18 Dec 2018 08:57:45 AM CET, Anton Nefedov wrote: > @@ -2126,24 +2202,33 @@ static coroutine_fn int > qcow2_co_pwritev(BlockDriverState *bs, uint64_t offset, > goto fail; > } > > +qemu_co_mutex_unlock(>lock); > + > +ret = handle_alloc_space(bs,

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

2018-12-24 Thread Vladimir Sementsov-Ogievskiy
24.12.2018 11:21, Anton Nefedov wrote: > On 21/12/2018 7:16 PM, Vladimir Sementsov-Ogievskiy wrote: >> 18.12.2018 10:57, 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

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

2018-12-24 Thread Anton Nefedov
On 21/12/2018 7:16 PM, Vladimir Sementsov-Ogievskiy wrote: > 18.12.2018 10:57, 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-devel] [PATCH v11 09/10] qcow2: skip writing zero buffers to empty COW areas

2018-12-21 Thread Vladimir Sementsov-Ogievskiy
18.12.2018 10:57, 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(). > > iotest 060: > write

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

2018-12-18 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