-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Conversation
|
||
if (m_refreshed_locker != m_locker || m_refreshed_locker == Locker{}) { | ||
ldout(m_cct, 5) << "no longer lock owner" << dendl; | ||
finish(-EAGAIN); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise lgtm
src/librbd/image/CloseRequest.cc
Outdated
CephContext *cct = m_image_ctx->cct; | ||
ldout(cct, 10) << this << " " << __func__ << dendl; | ||
|
||
// prevent incoming requests from our peers |
There was a problem hiding this comment.
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>
No description provided.