Commit Graph
19 Commits
Author SHA1 Message Date
Olaf Hering e3dcb16398 tools: replace private INCLUDEDIR with automake includedir
Reuse automake variable instead of inventing a private variable.

The result of this command:
 git grep -wnl INCLUDEDIR | xargs sed -i 's@INCLUDEDIR@includedir@g'

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-05-21 15:12:10 +01:00
Wei Liu f9c9b12775 tools: fix "make distclean"
The original rule to target "distclean" in tools/Rules.mk was in effect
"make clean". It should be "make distclean".

However not all Makefiles in subdirectories have distclean target
defined. So this patch also adds a bunch of distclean targets to various
Makefiles. They only depend on clean target and don't have any actions
in most cases.

With the patch applied, following command outputs 0 results:

  find tools -name 'Makefile*' -exec grep -L 'distclean' {} \+ \
     | grep -v ocaml | grep -v libfsimage

Ocaml and libfsimage are known to have distclean defined in a dedicated
rules file.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-27 16:34:45 +00:00
Ian Campbell f45b59ff53 tools/blktap2/libvhd: move uuid wrapper functions out of line.
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>
2011-03-17 19:14:57 +00:00
Ian Campbell 05dbcc741d tools/blktap2: push uuid wrapper functions down into libvhd.
Nothing else uses them.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-03-17 19:13:53 +00:00
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
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>
2011-03-17 10:36:25 +00:00
Keir Fraser 264e0d32b1 blktap2: <sys/time.h> is needed for 'struct timeval'
Also clean up a Makefile to use $(SBINDIR).

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2010-06-09 06:58:55 +01:00
Keir Fraser 4b1af8b188 blktap2: The tap-ctl userspace control utility and library.
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>
2010-06-08 08:05:09 +01:00
Keir Fraser c6913b5aaf blktap2: Cleanup vdi stacking code.
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>
2010-06-08 08:04:36 +01:00
Keir Fraser 08a07a95dd blktap2: Fix E/DPRINTF defs all around the driver/ subdir.
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>
2010-06-08 08:04:09 +01:00
Keir Fraser 7b4dea5546 blktap2: Fix tapdisk disktype issues.
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>
2010-06-08 08:03:41 +01:00
Keir Fraser 14d41371e2 blktap: provide a variant of __RING_SIZE() that is an integer constant 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>
2010-03-06 13:31:03 +00:00
Keir Fraser f3bbcc7995 tools: Do not append trailing slash to XEN_ROOT in Makefiles
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-02-04 09:03:42 +00:00
Keir Fraser fedebce364 blktap2: Separate tapdisk raw I/O into different backends.
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>
2010-01-29 08:54:51 +00:00
Keir Fraser 8b0f1cdb96 blktap2: configurable driver chains
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>
2009-11-09 19:40:14 +00:00
Keir Fraser cfafda4169 tools: Always check for __linux__ not __Linux__
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-07-02 21:45:30 +01:00
Keir Fraser 1d998d8224 blktap2: A final few NetBSD fixes
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-24 15:24:53 +01:00
Keir Fraser a61c4df7f6 blktap2: Further netbsd build fixes.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-06-24 14:03:20 +01:00
Keir Fraser 2b8ba91b50 blktap2: portability fixes for NetBSD
- 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>
2009-06-23 17:24:14 +01:00
Keir Fraser bd5573a630 blktap2: a completely rewritten blktap implementation
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>
2009-05-26 11:52:31 +01:00