aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap2/vhd
Commit message (Collapse)AuthorAgeFilesLines
* libvhd: use UTC for VHD timestampWei Liu2013-09-031-24/+9
| | | | | | | | | | | | | | | | | | | | | | | [ported from xapi-project/blktap a79ac2c05f9 ("XOP-289: use UTC for VHD timestamps")] Currently, the local timezone is factored into VHD timestamps due to the use of mktime(). This breaks "vhd-util check" for VHDs created in one timezone and then moved westward, which results in "primary footer invalid: creation time in future" errors. Signed-off-by: Andrei Lifchits <andrei.lifchits@citrix.com> Andrei no longer works for Citrix but Germano Percossi (ex-colleague of Andrei) contacted Andrei and confirmed that 1) this work was written on Citrix time, 2) it is OK to have Andrei's SoB. Remove unused variable "tm". Signed-off-by: Germano Percossi <germano.percossi@citrix.com> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap2/libvhd: fix rpmlint warning spurious-executable-permOlaf Hering2012-10-181-1/+1
| | | | | | | | | | | | [ 1758s] xen-devel.x86_64: E: spurious-executable-perm (Badness: 50) /usr/lib64/libvhd.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>
* tools/blktap2: fix build errors caused by Werror inOlaf Hering2012-05-101-1/+1
| | | | | | | | | | | | | | | | | vhd_journal_write_entry -O2 -Wall -Werror triggers these warnings: libvhd-journal.c: In function 'vhd_journal_write_entry': libvhd-journal.c:335: warning: statement with no effect Really return the error from vhd_journal_write() to caller. v2: - simplify the patch by just adding the missing return statement Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Keir Fraser <keir@xen.org>
* blktap2/libvhd: Build shared objects using -fPIC.Ian Campbell2012-02-131-4/+9
| | | | | | 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>
* blktap2/vhd: add -liconv when linking if using libiconvRoger Pau Monne2011-12-201-0/+4
| | | | | | | | | | | | | | | | | If libiconv is detected on the system add -liconv when linking the libvhd library. If -liconv is not added when compiling libvhd with libiconv the following error occours when linking vhd-util and vhd-update: gcc -o vhd-util vhd-util.o -Llib -lvhd lib/libvhd.so: undefined reference to `libiconv_open' lib/libvhd.so: undefined reference to `libiconv_close' lib/libvhd.so: undefined reference to `libiconv' Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Remove $(CFLAGS) from links lines.Ian Campbell2011-03-312-3/+3
| | | | | | | | 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-232-8/+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>
* tools: support building with --as-neededIan Campbell2011-03-171-1/+1
| | | | | | | | | Tested by forcing --as-needed via tools/Rules.mk but this is included since the intention is simply to support diustros which default to --as-needed, not to enable it everywhere. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: link each shared library or binary only against the libraries it usesIan Campbell2011-03-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular if binary A uses libB and libB uses libC entirely internally then A does not need to link against libC only libB. However when linking binary A the linker does need to have visibility of the libraries which libB links against (libC in this example). For out of tree uses this is achieved without fuss due because the libraries are installed in a standard path. However in the case of in-tree users the linker needs a hint in the form of the -rpath-link option. Therefore a new class of build variable, $(SHLIB_FOO), is introduced which includes the linker options needed to link against a library which uses libFOO. The intention is that $(LDLIBS_bar) will include the $(SHLIB_foo)s which it uses where necessary rather requiring that users are aware of this. For the python extensions this change appears particularly large since previously each of python bindings were linked against the union of all possible libraries used by all bindings instead of just what they individually needed. This change removes a dependency on libdl.so from nearly everything in the system, only libxenctrl actually uses it. In the context of xl/libxl the intention of libxl is to remove any need for a user of libxl to know about libxenstore or libxenctrl, however in the current build it is xl which links against those libraries rather than libxl (which only links against libc). After this change libxl correctly depends on the libraries it uses and xl does not depend on libraries which it is not support to be required to know about. Note that xl does depend on libxenctrl.so since it uses xtl_* directly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/blktap2/libvhd: move uuid wrapper functions out of line.Ian Campbell2011-03-172-0/+129
| | | | | | | | | 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-9/+9
| | | | | | | 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-172-2/+2
| | | | | | | | 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-112-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/fs-back: Build fixes for Fedora 13Keir Fraser2010-03-152-0/+2
| | | | | | | | | | | | | 1. Some files use stat, mkfifo, mkdir etc. without including sys/stat.h 2. Some programs link against libpthread without a -lpthread compile option. The compile used to work if this library happened to be used by one of the other libraries that was being linked against, but Fedora 13 has stopped allowing this. From: M A Young <m.a.young@durham.ac.uk> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: Do not append trailing slash to XEN_ROOT in MakefilesKeir Fraser2010-02-042-5/+5
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: Fix compile warning with gcc4.Keir Fraser2009-07-081-0/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: Always check for __linux__ not __Linux__Keir Fraser2009-07-021-5/+5
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* blktap2: A final few NetBSD fixesKeir Fraser2009-06-242-4/+4
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* blktap2: Further netbsd build fixes.Keir Fraser2009-06-244-18/+40
| | | | | 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-2314-145/+151
| | | | | | | | | | | | | - 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/vhd, daemon: serialize subdirs-all and subdirs-installKeir Fraser2009-06-161-3/+3
| | | | | | | | make install in vhd and daemon, subdirs-all and subdirs-install are invoked parallel causing nasty error. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
* blktap2: fix parallel Make.Keir Fraser2009-06-041-2/+5
| | | | | | | | | | | sub make in tools/blktap2/daemon/lib and tools/lvd/lib can be triggered many times at the same time which results in weired link error because one target is linking a library while another target is trying to recreate the library. This patch makes it invoke submake only once. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* blktap2: fix makefile of blktap2Keir Fraser2009-05-282-16/+12
| | | | | | | | | - clean up to use SUBDIRS-y - With parallel make, libvhd might not be created before link. guarantee it. - use LDFLAGS for link which is set by upper level makefiles. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* blktap2: a completely rewritten blktap implementationKeir Fraser2009-05-2621-0/+11142
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>