CA-113322: let vhd-util-modify canonicalize the parent path passed in.

We shouldn't rely on the caller to always pass in sanctified paths.With
the new dev mapper linking/mapping convention, the realpath function
applied on the caller (SM) won't give the kind of path vhd-util-modify
expects (I'll create another patchset in SM to address this).

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #46 on xapi-project/blktap
SCTX-1536: Option to use the back-up footer instead of the primary one.

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

GitHub: closes #55 on xapi-project/blktap
CA-116436: Don't access pre-allocated but unwritten BAT entries

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

GitHub: closes #57 on xapi-project/blktap
CA-116448: Don't die by writing to mem address 0x0, call abort() instead.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #56 on xapi-project/blktap
CA-113543: Don't spam syslog for benign request failures.

This was most likely a debug print added when the NBD funcionality was
implemented. tapdisk either way complains about failed requests
elsewhere.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Acked-by: Germano Percossi <germano.percossi@citrix.com>

GitHub: closes #59 on xapi-project/blktap
CA-120823: Don't use a tmp file for logging and handle SIGHUP

tapdisk now handles the SIGHUP signal, closing and opening the log file
in order to allow logrotate to rotate the log file.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>

GitHub: closes #61 on xapi-project/blktap
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
Fix compile errors on Ubuntu 13.10 (gcc 4.8.1-10ubuntu8)

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #58 on xapi-project/blktap
CA-122252: Kill requests if the VBD resume has failed

If a resume operation fails (e.g. the LUN has gone offline) on a
previously paused VBD for which there are pending requests, these
requests will never be completed. This results in blkback not being
able to shutdown as it waits for pending requests to be completed. This
patch addresses this problem by killing all requests in the event of a
failed resume. If the problem for which the resume failed is fixed,
resuming again the VBD should work.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>

GitHub: closes #65 on xapi-project/blktap
add mk/config.log to .gitignore

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-122162: immediately fail request when reaching 2TiB limit

When hitting the 2TiB limit, fail the request with ENOSPC instead of
EIO, because tapdisk retries requests that have failed with EIO hoping
that the request will utterly succeeded, which can never happen in our
case.

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

GitHub: closes #68 on xapi-project/blktap