Bug #74168
closedlibrbd: fix ExclusiveLock::accept_request() when !is_state_locked()
0%
Description
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.
ID Updated by Ilya Dryomov 12 months ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 66581
ID Updated by Ilya Dryomov 12 months ago
- Status changed from Fix Under Review to Pending Backport
UB Updated by Upkeep Bot 12 months ago
- Merge Commit set to 0ba090cfdf43c9d7b8c2089a9e00a27293cd8541
- Fixed In set to v20.3.0-4572-g0ba090cfdf
- Upkeep Timestamp set to 2025-12-13T18:47:38+00:00
UB Updated by Upkeep Bot 12 months ago
- Copied to Backport #74208: squid: librbd: fix ExclusiveLock::accept_request() when !is_state_locked() added
UB Updated by Upkeep Bot 12 months ago
- Copied to Backport #74209: tentacle: librbd: fix ExclusiveLock::accept_request() when !is_state_locked() added
UB Updated by Upkeep Bot 12 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 10 months ago
- Status changed from Pending Backport to Resolved
- Upkeep Timestamp changed from 2025-12-13T18:47:38+00:00 to 2026-02-07T01:26:38+00:00
UB Updated by Upkeep Bot 3 months ago
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-02-07T01:26:38+00:00 to 2026-08-28T01:39:09+00:00
UB Updated by Upkeep Bot about 1 month ago
- Released In set to v21.2.0~1547
- Upkeep Timestamp changed from 2026-08-28T01:39:09+00:00 to 2026-10-24T02:00:33+00:00