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

librbd: reduce potential of erroneous blacklisting on image close #15162

Merged
merged 3 commits into from
May 22, 2017

Conversation

dillaman
Copy link

No description provided.


if (m_refreshed_locker != m_locker || m_refreshed_locker == Locker{}) {
ldout(m_cct, 5) << "no longer lock owner" << dendl;
finish(-EAGAIN);
Copy link
Contributor

@trociny trociny May 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dillaman If get_locker returns -ENOENT, BreakRequest returns with -EAGAIN, and acquire_request will fail with -EAGAIN too though it could succeed.

Note, if break_lock returns -ENOENT below, we return success.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point -- I'll push an update in a few

Jason Dillaman added 2 commits May 19, 2017 08:43
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise lgtm

CephContext *cct = m_image_ctx->cct;
ldout(cct, 10) << this << " " << __func__ << dendl;

// prevent incoming requests from our peers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dillaman This comment looks like not needed here?

The watch should be released after exclusive lock is released to
avoid a potential race condition which would result in the
client being blacklisted by a peer.

Fixes: http://tracker.ceph.com/issues/19970
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@trociny trociny merged commit 1367ab2 into ceph:master May 22, 2017
@dillaman dillaman deleted the wip-19970 branch May 22, 2017 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants