| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 06/12] libxl: synchronize device removal when using driver domains
 Roger Pau Monne writes ("[PATCH v1 06/12] libxl: synchronize device removal 
when using driver domains"):
> Synchronize the clean up of the backend from the toolstack domain when
> the driver domain has actually finished closing the backend for the
> device.
> 
> This is accomplished by waiting for the driver domain to  remove the
> directory containing the backend keys, then the toolstack domain will
> finish the cleanup by removing the empty folders on the backend path.
...
This is broadly speaking good.  I have one suggestion:
> +static void device_destroy_be_timeout_cb(libxl__egc *egc, libxl__ev_time *ev,
> +                                         const struct timeval *requested_abs)
> +{
...
> +    libxl__ev_time_deregister(gc, &aodev->timeout);
> +    libxl__ev_xswatch_deregister(gc, &aodev->xs_watch);
...
> +    device_hotplug_done(egc, aodev);
You might consider moving those two idemopotent cleanup calls into
device_hotplug_done, which is on all the outward paths from here.
That reduces the number of times you have to write them from two to
one.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |