CA-146166: don't create io_ring uninitialised

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Flavien Quesnel <flavien.quesnel@citrix.com>

GitHub: closes #132 on xapi-project/blktap
CA-147141: Fix includes in tapdisk-interface.h

As tapdisk-interface.h was referencing to types which were not defined,
so automatic mock creation failed. With this fix, the file should
compile on its own.

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-147141: Move declarations to source file

These inline methods were declared in the header file, and the unit
testing framework failed to create mock implementations. Moving the
declarations to the source file to avoid this problem.

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-147141: Add example noop unit tests

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-147141: Test tapdisk_xenblkif_complete_request

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-147141: Rename test methods, add documentation

blktap is using the underscore convention, so using the same notation in
the tests as well. Also added some comments to explain the tests.

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

GitHub: closes #131 on xapi-project/blktap
CA-146660: prefix all errors messages with tap-err

This is consistent with the other path of logging (using sylog(3)), and
facilitates debugging.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
CA-146660: print error message instead of errno

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
Merge branch 'CA-146660' into xs64bit

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

GitHub: closes #134 on xapi-project/blktap
CA-147159: don't spam the logs for low mem mode event

Although knowing when tapdisk enters in or exits from low memory mode is
a useful piece of information for debugging, the logs get severely
spammed in the presence of many VBDs, increasing the chances that dom0
runs out of disk space.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>

GitHub: closes #136 on xapi-project/blktap
CA-145685: Fix size and offset for read requests

Signed-off-by: Flavien Quesnel <flavien.quesnel@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>

GitHub: closes #133 on xapi-project/blktap