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 v9 4/4] qemu-img: copy *key-secret opts when opening newly created files
Date: Tue, 16 May 2017 09:19:35 +0100 [thread overview]
Message-ID: <20170516081935.GB9105@redhat.com> (raw)
In-Reply-To: <e2a74028-c9c0-6b6a-4c13-27fab303a2e1@redhat.com>
On Mon, May 15, 2017 at 07:43:15PM +0200, Max Reitz wrote:
> On 2017-05-15 16:04, Daniel P. Berrange wrote:
> > The qemu-img dd/convert commands will create an image file and
> > then try to open it. Historically it has been possible to open
> > new files without passing any options. With encrypted files
> > though, the *key-secret options are mandatory, so we need to
> > provide those options when opening the newly created file.
> >
> > Reviewed-by: Max Reitz <mreitz@redhat.com>
> > Reviewed-by: Fam Zheng <famz@redhat.com>
> > Reviewed-by: Eric Blake <eblake@redhat.com>
> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> > ---
> > qemu-img.c | 42 +++++++++++++++++++++++++++++++++++++-----
> > 1 file changed, 37 insertions(+), 5 deletions(-)
> >
> > diff --git a/qemu-img.c b/qemu-img.c
> > index e0e3d31..dcddded 100644
> > --- a/qemu-img.c
> > +++ b/qemu-img.c
> > @@ -314,15 +314,18 @@ static BlockBackend *img_open_opts(const char *optstr,
> > }
> >
> > static BlockBackend *img_open_file(const char *filename,
> > + QDict *options,
> > const char *fmt, int flags,
> > bool writethrough, bool quiet,
> > bool force_share)
> > {
> > BlockBackend *blk;
> > Error *local_err = NULL;
> > - QDict *options = qdict_new();
> >
> > if (fmt) {
> > + if (!options) {
> > + options = qdict_new();
> > + }
>
> This is the only place where my attempted rebase and your version
> differ. I think this has to be done unconditionally, because otherwise:
>
> $ ./qemu-img info -U null-co://
> [1] 16327 segmentation fault (core dumped) ./qemu-img info -U null-co://
Yep, sorry this was the mistake that made me send v10.
> Also, I'm not sure the R-bs apply for this patch any longer.
>
> (They do for patch 1 because it's just a contextual difference. For
> patch 2, it's a borderline case (I would drop it, but I can understand
> keeping it). For patch 3 it's more than just borderline - I would
> definitely drop the R-b, but the differences are still rather
> mechanical, so it is acceptable to keep it.
> But I think there are too many changes here in this patch to keep the
> R-bs. In fact, I'm pretty sure none of Eric, Fam and me have given an
> R-b to this segfault...)
True, I'm never too sure what level of changes is large enough to
require dropping the R-b. Normally I just do it if it is feature
changes or non-trivial review feedback, where as this was just
(supposedly easy) conflict resolution, but it did go wrong this
time :-(
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 :|
prev parent reply other threads:[~2017-05-16 8:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 14:04 [Qemu-devel] [PATCH v9 0/4] Improve convert and dd commands Daniel P. Berrange
2017-05-15 14:04 ` [Qemu-devel] [PATCH v9 1/4] qemu-img: add support for --object with 'dd' command Daniel P. Berrange
2017-05-15 14:04 ` [Qemu-devel] [PATCH v9 2/4] qemu-img: fix --image-opts usage with dd command Daniel P. Berrange
2017-05-15 14:04 ` [Qemu-devel] [PATCH v9 3/4] qemu-img: introduce --target-image-opts for 'convert' command Daniel P. Berrange
2017-05-15 14:04 ` [Qemu-devel] [PATCH v9 4/4] qemu-img: copy *key-secret opts when opening newly created files Daniel P. Berrange
2017-05-15 17:43 ` Max Reitz
2017-05-15 17:44 ` Max Reitz
2017-05-16 8:19 ` Daniel P. Berrange [this message]
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=20170516081935.GB9105@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.