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

Re: [Xen-devel] [PATCH v5 04/10] libxl: convert libxl_device_disk_add to an asyn op



Ian Jackson wrote:
Roger Pau Monne writes ("[PATCH v5 04/10] libxl: convert libxl_device_disk_add to an 
asyn op"):
This patch converts libxl_device_disk_add to an ao operation that
waits for device backend to reach state XenbusStateInitWait and then
marks the operation as completed. This is not really useful now, but
will be used by latter patches that will launch hotplug scripts after
we reached the desired xenbus state.

Just spotted:

+void libxl__initiate_device_add(libxl__egc *egc, libxl__ao_device *aodev)
+{
...
+    libxl__ev_devstate_init(&aodev->ds);
+    rc = libxl__ev_devstate_wait(gc,&aodev->ds, device_backend_callback,
+                                 state_path, XenbusStateInitWait,
+                                 LIBXL_INIT_TIMEOUT * 1000);

Another unneeded _init.

Ok, I thought that you need to call libxl__ev_devstate_init before libxl__ev_devstate_wait? I just saw that _wait performs the _init itself (but without calling _init).

Can't we remove _init, if it's not needed? Having and _init function makes people thing they have to use it, and the comments doesn't say anything about _wait calling _init itself.

I won't comment on any more of these I find.


_______________________________________________
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®.