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

Re: [Xen-devel] [PATCH v6 01/13] libxl: change ao_device_remove to ao_device



Roger Pau Monne writes ("[PATCH v6 01/13] libxl: change ao_device_remove to 
ao_device"):
> Introduce a new structure to track state of device backends, that will
> be used in following patches on this series.
...

Looks good.  I have only one comment:

> +static void device_xsentries_remove(libxl__egc *egc, libxl__ao_device *aodev)
> +{
> +    STATE_AO_GC(aodev->ao);
> +    char *be_path = libxl__device_backend_path(gc, aodev->dev);
> +    char *fe_path = libxl__device_frontend_path(gc, aodev->dev);
> +    xs_transaction_t t = 0;
> +    int ret = 0;
> +
> +    if (aodev->action == DEVICE_DISCONNECT) {
> +        do {
> +            t = xs_transaction_start(CTX->xsh);
> +            libxl__xs_path_cleanup(gc, t, fe_path);
> +            libxl__xs_path_cleanup(gc, t, be_path);
> +            ret = !xs_transaction_end(CTX->xsh, t, 0);
> +        } while (ret && errno == EAGAIN);

The error handling here seems a bit lacking.  Perhaps you should
import my "[PATCH 08/21] libxl: provide libxl__xs_*_checked ..." into
your series and use those ?  You can see an example of how they're
used in "[PATCH 09/21] libxl: wait for qemu to acknowledge logdirty
command".

And you need to check the return values from libxl__xs_path_cleanup.

Thanks,
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®.