From: Eric Blake <eblake@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Jeff Cody <jcody@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
stefanha@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 2/3] qapi: Add "detect-zeroes" option to drive-mirror
Date: Mon, 08 Jun 2015 08:21:54 -0600 [thread overview]
Message-ID: <5575A502.2000204@redhat.com> (raw)
In-Reply-To: <1433759662-25139-3-git-send-email-famz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]
On 06/08/2015 04:34 AM, Fam Zheng wrote:
> The new optional flag defaults to true, in which case, mirror job would
> check the read sectors and use sparse write if they are zero. Otherwise
> data will be fully copied.
Is that a different default than in qemu 2.3? That's okay, but I need
to figure out how to probe if qemu supports the new flag for libvirt to
know to set it. I'm hoping Markus' work on introspection might save the
day...
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> blockdev.c | 26 +++++++++++++++++++++++++-
> hmp.c | 2 +-
> qapi/block-core.json | 4 +++-
> qmp-commands.hx | 4 +++-
> 4 files changed, 32 insertions(+), 4 deletions(-)
>
> diff --git a/blockdev.c b/blockdev.c
> index 5ad6960..3d008a2 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -2622,6 +2622,7 @@ void qmp_drive_mirror(const char *device, const char *target,
> bool has_on_source_error, BlockdevOnError on_source_error,
> bool has_on_target_error, BlockdevOnError on_target_error,
> bool has_unmap, bool unmap,
> + bool has_detect_zeroes, bool detect_zeroes,
Again, as I mentioned on 1/3, I think a tri-state enum might be easier
to use than two competing bools. In fact, it might be more than
tri-state. What are our possibilities?
1. We want the dest to be fully allocated, regardless of the source
being sparse
2. We want the dest to be as sparse as possible, regardless of the
source being fully allocated (or at least being unable to tell us about
holes)
3. We want the dest to mirror the sparseness of the host, but only where
that is efficient (if the source reads holes, make a hole in the dest)
4. Any other modes?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-06-08 14:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 10:34 [Qemu-devel] [PATCH v2 0/3] mirror: Allow detection of zeroes on source sectors Fam Zheng
2015-06-08 10:34 ` [Qemu-devel] [PATCH v2 1/3] block: Extrace bdrv_parse_detect_zeroes_flags Fam Zheng
2015-06-08 14:17 ` Eric Blake
2015-06-08 14:53 ` Paolo Bonzini
2015-06-10 9:11 ` Fam Zheng
2015-06-10 9:24 ` Fam Zheng
2015-06-08 10:34 ` [Qemu-devel] [PATCH v2 2/3] qapi: Add "detect-zeroes" option to drive-mirror Fam Zheng
2015-06-08 10:47 ` Paolo Bonzini
2015-06-08 14:21 ` Eric Blake [this message]
2015-06-08 10:34 ` [Qemu-devel] [PATCH v2 3/3] iotests: Add test cases for drive-mirror "detect-zeroes" option Fam Zheng
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=5575A502.2000204@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).