All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Jeff Cody <jcody@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, jsnow@redhat.com, qemu-stable@nongnu.org,
	qemu-block@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] block/rbd: pull out qemu_rbd_convert_options
Date: Tue, 11 Sep 2018 12:50:45 -0500	[thread overview]
Message-ID: <ed272342-31ce-0cf6-be8e-392b6525df63@redhat.com> (raw)
In-Reply-To: <78d2f47b07325fce34a03b115159830f662b7f90.1536642773.git.jcody@redhat.com>

On 9/11/18 12:15 AM, Jeff Cody wrote:
> Code movement to pull the conversion from Qdict to BlockdevOptionsRbd
> into a helper function.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>   block/rbd.c | 36 ++++++++++++++++++++++++------------
>   1 file changed, 24 insertions(+), 12 deletions(-)
> 

> -
> +    r = qemu_rbd_convert_options(bs, options, &opts, &local_err);
>       if (local_err) {
>           error_propagate(errp, local_err);
> -        r = -EINVAL;
>           goto out;
>       }

You could simplify this to:

r = qemu_rbd_convert_options(bs, options, &opts, errp);
if (r < 0) {
     goto out;
}

Either way, this refactoring looks correct.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

  reply	other threads:[~2018-09-11 17:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11  5:15 [Qemu-devel] [PATCH 0/2] block/rbd: enable filename parsing on open Jeff Cody
2018-09-11  5:15 ` [Qemu-devel] [PATCH 1/2] block/rbd: pull out qemu_rbd_convert_options Jeff Cody
2018-09-11 17:50   ` Eric Blake [this message]
2018-09-11 18:06   ` John Snow
2018-09-11  5:15 ` [Qemu-devel] [PATCH 2/2] block/rbd: Attempt to parse legacy filenames Jeff Cody
2018-09-11 17:53   ` Jeff Cody
2018-09-11 18:03   ` Eric Blake
2018-09-11 18:28     ` Jeff Cody
2018-09-11 18:22   ` John Snow
2018-09-11 18:37     ` Jeff Cody
2018-09-11 18:39       ` John Snow
2018-09-12 10:38       ` Kevin Wolf
2018-09-12 12:42         ` Jeff Cody
2018-09-12 12:49           ` Jeff Cody

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=ed272342-31ce-0cf6-be8e-392b6525df63@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jcody@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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.