[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v12 09/10] qcow2: skip writing zero buffers to e
From: |
Anton Nefedov |
Subject: |
Re: [Qemu-block] [PATCH v12 09/10] qcow2: skip writing zero buffers to empty COW areas |
Date: |
Wed, 16 Jan 2019 09:32:33 +0000 |
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 explicit zero buffers later in perform_cow().
>>
>> iotest 060:
>> write to the discarded cluster does not trigger COW anymore.
>> Use a backing image instead.
>>
>> Signed-off-by: Anton Nefedov <address@hidden>
>> Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>
> Reviewed-by: Alberto Garcia <address@hidden>
>
>> + 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 the physical space with zeroes */
ret = handle_alloc_space(bs, l2meta);
if (ret < 0) {
qemu_co_mutex_lock(&s->lock);
- [Qemu-block] [PATCH v12 00/10] qcow2: cluster space preallocation, Anton Nefedov, 2019/01/14
- [Qemu-block] [PATCH v12 10/10] iotest 134: test cluster-misaligned encrypted write, Anton Nefedov, 2019/01/14
- [Qemu-block] [PATCH v12 06/10] file-posix: reset fallocate-related flags without CONFIG_FALLOCATE*, Anton Nefedov, 2019/01/14
- [Qemu-block] [PATCH v12 02/10] blkverify: set supported write/zero flags, Anton Nefedov, 2019/01/14
- [Qemu-block] [PATCH v12 03/10] quorum: set supported write flags, Anton Nefedov, 2019/01/14
- [Qemu-block] [PATCH v12 07/10] file-posix: support BDRV_REQ_ALLOCATE, Anton Nefedov, 2019/01/14
- [Qemu-block] [PATCH v12 08/10] block: support BDRV_REQ_ALLOCATE in passthrough drivers, Anton Nefedov, 2019/01/14
- [Qemu-block] [PATCH v12 05/10] block: treat BDRV_REQ_ALLOCATE as serialising, Anton Nefedov, 2019/01/14