New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CP-7835: merge blktap3 #70

Merged
merged 78 commits into from Mar 17, 2014

Conversation

Projects
None yet
3 participants
@tmakatos
Contributor

tmakatos commented Mar 17, 2014

In blktap3 we re-engineer the data path and connect the front-end directly to tapdisk, so blkback and blktap are no longer necessary but still used to provide a way for dom0 tools to access the VM's data. As blkback can no longer be used to run the Xenbus protocol, a user-space daemon (tapback) is introduced with blktap3 to do that job.

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

Thanos Makatos and others added some commits Jul 22, 2013

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>
Thanos Makatos
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>
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>
vineetht Thanos Makatos
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
vineetht Thanos Makatos
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
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
Thanos Makatos
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>
Thanos Makatos
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>
Thanos Makatos
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>
Thanos Makatos
EA-1158/CP-5965: Don't spam the log for each NBD request.
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Acked-by: Zheng Li <zheng.li@citrix.com>
Thanos Makatos
EA-1158: Remove Xenbus back-end node when front-end goes away
This is probably how the Xenbus protocol works.
Thanos Makatos
EA-1158/CP-6734: Remove unused includes/macros
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>
Thanos Makatos
EA-1158/CA-122239: Copy data locally to avoid kernel bug
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>

Thanos Makatos and others added some commits Jan 21, 2014

Thanos Makatos
CP-7355: Set correct XenStore permissions
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Acked-by: David Vrabel <david.vrabel@citrix.com>
Thanos Makatos
CA-125605: Refuse to close VBD if there's a ring connection
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CA-125867: Disconnect tapdisk from the ring on device removal
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CA-125757: Cache disk info
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CA-125917: fix drain queue when closing
tapdisk_control_close_image waits for the Xenbus to disconnect, but this
can never happen because only a tapdisk_control_xenblkif_disconnect
message can do this, and that cannot be executed because the current
tap-ctl close command is still pending. The solution is to have tap-ctl
close to try and disconnect from the ring if necessary.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CA-125917: drain queue when closing
When tapdisk receives a CLOSE command, it must try to empty the ring request
queue, exactly as it does for the blktap2 request queue.

In addition, this patch introduces some minor code improvements.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CA-126095: Preallocate request memory
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Felipe Franciosi <felipe.franciosi@citrix.com>
CA-126092: Retry tap-ctl close till it succeeds or times out
If tapdisk is busy processing another command (like disconnect
from ring), an EBUSY status is sent back to the tap-ctl close
command. In this commit, we wait and retry the tap-ctl close
command till tapdisk responds. The wait is timed out at 120 seconds
which is tapdisk's timeout for command completion.

Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
Thanos Makatos
Merge from blktap2
Periodic merge from blktap2 (https://github.com/xapi-project/blktap) to
ensure we're kept in sync.

Conflicts:
	.gitignore

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Thanos Makatos
CA-125978: drain Xenbus queue on ring disconnection
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CA-126092: Refresh message structure before retrying tap-ctl close
Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@citrix.com>
Thanos Makatos
CP-7356: Use revised grant-copy implementation
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Thanos Makatos
CAR-96/CP-6171: Parametrise back-end name.
Parametrise the back-end name in tapback so it can coexist with blkback.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96/CA-127467: Retry pause/unpause on EBUSY
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96: Use correct sign when reporting tap-ctl-open errors
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Thanos Makatos
CAR-96/CA-126139: Add checks when reading XenStore watch
This patch won't fix the bug in CA-126139, but it might help debugging.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Thanos Makatos
CAR-96/CA-127667: warn when disconnecting paused VBD with pending reqs
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96/CA-7800: mask conflicting commands instead of retrying
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
Revert "CAR-96/CA-7800: mask conflicting commands instead of retrying"
This reverts commit ad30ba6.

CA-7800 (actually it's CP-7800), doesn't fix the tap-ctl race conditions
as it masks the wrong event. The connection object as is not associated
with an event per se, only the input/output operations that belong to it
are. Fixing this is not trivial, so to save time we revert the hack-ish
timeout-based solution.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96/CA-128039: fix tap_ctl_connect/disconnect_xenblkif error handling
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96/CA-128039: retry connect to/disconnect from on EBUSY
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96/CA-128039: correctly set error code when timing out
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96/CA-128039: retry tap-ctl-info on EBUSY
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96/CA-128039: don't check error field if for disk_info
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
CAR-96/CA-128039: don't use uninitialised vars when checking for timeout
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Thanos Makatos
Merge from blktap2
Conflicts:
	drivers/Makefile.am
	drivers/tapdisk-vbd.c
	drivers/tapdisk-vbd.h

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

@tmakatos tmakatos changed the title from merge blktap3 to CP-7835: merge blktap3 Mar 17, 2014

@chandrikas

This comment has been minimized.

Contributor

chandrikas commented Mar 17, 2014

Acked!

tmakatos pushed a commit that referenced this pull request Mar 17, 2014

@tmakatos tmakatos merged commit a2d87f0 into xapi-project:master Mar 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment