CA-88376: Reset the nbd_mirror_failed flag when disabling mirroring

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
fixed passing bdev read only flag to blktap2 kernel module
CA-90801: add option to skip block overlap check

Checking for block overlap is O(n^2) in the number of VHD blocks and can take
minutes for very large VHDs, which cannot be afforded during leaf-coalesce
while the tapdisk is paused.
Fix the "does break strict-aliasing rules" warning

This warning breaks the standalone compilation because of -Werror.
CA-98950: fix coalescing with small ancestors.

When the virtual size of the coalesce target's ancestors (grandparent & above,
since the parent's size must match the target's) is smaller (due to a resize),
vhd-util coalesce might incorrectly error out with ERANGE when reading a
sector(s) in a partial block beyond the smaller ancestor's size.
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.
CA-108155: Return EIO when the extent sector offset wraps around

    Import: trunk/blktap 751ea7f306fb107e98f1c2abbcb7f02e0bc854c5
    Imported-by: vineetht
    Merge-ticket: CA-118474
CA-108155: Fixed missing definition of ULLOG_MAX in our uclibc

Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>

    Import: trunk/blktap 8dc993fe8930c4d16ab96ac7f9b6832fb2e9d3b5
    Imported-by: vineetht
    Merge-ticket: CA-118474
CA-108155: fix 64-bit compilation

    Import: trunk/blktap 6ec5bc0002b966be7d9989564940908a322504e9
    Imported-by: vineetht
    Merge-ticket: CA-118474
CP-6999: Allow coalescing to out-of-chain parents.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Keith Petley <keith.petley@citrix.com>

GitHub: closes #63 on xapi-project/blktap
old xen provides xs.h instead of xenstore.h

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-130898: use 32-bit protocol with guest if omitted

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-132059: use PID file to tell whether or not tapback is running

Clearwater CentOS doesn't contain lsof, so we need to rely on a PID
file.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-127680: use per-tapback log

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-127680: clean up tapback logs

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-127680: remove transaction separation debug prints

This is now unnecessary each domain's log is inherently clean.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-127680: split tapback to master and slave

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-127680: use the correct sub-tree in slave

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-127680: probe domain  before slave exit

The entire domain may be removed in one go so all devices need to be
torn down.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-127680: initialise var to suppress silly compilation error

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>