Daniel Stodden [Mon, 9 May 2011 22:34:19 +0000 (15:34 -0700)]
vhd: Fix uninitialized return value in vhd-util-dm-encrypt.
gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
vhd-util-dm-decrypt.c: In function ‘vhd_util_dm_decrypt’:
vhd-util-dm-decrypt.c:307: warning: ‘err’ may be used uninitialized in this function
make[2]: *** [vhd-util-dm-decrypt.o] Error 1
Using errno, like vhd_stream_load does.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Mon, 9 May 2011 21:50:47 +0000 (14:50 -0700)]
vhd: Fix unitialized vars.
gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
cc1: warnings being treated as errors
vhd-util-dm-encrypt.c: In function ‘vhd_util_dm_encrypt’:
vhd-util-dm-encrypt.c:197: warning: ‘err’ may be used uninitialized..
vhd-util-dm-encrypt.c:199: warning: ‘p2v’ may be used uninitialized..
make[2]: *** [vhd-util-dm-encrypt.o] Error 1
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Mon, 9 May 2011 23:43:52 +0000 (16:43 -0700)]
crypto: Reduce GPR footprint in cpuid.
gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
xts_aes.c: In function ‘cpuid’:
xts_aes.c:49: error: can't find a register in class ‘GENERAL_REGS’
while reloading ‘asm’
It apparently helps just avoid the clobber section.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Add the Linux kernel's aes and aes-xts crypto code to tapdisk and
allow using a different key for each vhd in a vhd chain.
The key directory is specified by setting the TAPDISK2_CRYPTO_KEYDIR
environment variable.
Port from xc/master 7a8f7d5ddf2c70bf5c552a1bc8f0070256015b59
- Reenable u32/u64 typedefs in compat-crypto.h
(gone in vhd since bdf29eb (Fix 64-bit build.))
- Disable duplicate likely/unlikely typedefs in compat-crypto.h
(in compiler.h since 9ce3833d (Add some useful gccisms.)
- Vastly reduce drivers/Makefile delta
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Mon, 29 Aug 2011 03:02:59 +0000 (04:02 +0100)]
ac/vhd: Make libvhdio conditionally only.
Current part/ is not well portable because of the the
Linux header dependencies. But it's optional anyway.
New ENABLE_VHDIO also replaces ENABLE_SHARED, used for
vhdio only.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Sun, 31 Jul 2011 02:20:06 +0000 (19:20 -0700)]
autotools: Build blktap with automake/autoconf.
- XCP source: Remove mk/ subtree.
- Use autoconf/automake.
- Use libtool, solving our library build troubles.
- Need a version. Make that blktap-2.0.90 for now.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Mon, 29 Aug 2011 01:21:24 +0000 (02:21 +0100)]
vhd: Don't rely on resolved_path = NULL feature in realpath().
A resolved_path arg of NULL implies a malloc of just enough space,
standardized since POSIX.1-2008. Not portable to uClibc, failing by a
__nonnull(2) attribute.
Fix with PATH_MAX sized stack buffers, and strdup()s where needed.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Partial revert of 569:9f795e737459 (EA-1001: Build VBD ring macros
from kernel, not xen headers). Dropping KBUILD dependencies after
resorting to a private copy of the linux headers.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Wed, 13 Jul 2011 20:51:37 +0000 (13:51 -0700)]
VHD: Improve misleading result code from failing vhd_parent_locator_get.
Presently always comes back with -EINVAL, due to a final
vhd_parent_locator_read failing. Fix returns -EINVAL when without
candidates altogether, and the last vhd_find_parent results
otherwise. Such as -ENOENT.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Tue, 28 Jun 2011 01:08:57 +0000 (18:08 -0700)]
CA-61156: control: Anticipate tap-ctl-spawn racing a bugtool killall -USR1.
There's a race between tapdisk's sigaction init and xen-bugtool
shooting debug signals under RT stress. If killed by something as
innocuous as USR1, then just retry the fork().
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Mike McClurg [Tue, 7 Jun 2011 18:35:30 +0000 (19:35 +0100)]
Make blktap portable to Ubuntu
These are changes mostly required by gcc 4.5, with the exception of the change
to Config.mk, which inserts some make variables that we expect to be inserted
by the spec file. The rest of the changes are including missing headers,
initialising a variable and providing a mode when opening a file.
Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Daniel Stodden [Mon, 23 May 2011 02:23:46 +0000 (19:23 -0700)]
MAR-125: Add driver log rate limits.
Allocates one td-loglimit instance per driver instance. Present burst
size is 16 messages, over an interval of 90 seconds. To be shared by
both driver code and the VBD.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Mon, 23 May 2011 02:23:45 +0000 (19:23 -0700)]
MAR-125: Support log rate limiting.
Much like Linux's ratelimit. Allow for message bursts of some size,
count messages as they pass. Drop messages once the burst size was
exceeded within a given interval. Next interval resets the count.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Daniel Stodden [Sat, 16 Apr 2011 00:56:11 +0000 (17:56 -0700)]
XOP-38: (lcache) Detect out-of-space conditions before write() does.
Test free space in the caching SR before attempting to store our
reads. VHD block allocation writes on Ext3 have the nasty property of
blocking excessively after running out of space. We therefore
enable/disable ourselves at a 1/s granularity, querying free space
through statfs beforehand.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>