From: Kevin Wolf <kwolf@redhat.com>
To: Yang Wei <w90p710@gmail.com>
Cc: jcody@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block/mirror: enable detect zeroes when driving mirror
Date: Mon, 21 Nov 2016 12:34:36 +0100 [thread overview]
Message-ID: <20161121113436.GA5876@noname.redhat.com> (raw)
In-Reply-To: <20161121012439.2394-1-w90p710@gmail.com>
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()
> returns BDRV_BLOCK_DATA
>
> Signed-off-by: Yang Wei <w90p710@gmail.com>
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.
Kevin
next prev parent reply other threads:[~2016-11-21 11:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-21 1:24 [Qemu-devel] [PATCH] block/mirror: enable detect zeroes when driving mirror Yang Wei
2016-11-21 1:34 ` no-reply
2016-11-21 6:51 ` Vasiliy Tolstov
2016-11-22 2:31 ` wyang
2016-11-22 13:44 ` Eric Blake
2016-11-23 3:14 ` wyang
2016-11-21 11:34 ` Kevin Wolf [this message]
2016-11-22 3:45 ` [Qemu-devel] [Qemu-block] " wyang
2016-11-22 10:09 ` Kevin Wolf
2016-11-23 3:12 ` wyang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161121113436.GA5876@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=jcody@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=w90p710@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.