qcow2: skip writing zero buffers to empty COW areas
If COW areas of the newly allocated clusters are zeroes on the backing image, efficient bdrv_write_zeroes(flags=BDRV_REQ_NO_FALLBACK) 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 <anton.nefedov@virtuozzo.com> Message-id: 20190516142749.81019-2-anton.nefedov@virtuozzo.com Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Alberto Garcia <berto@igalia.com> Signed-off-by:
Max Reitz <mreitz@redhat.com>
Showing
- block/qcow2-cluster.c 1 addition, 1 deletionblock/qcow2-cluster.c
- block/qcow2.c 85 additions, 0 deletionsblock/qcow2.c
- block/qcow2.h 6 additions, 0 deletionsblock/qcow2.h
- block/trace-events 1 addition, 0 deletionsblock/trace-events
- qapi/block-core.json 3 additions, 1 deletionqapi/block-core.json
- tests/qemu-iotests/060 6 additions, 1 deletiontests/qemu-iotests/060
- tests/qemu-iotests/060.out 4 additions, 1 deletiontests/qemu-iotests/060.out
Loading
Please register or sign in to comment