[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v6 0/11] qdisk local attach
Hi all, this patch implements local_attach support for QDISK: that means that you can use qcow2 as disk format for your PV guests disks and use pygrub to retrieve the kernel and initrd in dom0. The idea is that we start a QEMU instance at boot time to listen to local_attach requests. When libxl_device_disk_local_attach is called on a QDISK images, libxl sets up a backend/frontend pair in dom0 for the disk so that blkfront in dom0 will create a new xvd device for it. Then pygrub can be pointed at this device to retrieve kernel and initrd. Changes in v6: - rebase on "nstore: rename public xenstore headers"; - new patch: "libxl_string_to_backend: add qdisk"; - new patch: "main_blockdetach: destroy the disk on successful removal"; - split "libxl: introduce libxl__device_disk_add" in two patches; - return error in case pdev_path is NULL; - libxl__device_disk_local_attach update the new disk, the caller allocates it; - remove \n from logs; - document blkdev_start; - use libxl__strdup to allocate blkdev_start; - more comments in libxl__devid_to_localdev; - inline GCSPRINTF; - introduce ret for xs_* error codes. Changes in v5: - remove _hidden from the libxl_device_disk_local_attach/detach implementation; - libxl__device_disk_local_attach: rename disk to in_disk; - libxl__device_disk_local_attach: rename tmpdisk to disk; - libxl__device_disk_local_attach: copy disk to new_disk only on success; - libxl__device_disk_local_attach: remove check on libxl__zalloc success. - rename libxl__device_generic_add_t to libxl__device_generic_add; - change the type of the blkdev_start parameter to libxl__device_disk_local_attach to const char *; - remove domid paramter to libxl__alloc_vdev (assume LIBXL_TOOLSTACK_DOMID); - remove scaling limit from libxl__alloc_vdev; - libxl__device_disk_local_attach: replace LIBXL__LOG with LOG; - libxl__device_disk_local_attach: unify error paths. Changes in v4: - split the first patch into 2 patches: the first is a simple move, the second one adds a new parameter; - libxl__device_generic_add: do not end the transaction is the caller provided it; - libxl__device_generic_add: fix success exit path; - pass blkdev_start in libxl_domain_build_info; - rename libxl__devid_to_vdev to libxl__devid_to_localdev; - introduce upper bound for encode_disk_name; - improve error handling and exit paths in libxl__alloc_vdev and libxl__device_disk_local_attach. Changes in v3: - libxl__device_disk_local_attach: wait for the backend to be "connected" before returning. Changes in v2: - make libxl_device_disk_local_(de)attach internal functions; - allocate the new disk in libxl_device_disk_local_attatch on the GC; - remove libxl__device_generic_add_t, add a transaction parameter to libxl__device_generic_add instead; - add a new patch to introduce a blkdev_start option to xl.conf; - reimplement libxl__alloc_vdev checking for the frontend path and starting from blkdev_start; - introduce a Linux specific libxl__devid_to_vdev function based on last Jan's patch to blkfront. Stefano Stabellini (11): libxl: make libxl_device_disk_local_attach/detach internal functions libxl: libxl__device_disk_local_attach return a new libxl_device_disk libxl: add a transaction parameter to libxl__device_generic_add libxl: move libxl__device_from_disk to libxl_internal.c libxl: introduce libxl__device_disk_add xl/libxl: add a blkdev_start parameter libxl: introduce libxl__alloc_vdev xl/libxl: implement QDISK libxl_device_disk_local_attach libxl__device_disk_local_attach: wait for state "connected" libxl_string_to_backend: add qdisk main_blockdetach: destroy the disk on successful removal docs/man/xl.conf.pod.5 | 6 + tools/examples/xl.conf | 3 + tools/hotplug/Linux/init.d/sysconfig.xencommons | 3 + tools/hotplug/Linux/init.d/xencommons | 3 + tools/libxl/libxl.c | 238 +---------------- tools/libxl/libxl.h | 7 - tools/libxl/libxl_bootloader.c | 7 +- tools/libxl/libxl_create.c | 3 + tools/libxl/libxl_device.c | 17 +- tools/libxl/libxl_internal.c | 325 +++++++++++++++++++++++ tools/libxl/libxl_internal.h | 26 ++- tools/libxl/libxl_linux.c | 48 ++++ tools/libxl/libxl_netbsd.c | 6 + tools/libxl/libxl_pci.c | 2 +- tools/libxl/libxl_types.idl | 1 + tools/libxl/libxl_utils.c | 2 + tools/libxl/xl.c | 3 + tools/libxl/xl.h | 1 + tools/libxl/xl_cmdimpl.c | 5 +- 19 files changed, 454 insertions(+), 252 deletions(-) Cheers, Stefano _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |