qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block/rbd: pull out qemu_rbd_c


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block/rbd: pull out qemu_rbd_convert_options
Date: Tue, 11 Sep 2018 12:50:45 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

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 <address@hidden>
---
  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 <address@hidden>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]