aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap/lib
Commit message (Collapse)AuthorAgeFilesLines
* blktap: fix rpmlint warning spurious-executable-permOlaf Hering2012-10-181-4/+6
| | | | | | | | | | | | [ 1758s] xen-devel.x86_64: E: spurious-executable-perm (Badness: 50) /usr/lib64/libblktap.a [ 1758s] The file is installed with executable permissions, but was identified as one [ 1758s] that probably should not be executable. Verify if the executable bits are [ 1758s] desired, and remove if not. NOTE: example scripts should be packaged under [ 1758s] %docdir/examples, which will avoid this warning. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* nstore: rename public xenstore headersIan Campbell2012-05-143-3/+3
| | | | | | | | | | | | | | | | | | | | | | The xenstore header xs.h is producing conflicts with other software[1]. xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems. [1]: http://bugs.debian.org/668550 [ Also update QEMU_TAG, to bring in corresponding change to qemu-xen-traditional. -iwj ] Signed-off-by: Bastian Blank <waldi@debian.org> 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> --HG-- rename : tools/xenstore/xs.h => tools/xenstore/xenstore.h rename : tools/xenstore/xs_lib.h => tools/xenstore/xenstore_lib.h
* tools: Remove $(CFLAGS) from links lines.Ian Campbell2011-03-311-1/+1
| | | | | | | | The relevant variable in these circumstances is called $(LDFLAGS). 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>
* tools: drop further uses of -Wp,-MD,.$(@F).d to generate dependencies.Ian Campbell2011-03-231-4/+0
| | | | | | | | | | 19025:bd78714b8594 switched to "-MMD -MF" in preference, adding the correct runes to tools/Rules.mk but appears to have missed some other uses of -Wp,... 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>
* 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>
* tools/Makefiles: install libvhd and libblktap with INSTALL_PROGMichael Young2011-02-011-1/+1
| | | | | | | | | | | Shared libraries should be executable. (rpm (4.9.0) doesn't automatically supply a "provides" entry for a library unless it is executable. Non-executable libraries can cause other trouble too.) Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* split LDLIBS from LDFLAGS to fix link errors in recent toolchainsStefano Stabellini2010-08-111-3/+3
| | | | | | | | | | | | | | | | Linker command lines are order-sensitive. Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new variable after the objects to link. This resolves build errors in xenpagin and blktap with recent toolchains. rename SHLIB_CFLAGS to SHLIB_LDFLAGS rename LDFLAGS_* to LDLIBS_* move LDFLAGS usage after CFLAGS in CC calls remove stale comments in xenpaging Makefile Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.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>
* blktap: fix blktapctrl abortKeir Fraser2010-01-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | On rebooting a hvm, the blktapctrl daemon has died. gdb shows the following call trace: (gdb) where #0 0x00000039d1830155 in raise () from /lib64/libc.so.6 #1 0x00000039d1831bf0 in abort () from /lib64/libc.so.6 #2 0x00000039d186a38b in __libc_message () from /lib64/libc.so.6 #3 0x00000039d1871634 in _int_free () from /lib64/libc.so.6 #4 0x00000039d1874c5c in free () from /lib64/libc.so.6 #5 0x0000003320a01bdd in ueblktap_probe (h=3D0x6073b0,=20 w=<value optimized out>, bepath_im=<value optimized out>) at xenbus.c:270 #6 0x0000003320a020e0 in xs_fire_next_watch (h=3D0x6073b0) at xs_api.c:355 #7 0x0000000000401785 in main (argc=3D<value optimized out>, argv=<value optimized out>) at blktapctrl.c:907 There is a case that "/local/domain/0/backend/tap/<dom_id>" exists but "/local/domain/<dom_id>/vm" is not in the xenstore. Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* blktap: Fix check_sharing() in blktapctrlKeir Fraser2009-10-231-19/+50
| | | | | | | | | | | check_sharing() in blktapctrl does not work. - It accesses to xenstore by using wrong paths. - It compares image paths including image types. - It misjudges a return value of strcmp(). This patch fixes those mistakes. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* blktap: Move error signaling to blktapctrlKeir Fraser2009-03-121-2/+148
| | | | | | | | | | | | Until now the udev script for blktap devices needs to decide if to signal success or failure to xend. As this script runs completely independent of blktapctrl and tapdisk/ioemu which do the real work, the udev script can't even theoretically know if tapdisk is happy. This patch removes the udev script and replaces its checks by new ones in libblktap. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* blktap: Export disk type constants for ioemuKeir Fraser2009-03-121-0/+10
| | | | | | | | | Currently all disk types that are supported are defined in a header file private to blktapctrl and tapdisk. When restoring ioemu as a backend for blktap these constants are needed by ioemu, so move them to a more public header file. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* libblktap: Remove trailing null byte in xs_printfKeir Fraser2008-10-021-1/+1
| | | | | | | | | | | | xs_printf writes the terminating null byte of the passed string to Xenstore. When reading, the null byte is returned in the following form which confuses tools: sector-size = "512\000" This patch removes the null byte from the data to write. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* blktap: Clean *.opic on 'make clean'.Keir Fraser2008-07-241-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap: cleanupKeir Fraser2008-07-112-4/+3
| | | | | | | Make functions w/o a prototype static and remove redundant declaration of xs_fire_next_watch(). Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Blktapctrl compatibility layerKeir Fraser2008-07-091-1/+7
| | | | | | | | | | | I originally had just changed the NEWINTF ioctl to send over 48-bits of information, which works on 64-bit but not on 32-bit (since the arg is an unsigned long). Additionally, the previous changes would break an older userland against a new kernel. For that reason, introduce a new ioctl (NEWINTF_EXT) that fixes both of these problems. This is the dom0 userland side. Signed-off-by: Chris Lalancette <clalance@redhat.com>
* blktap: Extend userland busid to 32 bitsKeir Fraser2008-06-271-1/+1
| | | | Signed-off-by: Chris Lalancette <clalance@redhat.com>
* Use ioemu block drivers through blktap.Keir Fraser2008-03-181-10/+0
| | | | | | | | | | 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-171-16/+13
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Define CFLAGS and LDFLAGS for libxenstore.Keir Fraser2008-01-271-2/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Move generation of public header hierarchy into the tools.Keir Fraser2008-01-261-1/+1
| | | | | | | 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-261-2/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Add SBINDIR. Use it always.Keir Fraser2008-01-221-2/+0
| | | | 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-171-1/+1
| | | | | | | 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>
* 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-053-3/+8
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* blktap: remove unused headers.Keir Fraser2007-12-042-2/+0
| | | | | | | | | | 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 unaligned access to blktap/tapdisk message payloads.kfraser@localhost.localdomain2007-08-011-1/+3
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Specify -fno-strict-aliasing in root build config file.Keir Fraser2007-07-071-1/+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>
* tools: warn_unused_result build fixes.kfraser@localhost.localdomain2007-06-122-27/+24
| | | | | | | | | | | | 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>
* 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>
* Put blktap character device back into /dev/xen.Brendan Cully2007-05-021-1/+2
| | | | | | Changeset 14895:800aa9f5cec9 accidentally moved it into /var/run/tap along with the control FIFOs. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* [TAPDISK] Move tapdisk control files from /dev/xen to /var/run/tapJake Wires2007-04-231-1/+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-232-2/+6
| | | | Signed-off-by: Jake Wires <jwires@xensource.com>
* [TAPDISK] add tapdisk support for image chainingJake Wires2007-02-162-7/+14
| | | | | | | | Enables tapdisk to chain an arbitrary number of VDIs, propagating reads of holes in children to their parent images. Introduces two new functions to the tapdisk interface to facilitate this. Modifies the QCoW plugin to take advantage of these changes, thus providing support for arbitrarily long chains of QCoW image types.
* [BLKTAP] Use lartge enough types to express parameters of large block devices.kfraser@localhost.localdomain2006-11-282-7/+7
| | | | | | | | | | | | | | | | | | | | While the kernel side of blktap drivers is using 64-bit sector numbers correctly when reporting disk sizing, the userspace parts where this dat is actually generated is truncating at 32-bit. There are 3 variables related to disk sizing which are used in the kernel/userspace code 'size', 'sector size' & 'info'. In kernel space these are treated as being unsigned long long, unsigned long, and unsigned int, respectively. In the blktap userspace code this were all varyingly long, unsigned long. This mismatch caused 32-bit wraparound on large disks. The attached patch updates the blktap userspace to use the same data types as kernel space for all these params, thus both fixing the 32-bit bug & giving the code consistency. This patch has been tested both by comparing /proc/partitions in the guest, with the image size seen in the host, and by using Stephen Tweedie's 'verify-data' tool on a variety of multi-TB sized disks. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* [TOOLS] Provide common LFS CFLAGS/LDFLAGS additions in Rules.mk.kfraser@localhost.localdomain2006-11-171-1/+0
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [BLKTAP] Various cleanups necessary for ia64 support.kfraser@localhost.localdomain2006-11-071-4/+3
| | | | | | | | | | | | | | | | - remove magic number 8 and 64. page size / sector size is 8 on x86, however on ia64 page size is 16kb. blkring size is 64 on x86. however it's 128 on ia64. - replace 0xFFFF with INVALID_GRANT_HANDLE - don't map io ring into user space with uncachable. kernel access the page with cacable and tapdisk uses memory barrier so that it isn't necessary. - remove printk warning and inserted new line. - remove unused variable, page. - add one BUG() Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* [SOLARIS] On Solaris, GCC is configured to use Sun's LD. Fix the build to usekfraser@localhost.localdomain2006-10-171-2/+2
| | | | | | the correct flags, and link against libsocket where necessary. Signed-off-by: John Levon <john.levon@sun.com>
* Clean up duplication of 'install' macros in the Makefiles.kfraser@localhost.localdomain2006-10-171-4/+0
| | | | Signed-off-by: John Levon <john.levon@sun.com>
* [BLKTAP] Fix trivial indentation snafu in previous changeset.kfraser@localhost.localdomain2006-10-061-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [BLKTAP] Fix crash at start-of-day in blktapctrldkfraser@localhost.localdomain2006-10-061-0/+2
| | | | | if /local/domain does not exist. Signed-off-by: Keir Fraser <keir@xensource.com>
* [BLKTAP] Formatting and style cleanups to blktapctrl.kfraser@localhost.localdomain2006-10-062-138/+117
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [BLKTAP] Blktapctrl: Add asynchronous watch on dom0 name entry for ↵jchesterfield@dhcp92.uk.xensource.com2006-10-054-12/+73
| | | | | | | blktapctrl on startup. This patch cleans up the synchronisation issues between blktapctrl and xend at initialisation if the Dom0 entries have not yet been populated. Signed-off-by: Julian Chesterfield <julian@xensource.com>
* [BLKTAP] have blktap use a dynamic majorAndrew Warfield2006-09-281-1/+2
| | | | | | | | | | | | blktap currently uses a hardcoded major of 254 for the device. This is not robust in anyway and needs to be dynamic. Note: it is better not to have the daemon create the node, and have udev create it instead. But since the daemon currently creates the node anyway, it is still the way this is done. That change needs to be made at another time. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
* Fix typo.Andrew Warfield2006-08-291-1/+1
| | | | Signed-off-by: <andy@xensource.com>