aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_noblktap2.c
Commit message (Collapse)AuthorAgeFilesLines
* libxl: fix cleanup of tap devices in libxl__device_destroyIan Campbell2012-08-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | We pass be_path to tapdisk_destroy but we've already deleted it so it fails to read tapdisk-params. However it appears that we need to destroy the tap device after tearing down xenstore, to avoid the leak reported by Greg Wettstein in <201207312141.q6VLfJje012656@wind.enjellic.com>. So read the tapdisk-params in the cleanup transaction, before the remove, and pass that down to destroy_tapdisk instead. tapdisk-params may of course be NULL if the device isn't a tap device. There is no need to tear down the tap device from libxl__initiate_device_remove since this ultimately calls libxl__device_destroy. Propagate and log errors from libxl__device_destroy_tapdisk. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: move a lot more includes into libxl_internal.hIan Jackson2012-01-131-0/+2
| | | | | | | | | | | | | | | | | Move a lot of #include <stdfoo.h> from individual files into libxl_internal.h. This helps avoid portability mistakes where necessary system headers are omitted from individual files, and is also of course a convenience when developing. Also add #include "libxl_osdeps.h" /* must come before any other headers */ to the top of most libxl*.c files, so that anyone who adds any headers before libxl_internal.h will put the in the right place. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: Rationalise #includesIan Jackson2011-12-121-2/+0
| | | | | | | | | | | | | | | | | | | | libxl_internal.h now #includes libxl.h and various system headers. This 1. makes the order of header inclusion more predictable 2. explicitly allows libxl_internal.h to use objects defined in libxl.h 3. removes the need for individual files to include these headers Also - remove some unnecessary #includes of libxl_utils.h, flexarray.h, etc. in some libxl*.c files, - include libxl_osdeps.h at the top of libxl_internal.h - add missing includes of libxl_osdeps.h to a couple of files - change libxl.h to libxl_internal.h in a couple of files Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: fixup incorrect indentationIan Campbell2011-10-121-0/+8
| | | | | | | | | Several places which were previsously indented using hard tabs are now incorrectly indented. Fix them up. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: attempt to cleanup tapdisk processes on disk backend destroy.Ian Campbell2011-09-281-0/+4
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: refactor DISK_BACKEND_PHY handling in libxl_device_disk_addIan Campbell2011-04-081-3/+3
| | | | | | | | | | | | | | A step on the path to sharing this code with the tail-end of the DISK_BACKEND_TAP case. I made the result of libxl__blktap_devpath non-const to achieve this. The existing caller calls libxl__strdup on the result but since the function is an internal one and the result is already garbage collected I think this is unnecessary and we can just use the non-const result directly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: disk specification interface changeKamala Narasimhan2011-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Currently we pile all the backend and format information pertaining to disk option in a single enum. This check-in separates the two and uses two enums, one for disk format and another for disk backend. This helps clearly differentiate between disk format and backend within the implementation and also helps cleanup the code in this area in preparation for the impending parser revamping to be done post 4.1. Along with separating format and backend, this check-in also removes unwanted types and renames variables in the disk interface and fixes the code affected by the interface changes. In specific, here are the disk interface changes made - In libxl_device_disk structure physpath was renamed to pdev_path, virtpath was renamed to vdev, phystype was removed and replaced with backend and format enums. Also previously a single enum libxl_disk_phystype held the values for qcow, qcow2, vhd, aio, file, phy, empty and that got refactored into two enums, libxl_disk_format to hold unknown, qcow, qcow2, vhd, raw, empty and libxl_disk_backend to hold unknown, phy, tap and qdisk. Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Use libxl__ namespace for internal typesIan Campbell2010-09-081-2/+2
| | | | | | | | | | | | | | It's not clear that the namespace rules described in libxl.h are intended to apply to internal types but I don't see why not. sed -i -e 's/\<libxl_device\>/libxl__device/g' tools/libxl/*.[ch] sed -i -e 's/\<libxl_device_kinds\>/libxl__device_kinds/g' tools/libxl/*.[ch] sed -i -e 's/\<libxl_gc\>/libxl__gc/g' tools/libxl/*.[ch] sed -i -e 's/\<libxl_gc_owner\>/libxl__gc_owner/g' tools/libxl/*.[ch] sed -i -e 's/\<libxl_spawn_starting\>/libxl__spawn_starting/g' tools/libxl/*.[ch] Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Ensure all _hidden functions use libxl__ prefix (manual part)Ian Campbell2010-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This patch covers the remaining functions identified by: rgrep _hidden tools/libxl/*.h | grep -v libxl__ sed -i -e 's/XL_LOG/LIBXL__LOG/g' tools/libxl/*.[ch] sed -i -e 's/xl_log/libxl__log/g' tools/libxl/*.[ch] sed -i -e 's/\(build_\(pre\|post\|pv\|hvm\)\)/libxl__\1/g' tools/libxl/*.[ch] sed -i -e 's/is_hvm/libxl__domain_is_hvm/g' tools/libxl/*.[ch] sed -i -e 's/get_shutdown_reason/libxl__domain_shutdown_reason/g' tools/libxl/*.[ch] sed -i -e 's/restore_common/libxl__domain_restore_common/g' tools/libxl/*.[ch] sed -i -e 's/core_suspend/libxl__domain_suspend_common/g' tools/libxl/*.[ch] sed -i -e 's/save_device_model/libxl__domain_save_device_model/g' tools/libxl/*.[ch] sed -i -e 's/device_disk_backend_type_of_phystype/libxl__device_disk_backend_type_of_phystype/g' tools/libxl/*.[ch] sed -i -e 's/\<libxl_blktap_enabled\>/libxl__blktap_enabled/g' tools/libxl/*.[ch] sed -i -e 's/\<libxl_blktap_devpath\>/libxl__blktap_devpath/g' tools/libxl/*.[ch] Add _hidden to libxl__blktap_enabled and libxl__blktap_devpath Inline dominfo_libxl__domain_shutdown_reason(info) into libxl__domain_shutdown_reason, its only caller. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Make blktap support optional.Christoph Egger2010-08-161-0/+29
Enable it by default on Linux, disable it on non-Linux. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>