mds: do remove the cap when seqs equal or larger than last issue#56828
Merged
mds: do remove the cap when seqs equal or larger than last issue#56828
Conversation
src/mds/Locker.cc
Outdated
| } | ||
| if (seq != cap->get_last_issue()) { | ||
| if (seq < cap->get_last_issue()) { | ||
| dout(7) << " issue_seq " << seq << " != " << cap->get_last_issue() << dendl; |
Contributor
There was a problem hiding this comment.
Let's update this dout message, too
There is a race in case of:
MDS rw Client
- Issue the 'Asx' caps to
rw client
- Adds the cap, then removes it
later by queuing it to the cap
release list. But the cap->seq
may have been updated by previous
cap grant requests.
And the cap grant request won't
increase the 'last_issue' seq in
MDS.
- ro client's lookup
request comes and the
MDS sends a 'Ax' caps
revoke request to rw
client by increasing
the 'seq'.
- The revoke request just finds
that the cap doesn't exist, then
queues a new cap release
immediately with the new 'seq'.
Then trigger to flush the pending
cap releases to MDS.
- Just receives the cap
release request but the
'seq' > cap's 'last_issue',
then MDS will skip
removing the cap. And
then the _do_cap_release()
will issue the 'Ax' caps
back to rw client.
Then wakes up the ro
client's lookup request,
while the lookup request
will try to revoke the
'Ax' caps again from the
rw client.
This will cause a spinlock infinitely in mds side.
Fixes: https://tracker.ceph.com/issues/64977
Signed-off-by: Xiubo Li <xiubli@redhat.com>
leonid-s-usov
approved these changes
May 20, 2024
Contributor
leonid-s-usov
left a comment
There was a problem hiding this comment.
LGTM, but this should be qa'd
batrick
approved these changes
Jun 22, 2024
Member
|
jenkins test api |
Member
|
This PR is under test in https://tracker.ceph.com/issues/66609. |
Member
This was referenced Jun 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a race in case of:
This will cause an infinite revoke-issue loop on the mds side, preventing the RO client from progressing.
Fixes: https://tracker.ceph.com/issues/64977
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