aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap
Commit message (Collapse)AuthorAgeFilesLines
...
* blktap: Automatically start tapdisk-ioemu on demandKeir Fraser2008-04-222-13/+64
| | | | | | | | | When a domain wants to use a tap:ioemu disk but has no device model, start a tapdisk-ioemu instance as provider. Also, move the creation and removal of communication pipes to xend so that qemu-dm doesn't need the unwanted SIGHUP handler anymore. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* tools: Use PATH_MAX for pathname char arrays.Keir Fraser2008-04-041-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tapdisk: Fix L1 table endianess of qcow imagesKeir Fraser2008-03-271-6/+56
| | | | | | | | Fix tapdisk to use big endian L1 tables as used by qemu/ioemu. Old tapdisk images with native endianess are automagically converted to big endian when the image file is opened for the first time. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* tools/blktap: Use generic subdirs rules.Keir Fraser2008-03-251-20/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* blktap: Fix BSD build failure.Keir Fraser2008-03-191-0/+5
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tapaio build fixKeir Fraser2008-03-191-0/+1
| | | | | | | | | With some combinations of compiler flags (no optimization, -Werror), the compiler may complain that the function doesn't have a return statement (even if the function actually just never returns), reported as bug 1128. This adds a dummy return statement. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Use ioemu block drivers through blktap.Keir Fraser2008-03-183-32/+92
| | | | | | | | | | Add support for a tap:ioemu pseudo driver. Devices using this driver won't use tapdisk (containing the code duplication) any more, but will connect to the qemu-dm of the domain. In this way no working configuration should be broken right now as you can still choose to use the tapdisk drivers. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* Clean up blktap Makefiles.Keir Fraser2008-03-172-30/+25
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* blktapctrl: Fix a potential device minor number leak.Keir Fraser2008-03-031-4/+4
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* blktap: Fix unused warnings in block-qcow2.c with -D_FORTIFY_SOURCE=2.Keir Fraser2008-02-281-161/+0
| | | | Signed-off-by: Kevin Wolf <kwolf@suse.de>
* blktap: Remove some code duplicationKeir Fraser2008-02-255-568/+324
| | | | | | | | With my qcow2 patch to blktap I contributed a bit to the mess, so here an attempt to clean up and remove at least some of the code duplication in the functions dealing with aio operations. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* blktap: qcow2 image format supportKeir Fraser2008-02-216-10/+2369
| | | | | | | | | | | | This patch adds support for the qcow2 image format to blktap. It consists mostly of qemu code, adapted to the blktap interfaces. Snapshots and compressed images are supported. The qcow2 driver may be used by either specifying tap:qcow2 or by using tap:qcow which will detect that you have a version 2 image and will call the qcow2 driver. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* libxenctrl headers should not pollute macro namespace withKeir Fraser2008-02-121-1/+1
| | | | | | | mb/rmb/wmb. Instead add a xen_ prefix. Modify Xen's public headers to expect the prefixed names instead of bare mb/rmb/wmb, but gate this expectation on a bump of __XEN_INTERFACE_VERSION__. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Define CFLAGS and LDFLAGS for libxenstore.Keir Fraser2008-01-271-2/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Define CFLAGS and LDFLAGS for libxenctrl.Keir Fraser2008-01-271-3/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Move generation of public header hierarchy into the tools.Keir Fraser2008-01-262-2/+2
| | | | | | | This patch merges the two versions of public header generation currently used in the build into one. Signed-off-by: Bastian Blank <waldi@debian.org>
* blktap: Clean up makefile and linked libs.Keir Fraser2008-01-262-13/+8
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Add SBINDIR. Use it always.Keir Fraser2008-01-222-4/+1
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Add INCLUDEDIR. Use it.Keir Fraser2008-01-221-2/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Apply PREFIX directly to LIBDIR.Keir Fraser2008-01-221-4/+4
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* tools: LDFLAGS in link linesKeir Fraser2008-01-172-4/+4
| | | | | | | LDFLAGS is not honoured by a couple of link lines in tools/*, but should be. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap: factor out linux specific codeKeir Fraser2008-01-1511-99/+124
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tapaio check return value from read()Keir Fraser2007-12-271-2/+18
| | | | | | | | | | | | In tools/blktap/drivers/tapaio.c there is a call to read(2) whose return value is not checked. The attached patch attempts to do something vaguely sensible in cases of error. Fully comprehensive error handling in this area would be quite tough to introduce now but at least with this change when things go wrong you stand a chance of getting some information about what happened. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Revert 16560:822d4ec5cfb1.Keir Fraser2007-12-081-2/+2
| | | | | | | | | | | | | Preference seems to be to update library versions only when the ABI changes. Only libxenctrl/libxenguest have their version number changed to 3.2.0, as a reminder that they change on pretty much every major release. libfsimage/libxenstore/libblktap have not changed substantially recently, hence the ABI has not changed, and version number stays the same as in Xen 3.1 (and before). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: Rationalise library soname versions.Keir Fraser2007-12-071-2/+2
| | | | | | | | | | | | | | | | * Arrange for the sonames of libxenstore, libxc, libfsimage and libblktap to be set from a single place in Config.mk. * Bumps the soname major version number to 3.2 in preparation for 3.2 rc1 after which we do not expect to have ABI changes. I have not done anything about libaio and libflask. The former is imported from elsewhere and if we're lucky will have sane versioning upstream. libflask has a very small interface and I'm hoping that the XSM authors have been keeping some ABI discipline. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap: cleanups for *BSD.Keir Fraser2007-12-055-6/+16
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* blktap: remove unused headers.Keir Fraser2007-12-046-6/+7
| | | | | | | | | | Attached patch removes unused linux specific headers and makes bswap.h ready for BSD support. This is first step for BSD support in blktap. More to come. No functional change. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* blktap: Fix double-free in tapdisk cleanup.kfraser@localhost.localdomain2007-08-301-4/+0
| | | | | Signed-off-by: Ben Guthro <bguthro@virtualiron.com> Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
* blktap: Fix unaligned access to blktap/tapdisk message payloads.kfraser@localhost.localdomain2007-08-011-1/+3
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix file descriptor leak in blktapctrlkfraser@localhost.localdomain2007-08-011-12/+32
| | | | | | | | | | | | | | | The blktapctrl process is responsible for spawning individual tapdisk processes. It does this using the 'system' method, but unfortunately none of its file descriptors have the close-on-exec flag set. The parent blktapctl process opens a couple of unix domain sockets per-tapdisk it spawns. So the first tapdisk get 2 FDs leaked to it, the second gets 4 FDs leaked to it, the 3rd gets 6 and so on. The use of 'system' also unneccessarily invokes the shell. Replace system with fork/execvp, and explicitly close all file handles up to _SC_OPEN_MAX. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Specify -fno-strict-aliasing in root build config file.Keir Fraser2007-07-072-2/+1
| | | | | | | | Fixes correctness issues with xenstored and gcc-4.2. Original patch by Charles Coffing <ccoffing@novell.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* blktap: Add fallback code to blktap for missing poll-on-aio support.kfraser@localhost.localdomain2007-06-195-51/+265
| | | | | | | | | | | | | | | | | | | | | blktap requires a xen specific kernel AIO ABI which has been vetoed by upstream in favour of another approach. Rather than include this ABI, Fedora has been carrying a patch which makes tap:aio use a thread to poll for aio events and notify the main thread via a pipe. The upstream approach of allowing io_getevents() poll normal file descriptors via epoll is still progressing: http://lkml.org/lkml/2007/1/3/16 but when that does make it upstream, blktap will require significant re-working to use that approach. In the meantime, here's a patch which uses the poll-in-a-thread approach only if AIO poll support isn't available. It also hides the details behind a simple abstraction and makes both tap:aio and tap:qcow use it. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* tools: warn_unused_result build fixes.kfraser@localhost.localdomain2007-06-125-39/+49
| | | | | | | | | | | | Note that some of the existing error checking for asprintf was wrong for Linux. asprintf in glibc returns -1 on error, but leaves the pointer uninitialized. Only the BSDs zero out the pointer on error. Also, while fixing these warnings I saw several error paths that were incorrect. This patch minimally fixes the warn_unused_result; more complete error path cleanup will be a later patch. Signed-off-by: Charles Coffing <ccoffing@novell.com>
* Remove a few stray references to the sparse tree.Ian Campbell2007-06-041-3/+0
| | | | | | | The only non-obvious change here is in tools/xenfb/Makefile. This now picks up the headers it requires via the copy in tools/libxc. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* blktap: Fix compile errorskfraser@localhost.localdomain2007-05-243-6/+13
| | | | | | | When compiling the various blktap drivers with warnings cranked up, I get errors that return values are not checked. Signed-off-by: Charles Coffing <ccoffing@novell.com>
* blktap: Add one more error reason statement to blktapctrlkfraser@localhost.localdomain2007-05-241-1/+3
| | | | | | | | | | | blktapctrl already prints out exits reasons for all goto's to open_failed except of not finding a device number for blktap0 This patch adds just that message so the user will get more info than just "Unable to start blktapctrl" Common source of this issue is that blktap is missing/failed to load/... Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
* blktap: Do not install libs or headers with execute permissions.kfraser@localhost.localdomain2007-05-241-2/+2
| | | | | | | | | | | rpmlint complains that various blktap files are installed with unnecessary execute permissions: E: xen-devel spurious-executable-perm (Badness: 100) /usr/lib64/libblktap.a E: xen-devel spurious-executable-perm (Badness: 100) /usr/include/blktaplib.h Signed-off-by: Charles Coffing <ccoffing@novell.com>
* blktap: Fix qcow max_aio_reqs calculation.kfraser@localhost.localdomain2007-05-031-1/+2
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Put blktap character device back into /dev/xen.Brendan Cully2007-05-022-3/+6
| | | | | | Changeset 14895:800aa9f5cec9 accidentally moved it into /var/run/tap along with the control FIFOs. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* blktap: Segments can span multiple clusters with tap:qcow.kfraser@localhost.localdomain2007-04-261-14/+53
| | | | | | | | | | | | | In blktap's qcow we need split up read/write requests if the requests span multiple clusters. However, with our MAX_AIO_REQUESTS define we assume that there is only ever a single aio request per tapdisk request and under heavy i/o we can run out of room causing us to cancel requests. Dynamically allocate (based on cluster_bits) the various io request queues the driver maintains. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* [TAPDISK] Move tapdisk control files from /dev/xen to /var/run/tapJake Wires2007-04-232-3/+5
| | | | Signed-off-by: Jake Wires <jwires@xensource.com>
* [TAPDISK] Use incremental cookies and fix blktapctrl::test_path parameter typo.Jake Wires2007-04-231-6/+7
| | | | Signed-off-by: Jake Wires <jwires@xensource.com>
* [TAPDISK] Fix qcow initialization bug.Jake Wires2007-04-101-2/+8
| | | | | | fd_end was being incorrectly initialized upon open, leading to data corruption. Signed-off-by: Jake Wires <jwires@xensource.com>
* blktap: Fix qcow2raw.Keir Fraser2007-03-311-7/+2
| | | | | | | | | | | | | | qcow2raw would hang the conversion just short of 100%, because the final write queue was never being submitted. If a blktap drivers read synchronously, then "submit_events" and "complete" variables are checked before getting set, so the fact that reads have finished is not noticed, so the final write queue was never submitted. Note that I have also removed the variables write_complete and read_complete. They were unused, and they were also not set correctly in the synchronous case. Signed-off-by: Charles Coffing <ccoffing@novell.com>
* [TAPDISK] unlock sector on error caseJake Wires2007-03-161-0/+1
| | | | Signed-off-by: Jake Wires <jwires@xensource.com>
* tools: Clean up use of 'install' command.kfraser@localhost.localdomain2007-03-071-2/+2
| | | | | | | | | - convert raw "install" command to use $(INSTALL) - convert some $(INSTALL) to $(INSTALL_DATA) as appropriate - modify the specific $(INSTALL) definitions to use -p. Original patch by Ben Thomas <ben@virtualiron.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [TAPDISK] honor read-only attributes when creating tap-based VBDsJake Wires2007-02-236-15/+38
| | | | Signed-off-by: Jake Wires <jwires@xensource.com>
* [TAPDISK] handle error case when opening VDIsJake Wires2007-02-231-2/+5
|
* [TAPDISK] minor changes to tapdisk and pluginsJake Wires2007-02-229-143/+224
| | | | | | * open all parent images read-only * expose parent image names to tapdisk (needed for locking api) Signed-off-by: Jake Wires <jwires@xensource.com>
* Fix 64-bit build.kfraser@localhost.localdomain2007-02-171-4/+4
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>