aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap2/include
Commit message (Collapse)AuthorAgeFilesLines
* tools/blktap2/libvhd: move uuid wrapper functions out of line.Ian Campbell2011-03-171-82/+15
| | | | | | | | | This isolates users of libvhd from the need to know about the different OS schemes for UUIDs. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Daniel Stodden <daniel.stodden@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/blktap2: push uuid wrapper functions down into libvhd.Ian Campbell2011-03-174-25/+25
| | | | | | | Nothing else uses them. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-171-1/+1
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* blktap2: <sys/time.h> is needed for 'struct timeval'Keir Fraser2010-06-091-0/+1
| | | | | | Also clean up a Makefile to use $(SBINDIR). Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* blktap2: The tap-ctl userspace control utility and library.Keir Fraser2010-06-082-1/+130
| | | | | | | | | | | | | | | | | | Tapdisk control in userspace, a replacement for the original blktap2 control stack, which had to pass a kernel space interface based on sysfs nodes. All tapdisk processes listen for commands on a unix stream socket. The control library supports scanning the socket namespace for running tapdisks, VBD minors allocated, associated images and state inquiry. Control operations include allocating/releasing devices, spawning tapdisks, opening/closing images, attaching disk images to devices. disk pause/resume operations and runtime switching of disk images. Signed-off-by: Jake Wires <jake.wires@citrix.com> Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
* blktap2: Cleanup vdi stacking code.Keir Fraser2010-06-081-9/+10
| | | | | | | Removes some rough edges, memory leakage (?), fixes __list_splice, ... Signed-off-by: Jake Wires <jake.wires@citrix.com> Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
* blktap2: Fix E/DPRINTF defs all around the driver/ subdir.Keir Fraser2010-06-081-9/+0
| | | | | | | This is just to avoid macro madness among subdirs sharing blktaplib.h. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jake Wires <jake.wires@citrix.com>
* blktap2: Fix tapdisk disktype issues.Keir Fraser2010-06-081-1/+1
| | | | | | | | | Stop coercing drivers/disktype code into the tool stack. Make both blktapctrl and tap-ctl transfer type/path pairs as "<type>:<path>" strings. Remove the message.disktype integer altogether. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jake Wires <jake.wires@citrix.com>
* blktap: provide a variant of __RING_SIZE() that is an integer constant ↵Keir Fraser2010-03-061-1/+1
| | | | | | | | | expression Without this new variant, gcc 4.5 won't compile where this is being used to specify array sizes. See also c/s 20975. Signed-off-by: Charles Arnold <carnold@novell.com>
* tools: Do not append trailing slash to XEN_ROOT in MakefilesKeir Fraser2010-02-041-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: Separate tapdisk raw I/O into different backends.Keir Fraser2010-01-291-0/+1
| | | | | | | | | | | | | | | | | | Hide tapdisk support for different raw I/O interfaces behind a new struct tio. Libaio remains to dominate the interface, requiring everyone to dispatch iocb/ioevent structs. Backends: - lio: Kernel AIO via libaio. - rwio: Canonical read/write() mode. Misc: - Fixes a bug in tapdisk-vbd which locks up the sync io mode. - Wants a PERROR macro in blktaplib.h - Removes dead code in qcow2raw to make it link again. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jake Wires <jake.wires@citrix.com>
* blktap2: configurable driver chainsKeir Fraser2009-11-091-0/+20
| | | | | | | | | | | | | | | | Blktap2 allows block device drivers to be layered to create more advanced virtual block devices. However, composing a layered driver is not exposed to the user. This patch fixes this, and allows the user to explicitly specify a driver chain when starting a tapdisk process, using the pipe character ('|') to explicitly seperate layers in a blktap2 configuration string. for example, the command: ~$ tapdisk2 -n "log:|aio:/path/to/file.img" will create a blktap2 device where read and write requests are passed to the 'log' driver, then forwarded to the 'aio' driver. Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
* tools: Always check for __linux__ not __Linux__Keir Fraser2009-07-022-3/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: A final few NetBSD fixesKeir Fraser2009-06-241-3/+7
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* blktap2: Further netbsd build fixes.Keir Fraser2009-06-244-24/+76
| | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: portability fixes for NetBSDKeir Fraser2009-06-234-15/+116
| | | | | | | | | | | | | - Use standard off_t and lseek() instead of non-portable off64_t and lseek64() - Use uuid API as documented in DCE 1.1 RPC specification - Add NetBSD implementation for blk_getimagesize() and blk_getsectorsize() - Use blk_getimagesize() and blk_getsectorsize() - Fix uuid header check Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: a completely rewritten blktap implementationKeir Fraser2009-05-2611-0/+1285
Benefits to blktap2 over the old version of blktap: * Isolation from xenstore - Blktap devices are now created directly on the linux dom0 command line, rather than being spawned in response to XenStore events. This is handy for debugging, makes blktap generally easier to work with, and is a step toward a generic user-level block device implementation that is not Xen-specific. * Improved tapdisk infrastructure: simpler request forwarding, new request scheduler, request merging, more efficient use of AIO. * Improved tapdisk error handling and memory management. No allocations on the block data path, IO retry logic to protect guests transient block device failures. This has been tested and is known to work on weird environments such as NFS soft mounts. * Pause and snapshot of live virtual disks (see xmsnap script). * VHD support. The VHD code in this release has been rigorously tested, and represents a very mature implementation of the VHD image format. * No more duplication of mechanism with blkback. The blktap kernel module has changed dramatically from the original blktap. Blkback is now always used to talk to Xen guests, blktap just presents a Linux gendisk that blkback can export. This is done while preserving the zero-copy data path from domU to physical device. These patches deprecate the old blktap code, which can hopefully be removed from the tree completely at some point in the future. Signed-off-by: Jake Wires <jake.wires@citrix.com> Signed-off-by: Dutch Meyer <dmeyer@cs.ubc.ca>