All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Eric Blake <eblake@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
	Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v5 3/4] qemu-img: introduce --target-image-opts for 'convert' command
Date: Thu, 27 Apr 2017 09:43:22 +0100	[thread overview]
Message-ID: <20170427084322.GE5346@redhat.com> (raw)
In-Reply-To: <37ab2b55-5586-64a5-01d9-d122f4b5b432@redhat.com>

On Wed, Apr 26, 2017 at 09:23:25PM +0200, Max Reitz wrote:
> On 24.04.2017 11:16, Daniel P. Berrange wrote:
> > The '--image-opts' flags indicates whether the source filename
> > includes options. The target filename has to remain in the
> > plain filename format though, since it needs to be passed to
> > bdrv_create().  When using --skip-create though, it would be
> > possible to use image-opts syntax. This adds --target-image-opts
> > to indicate that the target filename includes options. Currently
> > this mandates use of the --skip-create flag too.
> > 
> > Reviewed-by: Eric Blake <eblake@redhat.com>
> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> > ---
> >  qemu-img-cmds.hx |  4 +--
> >  qemu-img.c       | 86 ++++++++++++++++++++++++++++++++++++++++----------------
> >  qemu-img.texi    | 12 ++++++--
> >  3 files changed, 73 insertions(+), 29 deletions(-)
> 
> I'm afraid this will need a rebase onto block-next now (because of
> Peter's "qemu-img: simplify img_convert" patch).

Ok.

> Besides the obvious rebase conflicts, there are some less obvious things
> that may/should thus be changed:
> 
> > diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
> > index 8ac7822..93b50ef 100644
> > --- a/qemu-img-cmds.hx
> > +++ b/qemu-img-cmds.hx
> 
> [...]
> 
> > @@ -2090,6 +2100,12 @@ static int img_convert(int argc, char **argv)
> >          goto fail_getopt;
> >      }
> >  
> > +    if (tgt_image_opts && !skip_create) {
> > +        error_report("--target-image-opts requires use of -n flag");
> > +        ret = -1;
> 
> Depending on whether you decide to put this below
> bdrv_parse_cache_mode() or above, you might actually no longer have to
> set ret anymore.

ok

> 
> > +        goto fail_getopt;
> > +    }
> > +
> >      /* Initialize before goto out */
> >      if (quiet) {
> >          progress = 0;
> > @@ -2100,8 +2116,14 @@ static int img_convert(int argc, char **argv)
> >      out_filename = bs_n >= 1 ? argv[argc - 1] : NULL;
> >  
> >      if (options && has_help_option(options)) {
> > -        ret = print_block_option_help(out_filename, out_fmt);
> > -        goto out;
> > +        if (out_fmt) {
> > +            ret = print_block_option_help(out_filename, out_fmt);
> > +            goto out;
> > +        } else {
> > +            error_report("Option help requires a format be specified");
> > +            ret = -1;
> 
> Since this is most likely above bdrv_parse_cache_mode() (and may thus
> end up above the previous hunk?), you probably don't have to set ret
> here either (Sorry...).
> 
> The changes from v4 look good, but the rebase will result in non-trivial
> changes, so I giving an R-b would not be of any real use, I'm afraid...

No problem, i'll respin.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2017-04-27  8:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  9:16 [Qemu-devel] [PATCH v5 0/4] Improve convert and dd commands Daniel P. Berrange
2017-04-24  9:16 ` [Qemu-devel] [PATCH v5 1/4] qemu-img: add support for --object with 'dd' command Daniel P. Berrange
2017-04-24  9:16 ` [Qemu-devel] [PATCH v5 2/4] qemu-img: fix --image-opts usage with dd command Daniel P. Berrange
2017-04-24  9:16 ` [Qemu-devel] [PATCH v5 3/4] qemu-img: introduce --target-image-opts for 'convert' command Daniel P. Berrange
2017-04-24  9:45   ` Fam Zheng
2017-04-24  9:46     ` Daniel P. Berrange
2017-04-26 19:23   ` Max Reitz
2017-04-27  8:43     ` Daniel P. Berrange [this message]
2017-04-24  9:16 ` [Qemu-devel] [PATCH v5 4/4] qemu-img: copy *key-secret opts when opening newly created files Daniel P. Berrange
2017-04-24  9:50   ` Fam Zheng
2017-04-26 19:37   ` Max Reitz
2017-04-24  9:51 ` [Qemu-devel] [PATCH v5 0/4] Improve convert and dd commands 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=20170427084322.GE5346@redhat.com \
    --to=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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.