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
EA-1158: rebase blktap3
EA-1158: misc fixes
EA-1128: Renamed NBD fd recv vars for clarity and use a new fd/id pair
for the UNIX domain socket.
EA-1158: use a UUID as the VBD identifier plus other fixes
EA-1158: Use absolute value when reporting error in tap-ctl
EA-1158: Fix warning because of uninitialised var.
EA-1158: Add missing break in switch
CP-5960: Add tapback init.d script

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
CP-5960: RPM pack the tapback init script

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
CP-5961: disable DEBUG level logging in daemon mode

DEBUG level logging should only appear in the non-daemon debug mode (with "-D" flag).

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
CP-5961: adopt blktap's standard logging facility in blktap3 new files

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
EA-1158/CP-5952: Remove xenstore paths XAPI waits for during shutdown.

Also, return EALREADY when already connected to the sring and correct
the error code sign in xenblkif_connect.

This is a temporary fix. In EA-1254 the udev scripts are run manually.
When that EA is available we should revert this commit.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Zheng Li <zheng.li@citrix.com>
EA-1158/CP-5958: Replace assert with ASSERT

Calls to assert() kills tapdisk without leaving a clue. Using ASSERT
macro first logs and then kills tapdisk. The change is performed only
on the assert calls introduced by EA-1158.

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

Github closes: #52 on xapi-projects/blktap
EA-1158/CP-5963: Updated blktap version to 3.0.0

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

Github closes: #51 on xapi-projects/blktap
CP-5946: remove the sleep hack around xc_evtchn_bind_interdomain

The sleep hack was originally introduced to work around a failure
around xc_evtchn_bind_interdomain. With the new 3.x kernel, I
couldn't reproduce the failure with this hack commented out. I
tried iterations of tests on a few different setups on different
hardware, the result seems persistent. So I'd propose to remove
the hack, and hopefully it should just work. We can investigate
further if any new problem is spot later.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>

Github: close #53 on xapi-project/blktap
EA-1158/CP-5965: Replace minor with UUID

Plus clean up and removal of some obsolete files.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Acked-by: Zheng Li <zheng.li@citrix.com>
EA-1158/CP-5965: Document tap-ctl-stats output

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Acked-by: Zheng Li <zheng.li@citrix.com>
EA-1158/CP-5965: Don't forward READs when in mirroring mode.

Also, fix a tap-ctl-stats bug, plus minor code clean up.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Acked-by: Zheng Li <zheng.li@citrix.com>