Skip to content

client: adjust Fb cap ref count check during synchronous fsync() - #65713

Merged
vshankar merged 2 commits into
ceph:mainfrom
vshankar:wip-73298
Oct 9, 2025
Merged

vshankar merged 2 commits into
ceph:mainfrom
vshankar:wip-73298

Conversation

@vshankar

Copy link
Copy Markdown
Contributor

https://tracker.ceph.com/issues/73298

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.

cephfs client holds a ref on Fb caps when handing out a write delegation[0].
As fsync from (Ganesha) client holding write delegation will block indefinitely[1]
waiting for cap ref for Fb to drop to 0, which will never happen until the
delegation is returned/recalled.

[0]: https://github.com/ceph/ceph/blob/main/src/client/Delegation.cc#L71
[1]: https://github.com/ceph/ceph/blob/main/src/client/Client.cc#L12438

If an inode has been write delegated, adjust for cap reference count
check in fsync().

Note: This only workls for synchronous fsync() since `client_lock` is
held for the entire duration of the call (at least till the patch leading
upto the reference count check). Asynchronous fsync() needs to be fixed
separately (as that can drop `client_lock`).

Fixes: https://tracker.ceph.com/issues/73298
Signed-off-by: Venky Shankar <[email protected]>
@vshankar
vshankar requested a review from a team September 29, 2025 10:36
@vshankar vshankar added the cephfs Ceph File System label Sep 29, 2025
@github-actions github-actions Bot added the tests label Sep 29, 2025
@vshankar

vshankar commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

This one is pretty urgent.

@chrisphoffman chrisphoffman 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.

lgtm.

Can you create a tracker to address async case?

@vshankar

vshankar commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

lgtm.

Can you create a tracker to address async case?

Sure, I can. But now I think the same fix should also work for the asynchronous case. I mean, no matter how many concurrent async fsync's have been triggered on an write delegated inode, the Fb cap ref count condition introduced here should still hold true.

@vshankar

vshankar commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@vshankar

vshankar commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

@chrisphoffman - I will link a tracker for the asynchronous case. Let's think about that a bit more as there is no need to rush it in with this change. Do you agree?

@chrisphoffman

Copy link
Copy Markdown
Contributor

@chrisphoffman - I will link a tracker for the asynchronous case. Let's think about that a bit more as there is no need to rush it in with this change. Do you agree?

Yeah that's fine.

@vshankar

vshankar commented Oct 7, 2025

Copy link
Copy Markdown
Contributor Author

@chrisphoffman - I will link a tracker for the asynchronous case. Let's think about that a bit more as there is no need to rush it in with this change. Do you agree?

https://tracker.ceph.com/issues/73387

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor Author

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants