Skip to content
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

rbd-mirror: lock loss during sync should wait for in-flight copies #15532

Merged
merged 2 commits into from Jun 8, 2017

Conversation

Projects
None yet
2 participants
@dillaman
Copy link
Contributor

dillaman commented Jun 7, 2017

Signed-off-by: Jason Dillaman dillaman@redhat.com

@trociny

trociny approved these changes Jun 7, 2017

Copy link
Contributor

trociny left a comment

LGTM

Context *finish_op_ctx = nullptr;
if (m_local_image_ctx->exclusive_lock != nullptr) {
finish_op_ctx = m_local_image_ctx->exclusive_lock->start_op();
}
if (finish_op_ctx == nullptr) {
derr << ": lost exclusive lock" << dendl;
finish(-EROFS);
if (m_ret_val == 0) {

This comment has been minimized.

Copy link
@trociny

trociny Jun 7, 2017

Contributor

nit: the check for m_ret_val == 0 looks like not necessary.

@dillaman dillaman force-pushed the dillaman:wip-rbd-mirror-stress branch 3 times, most recently from 84b3e56 to 41db8e2 Jun 7, 2017

@dillaman

This comment has been minimized.

Copy link
Contributor Author

dillaman commented Jun 7, 2017

@trociny tweaked it a little bit since I realized loss of the remote during a single object copy could deadlock the exclusive lock release.

@trociny

This comment has been minimized.

Copy link
Contributor

trociny commented Jun 7, 2017

@dillaman See jenkins failure (TestMockImageSyncImageCopyRequest.SimpleImage)

dillaman added some commits Jun 7, 2017

rbd-mirror: partial revert of 649b29d
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
rbd-mirror: narrowed scope of exclusive lock op tracking
Signed-off-by: Jason Dillaman <dillaman@redhat.com>

@dillaman dillaman force-pushed the dillaman:wip-rbd-mirror-stress branch from 41db8e2 to 21d1932 Jun 7, 2017

@dillaman

This comment has been minimized.

Copy link
Contributor Author

dillaman commented Jun 7, 2017

@trociny update pushed

@trociny trociny merged commit 578468f into ceph:master Jun 8, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@dillaman dillaman deleted the dillaman:wip-rbd-mirror-stress branch Jun 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.