[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 00 of 15 v5] libxl: add support for hotplug script calling from libxl
This patch series adds support for hotplug script calling directly from libxl, instead of relying on xenbackendd. Also some patches contain general bug fixes. Currently Linux hotplug script call functions are empty, so Linux continues to use udev rules to call hotplug scripts. Patches 1, 6, 8, 9, 10 are NetBSD specific, and basicaly pave the way for the application of the bigger changes present in this series. Patch 11 is a trivial update for an error message. Patch 2 adds support for mounting raw image files using the vnd device. Since NetBSD doesn't have qdisk or blktap support, the only way to use raw images with guests is to mount the image and pass the block device as a "PHY" backend. To check wheter an OS supports raw images as "PHY" backends two new files are added to the project, to avoid using #ifdefs, that contain a helper function. The file to be included is decided during the compilation process. Patch 3 adds a generic function to fork the current process and execute a given file, which will be later used to execute hotplug scripts synchronously. Patches 4 and 5 add a new function to wait for a device to reach a certain state, and replace wait_for_dev_destroy with this more generic implementation. This function is also used to wait for device initialization before calling hotplug scripts. The added function will benefit from a rework after event support is added to libxl. Patch 7 adds the calling of hotplug scripts when devices are initializated and removed. Two new files are also added to support hotplug scripts, since Linux and NetBSD hotplug scripts have different call parameters. The path of the script to execute is retrieved from xenstore. The file to include is also decided at compile time. Patches 12, 13, 14 sets frontend status to 6 when a domain is destroyed, so devices are disconnected and then execute hotplug scripts. Also the syntax of the libxl_domain_destroy and libxl__devices_destroy has been changed to always force the destruction. Finally patch 15 changes the mutex initialization, because NetBSD doesn't have the macro PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP. Changes since v4: * Guess if vbd is an image file or a block device inside hotplug scripts instead of passing it as a parameter. * Merged patches 7 and 8 to avoid breaking bisectability. * Changed libxl__forkexec according Ian Jackson suggestions. * Changed libxl__device_destroy to not modify frontend state and remove frontend instead. * Call libxl__device_remove in libxl__device_destroy to wait for the device to be disconnected. * Changed the initialization of the mutex, because NetBSD doesn't have the used macro. * Merged nic and disk hotplug scripts caller functions, since they take the same parameters now. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |