CA-135969: disable verbose messages in tapback

They seem to significantly delay tapback's execution.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Mate Lakat <mate.lakat@citrix.com>
CA-135969: don't log to separate file, use syslog instead

Not logging to syslog leads to nasty lock ups and long delays.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Mate Lakat <mate.lakat@citrix.com>
Merge branch 'CA-135969' into xs64bit

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

GitHub: closes #90 on xapi-project/blktap
Revert "Merge branch 'CA-135969' into xs64bit"

This reverts commit b1ea896f36e6c2c0bca8496fcb668a95411c09cb, reversing
changes made to 246b35670f68410c1f589c99bbddc69858f59032. Revert required
to fix BVT.
CA-137830: enable memory caching for the VHD cache in IntelliCache

This patch enables memory caching for the VHD file acting as the cache
in IntelliCache, despite the fact that it is opened in R/W mode. Without
this, read caching interacts badly with IntelliCahce. This is safe to do
so as the cache file is always thrown away.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
CA-137830: change behaviour of vhd_cache_enabled

vhd_cache_enabled must return true not only if the VHD_CACHED_ENABLED
bit is set, but also if the VHD file in opened in read only mode
(VHD_OPEN_RDWR is not set). This ensures that if the leaf is opened R/W
and for buffered I/O (which is the case for IntelliCache), the parent
chain is is not considered 'cached'.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
CA-137830: don't pass TD_OPEN_NO_O_DIRECT to parent in IntelliCache

If IntelliCache is used, TD_OPEN_NO_O_DIRECT must not be passed to the
parent otherwise tapdisk will perform buffered I/O to the parent, and
this is meaningless as each block read from the parent is only read
once.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Merge branch 'CA-137830' into xs64bit

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

GitHub: closes #94 on xapi-project/blktap
CAR-1442: Allow 'tap-ctl create' to disable O_DIRECT

Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>

GitHub: closes #86 on xapi-project/blktap
Revert "Revert "Merge branch 'CA-135969' into xs64bit""

This reverts commit 0ef84c6b7c3a6f43e9e7315bbae5aec029f04e0d.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-135969: block all other signals

And use sigaction for handling signals.

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