[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH] block/mirror: enable detect zeroes

From: Kevin Wolf
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block/mirror: enable detect zeroes when driving mirror
Date: Mon, 21 Nov 2016 12:34:36 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 21.11.2016 um 02:24 hat Yang Wei geschrieben:
> In order to preserve sparse disk image, detect_zeroes
> should also be enabled when bdrv_get_block_status_above()
> Signed-off-by: Yang Wei <address@hidden>

Just preserving sparseness is exactly why bdrv_get_block_status_above()
is checked, and this happens always.

detect_zeroes does not preserve sparseness, but detect zeroes in parts
of the source image that are not sparse, and make them sparse in the
target image. This means that it has higher overhead (because all
sectors need to be processed before copying them) and doesn't result in
an exact copy. There may be cases where this is wanted, but in the
common case, it's probably not the right mode of operation.

If you really want to detect zeroes, create the target block driver node
manually (with detect-zeroes=on) and use the blockdev-mirror QMP command
to mirror to it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]