Skip to content

mds: attribute flock state from cap messages to the sending client - #71382

Merged
vshankar merged 1 commit into
ceph:mainfrom
MaxKellermann:mds_Locker__ignore_client
Oct 19, 2026
Merged

vshankar merged 1 commit into
ceph:mainfrom
MaxKellermann:mds_Locker__ignore_client

Conversation

@MaxKellermann

Copy link
Copy Markdown
Member

_do_cap_update() inserted the locks from MClientCaps::flockbl into held_locks with the client field as it arrived on the wire, so a client could record locks against any other client id. Such a lock is not reachable by remove_client_cap() -> remove_all_from() for the sender's session, so nothing ever releases it: it sits in held_locks blocking every other owner of that file until the MDS is restarted.

Override it with the authenticated sender, as
Server::recover_filelocks() already does.

Fixes: https://tracker.ceph.com/issues/80005

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@github-actions github-actions Bot added the cephfs Ceph File System label Aug 27, 2026
@MaxKellermann

Copy link
Copy Markdown
Member Author

jenkins test make check arm64

@MaxKellermann

Copy link
Copy Markdown
Member Author

jenkins test make check

@MaxKellermann

Copy link
Copy Markdown
Member Author

jenkins test api

_do_cap_update() inserted the locks from `MClientCaps::flockbl` into
held_locks with the `client` field as it arrived on the wire, so a
client could record locks against any other client id. Such a lock is
not reachable by remove_client_cap() -> remove_all_from() for the
sender's session, so nothing ever releases it: it sits in `held_locks`
blocking every other owner of that file until the MDS is restarted.

Override it with the authenticated sender, as
Server::recover_filelocks() already does.

Fixes: https://tracker.ceph.com/issues/80005
Signed-off-by: Max Kellermann <[email protected]>
@MaxKellermann
MaxKellermann force-pushed the mds_Locker__ignore_client branch from b47a9be to 7f60dd0 Compare August 27, 2026 19:10
@MaxKellermann

Copy link
Copy Markdown
Member Author

jenkins test api

@MaxKellermann

Copy link
Copy Markdown
Member Author

jenkins test windows

@vshankar
vshankar requested review from a team and xiubli September 2, 2026 13:10
@dparmar18

Copy link
Copy Markdown
Contributor

This looks good and the same behaviour also exists in request handlers like Server::handle_client_file_setlock and Server::handle_client_file_readlock

@vshankar

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by vshankar started 2026-10-13-15:58.

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants