[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
Ian Jackson wrote: 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". Is it possible to change this part of the code after you have committed your series? If you want I can send a patch to fix this so you can add it at the end of your series. And you need to check the return values from libxl__xs_path_cleanup. Even if I check the return value from libxl__xs_path_cleanup I will only print an error message, but the logic of the function will not change, and the error message it's already printed by libxl__xs_path_cleanup. If front or back xenstore entries remove failed, I will still try to remove the other entries and commit the transaction. Thanks for the review. Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |