client: fixed a bug that read operation hung#59027
Conversation
…n the Fc caps is wanted but revoked by the mds, and the Fc cap refs is no-zero
Fixes: https://tracker.ceph.com/issues/65971
Signed-off-by: Tod Chen <chentao.2022@bytedance.com>
|
This is an interesting patch, somehow I feel this might also solve https://tracker.ceph.com/issues/66581 |
@dparmar18 Do you see the same issue in the client logs for the above tracker? |
Yeah, I have used this modification in my personal cluster environment, and it has been verified to solve the problem. |
|
jenkins test api |
|
This PR is under test in https://tracker.ceph.com/issues/68092. |
* refs/pull/59027/head: cephfs: Fixed a bug that read operation hung in Client::get_caps when the Fc caps is wanted but revoked by the mds, and the Fc cap refs is no-zero
|
Testing update: Another PR in the test branch had a bug. Rerunning failed tests without that change. |
|
jenkins test api |
* refs/pull/59027/head: cephfs: Fixed a bug that read operation hung in Client::get_caps when the Fc caps is wanted but revoked by the mds, and the Fc cap refs is no-zero
|
This change is good to merge. I'll be doing the needful after preparing the run wiki. FYI, @hit1943 |
|
jenkins test api |
The Fc cap refs is no-zero(get_cap_ref by a previous readahead).
Fc cap is being revoked by the mds, and in handle_cap_grant it misses to call check_caps to update cap->issued and cap->implemented
Then a new read operation comes, and in Client::get_caps the reader wants a Fc cap, it will wait for a notification after the Fc revocation finished.
So after the readahead finished, it calls put_cap_ref to released Fc cap,whilch should notify the waiting reader after check_caps
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e