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

Re: [Xen-devel] [PATCH v3 7/7] libxl__device_disk_local_attach: wait for state "connected"



Stefano Stabellini writes ("[Xen-devel] [PATCH v3 7/7] 
libxl__device_disk_local_attach: wait for state "connected""):
> In order to make sure that the block device is available and ready to be
> used, wait for state "connected" in the backend before returning.
...
> +        be_path = libxl__device_backend_path(gc, &device);
> +        rc = libxl__wait_for_backend(gc, be_path, "4");

Ideally we shouldn't be introducing new calls to functions called
"libxl__wait_for".  Although I appreciate you may not want to convert
libxl__device_disk_local_attach and all its callers to use callbacks.

> +        if (rc < 0) {
> +            libxl__device_disk_local_detach(gc, tmpdisk);
> +            return NULL;

Again, this is the "free something on every exit path" error handling
style.  Surely we should have a "goto out" or "goto out_err" or
something ?

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.