Project

General

Profile

Actions

Bug #74168

closed
ID ID

librbd: fix ExclusiveLock::accept_request() when !is_state_locked()

Bug #74168: librbd: fix ExclusiveLock::accept_request() when !is_state_locked()

Added by Ilya Dryomov 12 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
squid,tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v20.3.0-4572-g0ba090cfdf
Released In:
v21.2.0~1547
Upkeep Timestamp:
2026-10-24T02:00:33+00:00

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.


Related issues 2 (0 open — 2 closed)

Copied to rbd - Backport #74208: squid: librbd: fix ExclusiveLock::accept_request() when !is_state_locked()ResolvedIlya Dryomov

Actions
Copied to rbd - Backport #74209: tentacle: librbd: fix ExclusiveLock::accept_request() when !is_state_locked()ResolvedIlya Dryomov

Actions

ID Updated by Ilya Dryomov 12 months ago Actions #1

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 66581

ID Updated by Ilya Dryomov 12 months ago Actions #2

  • Status changed from Fix Under Review to Pending Backport

UB Updated by Upkeep Bot 12 months ago Actions #3

  • 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 Actions #4

  • Copied to Backport #74208: squid: librbd: fix ExclusiveLock::accept_request() when !is_state_locked() added

UB Updated by Upkeep Bot 12 months ago Actions #5

  • Copied to Backport #74209: tentacle: librbd: fix ExclusiveLock::accept_request() when !is_state_locked() added

UB Updated by Upkeep Bot 12 months ago Actions #6

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 10 months ago Actions #7

  • 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 Actions #8

  • 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 Actions #9

  • 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
Actions

Also available in: PDF Atom