tentacle: librbd: fix ExclusiveLock::accept_request() when !is_state_locked()#66628
Merged
yuriw merged 2 commits intoceph:tentaclefrom Feb 6, 2026
Merged
tentacle: librbd: fix ExclusiveLock::accept_request() when !is_state_locked()#66628yuriw merged 2 commits intoceph:tentaclefrom
yuriw merged 2 commits intoceph:tentaclefrom
Conversation
Make ret_val out parameter required for the existing method and introduce an overload taking just request_type to compensate. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> (cherry picked from commit 3327001)
To accept an async request, two conditions must be met: a) exclusive lock must be a firm STATE_LOCKED state and b) async requests shouldn't be blocked or if they are blocked there should be an exception in place for a given request_type. If a) is met but b) isn't, ret_val is set to m_request_blocked_ret_val, as expected -- the reason for denying the request is that async requests are blocked. However, if a) isn't met, ret_val also gets set to m_request_blocked_ret_val. This is wrong because the reason for denying the request in this case isn't that async requests are blocked (they may or may not be) but a much heavier circumstance of exclusive lock being in a transient state or not held at all. In such scenarios, whether async requests are blocked or not isn't relevant and ExclusiveLock::accept_request() behaving otherwise can lead to bogus "duplicate lock owners detected" errors getting raised during an attempt to handle any maintenance operation notification in ImageWatcher::handle_operation_request(). This error isn't considered retryable so the entire operation that needed the exclusive lock would be spuriously failed with EINVAL. Fixes: https://tracker.ceph.com/issues/74168 Signed-off-by: Ilya Dryomov <idryomov@gmail.com> (cherry picked from commit e485589)
ajarr
approved these changes
Dec 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/74209
backport of #66581
parent tracker: https://tracker.ceph.com/issues/74168