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 <jc...@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 <ebl...@redhat.com>

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

Reply via email to