aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap2
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>
* tools: remove in tree libaioIan Campbell2013-08-201-7/+0
| | | | | | | | | | | | | | | We have defaulted to using the system libaio for a while now and I din't think there are any relevant distros which don't have it that running Xen 4.4 would be reasonable on. Also it has caused confusion because it is not ever wanted on ARM, but the build system doesn't express that (could be fixed, but deleting is the right thing to do anyway). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Matt Wilson <msw@amazon.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap2: use sys/eventfd.h if it is availableIan Campbell2013-04-111-0/+12
| | | | | | | | | | arm64 only has the eventfd2 system call and using the libc wrapper when available hides this from us. eventfd() has been in libc since glibc 2.8. This code is already Linux specific. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/blktap2: Handle read/write interrupts in blktap2 control plane.Dr. Greg Wettstein2013-03-281-2/+8
| | | | | | | | | | | | | | | | | | | | | | The following patch: tools: Retry blktap2 tapdisk message on interrupt. Addressed a long standing regression with the blktap2 control plane. An interruption of the select system call would prematurely terminate the message sequence needed to properly shutdown a blktap2 tapdisk instance. Ian Jackson correctly noted that the read and write systems calls responsible for receiving and sending the control messages could also return EINTR resulting in similar effects. While this regression was not noted in field testing this patch adds support to re-start the calls to provide a technically complete implementation of control plane management in the presence of signals. Signed-off-by: Dr. Greg Wettstein <xen@wind.enjellic.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Retry blktap2 tapdisk message on interrupt.Dr. Greg Wettstein2013-03-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-start blktap2 IPC select call on interrupt. We hunted this miserable bug for a long time. The teardown of a blktap2 tapdisk instance is being carried out inconsistently up to and including the 4.2.1 release. The problem appears to be a classic 'Heisenbug' which disappears if a single function call is added to the tapdisk shutdown path. It is likely this bug has been in existence for the life of the blktap2 code. Control messages to manipulate a tapdisk instance are sent over a UNIX domain socket. A select call is used on both the read and write paths to wait on I/O and to set a timeout for the transmission and reception of the control plane messages. The existing code fails receipt or transmission of the control message on any type of error return from the select call. The xl control process receives an interrupt while waiting in the select call which in turn causes an error return with SIGINT as the return code. This prematurely terminates the teardown of the tapdisk instance leaving it in various states of shutdown. Since multiple messages are needed to implement a full teardown the tapdisk instance can be left in various states ranging from fully connected to only the minor being left allocated. The fix is straight forward. Check the return code from the select call and re-try read or write of the control message if errno is sent to EINTR. The problem manifests itself in the read path but there appears to be little reason to not add the fix to the write path as well. Both paths appear to be cut-and-paste copies of each other. Signed-off-by: Dr. Greg Wettstein <greg@enjellic.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Fix memset(&p,0,sizeof(p)) idiom in several places.Michael Young2013-02-131-1/+1
| | | | | | | | | gcc 4.8 identifies several places where code of the form memset(x, 0, sizeof(x)); is used incorrectly, meaning that less memory is set to zero than required. Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Committed-by: Keir Fraser <keir@xen.org>
* tools: Remove the vtpm process modelMatthew Fioravante2012-11-135-13/+0
| | | | | | | | | Remove the old vtpm process model. It doesn't work very well and is no longer supported. Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@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>
* blktap2: Fix naked unchecked uses of read/write/chdir.Keir Fraser2012-05-117-8/+56
| | | | | | | These cause warnings under warn_unused_result, and for read/write we ought to deal with partial io results. Signed-off-by: Keir Fraser <keir@xen.org>
* blktap2: Fix another uninitialised value errorIan Jackson2012-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | gcc -O1 -fno-omit-frame-pointer -m32 -march=i686 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD -MF .block-remus.o.d -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -mno-tls-direct-seg-refs -Werror -g -Wno-unused -fno-strict-aliasing -I../include -I../drivers -I/home/osstest/build.12828.build-i386/xen-unstable/tools/blktap2/drivers/../../../tools/libxc -I/home/osstest/build.12828.build-i386/xen-unstable/tools/blktap2/drivers/../../../tools/include -D_GNU_SOURCE -DUSE_NFS_LOCKS -c -o block-remus.o block-remus.c block-remus.c: In function 'ramdisk_flush': block-remus.c:508: error: 'buf' may be used uninitialized in this function make[5]: *** [block-remus.o] Error 1 This is because gcc can see that merge_requests doesn't always set *mergedbuf but gcc isn't able to prove that it always does so if merge_requests returns 0 and that in that case the value of ramdisk_flush::buf isn't used. This is too useful a warning to disable, despite the occasional false positive of this form. The conventional approach is to suppress the warning by explicitly initialising the variable to 0. This has just come to light because 25275:27d63b9f111a reenabled optimisation for this area of code, and gcc's data flow analysis (which is required to trigger the uninitialised variable warning) only occurs when optimisation is turned on. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap2: Do not build with -O0Keir Fraser2012-05-101-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* blktap2: Fix uninitialised value error.Keir Fraser2012-05-101-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* tools/blktap2: fix out of bounds access in block-log.cOlaf Hering2012-05-101-2/+2
| | | | | | | | | | | | | | block-log.c: In function 'ctl_close_sock': block-log.c:363:23: warning: array subscript is above array bounds [-Warray-bounds] Adjust loop condition in ctl_close_sock() to fix warning. Adjust array acccess in ctl_close() to actually access the array member. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* 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>
* tools/blktap2: fix 'make clean'Tim Deegan2012-04-051-1/+1
| | | | | Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools/blktap: reorder MEMSHR_DIR to fix CFLAGSOlaf Hering2012-03-141-3/+2
| | | | | | | | | | | In blktap2 MEMSHR_DIR is used before it is set. This removes the required -D_GNU_SOURCE from CFLAGS, its used as option for -I Fix this by moving memshr related flags to the place where its actually used. The failure is a missing O_DIRECT define. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tapdisk2: initialize 'name' parameter of BLKTAP2_IOCTL_CREATE_DEVICEJan Beulich2012-03-141-0/+1
| | | | | | | | This keeps the kernel driver from printing garbage. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* 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>
* Update memshr API and toolsAndres Lagar-Cavilla2012-01-262-4/+4
| | | | | | | | | | | | | | | | | | | | | | | This patch is the folded version of API updates, along with the associated tool changes to ensure that the build is always consistent. API updates: - The source domain in the sharing calls is no longer assumed to be dom0. - Previously, the mem sharing code would return an opaque handle to index shared pages (and nominees) in its global hash table. By removing the hash table, the handle becomes a version, to avoid sharing a stale version of a page. Thus, libxc wrappers and tools need to be updated to recall the share functions with the information needed to fetch the page (which they readily have). Tool updates: The only (in-tree, that we know of) consumer of the mem sharing API is the memshr tool. This is updated to use the new API. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* 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>
* blktap2: remove local definitions and include byteswap.hRoger Pau Monne2011-12-201-37/+2
| | | | | | | | | | | Use the same approach as tools/blktap2/include/libvhd.h, remove local definitions of bswap* and include byteswap.h. Also remove the HAVE_BYTESWAP_H ifdef, since it was not defined in this context (it's defined by QEMU). 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>
* Add correct const-ness to memshr tool functionsAndres Lagar-Cavilla2012-01-102-1/+5
| | | | | | | | | | This patch addresses some of the compile and link issues with the memshr module. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: propagate error from tap_ctl_spawn.Ian Campbell2011-11-281-1/+3
| | | | | | | | | Failure here means that a disk will not be correctly setup. I briefly scanned tools/blktap2/control.c for other goto constructs which did not set their err variable but didn't see any others. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: use system installed libaio by default.Ian Campbell2011-11-221-4/+8
| | | | | | | | | | | | | | | | | | | | I could have sworn I did this years ago. IIRC the need for our own copy was due to the use of io_set_eventfd which is not present in version 0.3.106. However it is in 0.3.107 the first version of which was uploaded to Debian in June 2008 (I can't find a better reference for the release date). The necessary version is available in Debian Lenny onwards and is in at least RHEL 6, Fedora 13 and OpenSuSE 11.3. The necessary version appears to not be available in RHEL 5 or SLES 11 which is why I haven't simply nuked the in tree version. This is based on tools-system-libaio.diff from the Debian packaging although I have made it optional (but default on). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: attempt to cleanup tapdisk processes on disk backend destroy.Ian Campbell2011-09-282-7/+7
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: merge several bitop functions into xc_bitops.hOlaf Hering2011-06-101-26/+3
| | | | | | | | | | | | | | | | | | | | | | | | Bitmaps are used in save/restore, xenpaging and blktap2. Merge the code into a private xc_bitops.h file. All users are single threaded, so locking is not an issue. The array of bits is handled as volatile because the x86 save/restore code passes the bitmap to the hypervisor which in turn modifies the bitmap. blktap2 uses a private bitmap. There was a possible overflow in the bitmap_size() function, the remainder was not considered. ia64 save/restore uses a bitmap to send the number of vcpus to the host. x86 save/restore uses a bitmap to track dirty pages. This bitmap is shared with the hypervisor. An unused function count_bits() was removed and a new bitmap_size() function is now used. xenpaging uses 3 private bitmaps to track the gfns which are in paged-out state. It had a copy of some Linux bitops.h, which is now obsolete. Also the BITS_PER_LONG macro was hardcoded to 64 which made it impossible to run 32bit tools on a 64bit host. Wether this works at all has to be tested, yet. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools/blktap2: tapdisk2 executable usage message documents -D optionPhilipp Hahn2011-06-211-1/+1
| | | | | Signed-off-by: Philipp Hahn <hahn@univention.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remus: blktap2/block-remus.c - potential write-after-write race fixShriram Rajagopalan2011-05-261-66/+125
| | | | | | | | | | | | | At the end of a checkpoint, when a new flush (of buffered disk writes) is merged with ongoing flush, we have to make sure that none of the new disk I/O requests overlap with ones in in progress. If it does, hold the request and dont issue I/O until the overlapping one finishes. If we allow the I/O to proceed, we might end up with two overlapping requests in the disk's queue and the disk may not offer any guarantee on which one is written first. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Remove $(CFLAGS) from links lines.Ian Campbell2011-03-314-6/+6
| | | | | | | | 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: blktap2: copy xenstore/hashtable.h into blktap2 (really)Ian Jackson2011-03-312-0/+296
| | | | hg add the missing files from 23112:e15ca5c3effc
* tools: blktap2: copy xenstore/hashtable.h into blktap2Ian Campbell2011-03-314-2/+16
| | | | | | | | | | | | | hashtable.c has already been copied, forked and modified, there doesn't seem much point in avoiding the same for the header until someone feels motivated to properly refactor. Add comments to the various duplicated files cross-referencing each other for future reference and as a barrier to forking again... 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-234-16/+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: consistently use $({CFLAGS,LDLIBS}_libxenctrl) instead of open coding.Ian Campbell2011-03-212-2/+2
| | | | | | 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: consistently use $(CFLAGS_xeninclude) instead of open coding.Ian Campbell2011-03-211-1/+2
| | | | | | | | Renamed from the slightly ambiguous CFLAGS_include. 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: do not link against unused libraries.Ian Campbell2011-03-171-12/+8
| | | | | | | | | | | | | | | | | A fair few things under tools link against libraries which they don't even use. Most of this appears to come from copy-and-pasting previous Makefile snippets and cargo-culting plus the tendency to define global $(LIBS) even for Makefiles which build multiple separate utilities or libraries. Identified by comparing a build with --as-needed to one without by looking at the NEEDED header of all ELF objects. 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-172-7/+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-173-82/+144
| | | | | | | | | 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-179-35/+35
| | | | | | | 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-177-7/+7
| | | | | | | | 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: fix gap in tapdisk2 disk_type numberingShriram Rajagopalan2011-03-071-3/+3
| | | | | | | | | | | | | Make the DISK_TYPE_* id numbering in tapdisk-disktypes.h contiguous. Currently, id 8 is unallocated causing a null disk type entry in tapdisk_disk_drivers array in tapdisk-disktypes.c. This causes the function tapdisk_disktype_find() to return an error on encountering disk types >7 (remus:, log:, etc.). Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Daniel Stodden <daniel.stodden@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* remus: fix incorrect disk_info_t initializationShriram Rajagopalan2011-02-251-2/+2
| | | | | | | | | Fix tapdisk-disktype.c's initialization for remus' disk_info_t, which is currently initializing the disk name with disk description. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* 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>
* tools/blktap, blktap2: include <sys/mount.h> instead of <linux/fs.h>Ian Campbell2011-01-171-2/+2
| | | | | | | | | | | | The former is a userspace sanitised header which contains the definitions we need. In some distros linux/fs.h defines WRITE which conflicts with blktaps own use of that name. Also there is no reason to use <linux/errno.h> over the more normal <errno.h>. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap2: Makefiles: delete symlinks and deps during make cleanGianni Tedesco2010-10-282-1/+2
| | | | | Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* add SONAME to libblktapctl.soOlaf Hering2010-08-121-10/+25
| | | | | | | | | | | | Add an SONAME to libblktapctl.so. Install static library as data to avoid executable permissions in the .a file. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- tools/blktap2/control/Makefile | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-)
* split LDLIBS from LDFLAGS to fix link errors in recent toolchainsStefano Stabellini2010-08-114-10/+10
| | | | | | | | | | | | | | | | 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>
* libblktapctl: fix use-after-free bugGianni Tedesco2010-08-031-2/+2
| | | | | | | | | | This has not caused crashes because generally use after free is OK provided nothing else is going on. However the patch makes things correct. It also allows us to use heap poisoning feature of valgrind on tools linking to libblktapctl. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* blktap2: make protocol specific usage of shared sring explicitKeir Fraser2010-07-021-1/+1
| | | | | | | | | | | | | | | I don't think protocol specific data really belongs in this header but since it is already there and we seem to be stuck with it let's at least make the users explicit lest people get caught out by future new fields moving the pad field around. This is the Xen portion of this change. The kernel portion will be sent separately. There is no dependency between the two. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Daniel Stodden <daniel.stodden@citrix.com> Cc: Dongxiao Xu <dongxiao.xu@intel.com>
* blktap2: Build libblktapctl.soKeir Fraser2010-06-102-9/+17
| | | | Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>