qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: imain@redhat.com, Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] block: add drive_backup HMP command
Date: Tue, 25 Jun 2013 16:43:05 +0200	[thread overview]
Message-ID: <20130625144305.GO3539@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <51C9AB05.8000902@redhat.com>

Am 25.06.2013 um 16:36 hat Paolo Bonzini geschrieben:
> Il 25/06/2013 16:06, Kevin Wolf ha scritto:
> > Am 25.06.2013 um 15:49 hat Paolo Bonzini geschrieben:
> >> Il 25/06/2013 15:26, Kevin Wolf ha scritto:
> >>>>> +    if (!full) {
> >>>>> +        error_setg(&errp, "-f is not yet implemented");
> >>>>> +        hmp_handle_error(mon, &errp);
> >>>>> +        return;
> >>>>> +    }
> >>> Then why make it a valid option and confuse users in the help text by
> >>> describing options that don't really exist?
> >>
> >> Because otherwise we're stuck with a meaning of the flag that is
> >> different between drive-mirror and block-backup.
> > 
> > Do you mean when "otherwise" isn't only "we don't add -f now", but also
> > "we accidentally add a -f with different meaning later"? Not sure if
> > there's a real danger of that when we're aware that we want -f with the
> > same meaning as for mirroring.
> 
> We have drive-mirror with:
> * the default is 'top'
> * -f gives 'full'
> 
> block-backup for now only implements 'full'.  If we do not force the
> user to add -f, the default is 'full' and we should not change it later.

Oh, yes, I read it the wrong way round. The error message is actually
wrong, because the unimplemented thing isn't -f, but _not_ using -f. The
code is actually doing what you describe, though.

> However, I would move the "not yet implemented" error from HMP to QMP.
> This way, both drive-mirror and block-backup will have a mandatory
> 'sync' argument.  We plan to implement it anyway, and it makes sense imo
> to avoid gratuitous differences in the APIs.

I agree.

Kevin

  reply	other threads:[~2013-06-25 14:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 12:23 [Qemu-devel] [PATCH] block: add drive_backup HMP command Stefan Hajnoczi
2013-06-25 13:26 ` Kevin Wolf
2013-06-25 13:49   ` Paolo Bonzini
2013-06-25 14:06     ` Kevin Wolf
2013-06-25 14:36       ` Paolo Bonzini
2013-06-25 14:43         ` Kevin Wolf [this message]
2013-06-25 17:40         ` Ian Main
2013-06-26  7:44         ` Stefan Hajnoczi

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=20130625144305.GO3539@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=famz@redhat.com \
    --cc=imain@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).