pacific: mds: rdlock_path_xlock_dentry supports returning auth target inode#51609
Merged
yuriw merged 2 commits intoceph:pacificfrom Jul 25, 2023
Merged
pacific: mds: rdlock_path_xlock_dentry supports returning auth target inode#51609yuriw merged 2 commits intoceph:pacificfrom
yuriw merged 2 commits intoceph:pacificfrom
Conversation
`Server::handle_client_openc` will call `Server::handle_client_open` if the target inode exists. `Server::handle_client_open requires` the target inode to be auth if client sets `O_WRONLY` or `O_TRUNC`, but `Server::rdlock_path_xlock_dentry` can not ensure that. The assertion that the target inode is auth in `Server::handle_client_open` may fail and it will crash mds. So add a parameter to to support returning auth target inode if it exists and forward the request if necessary. The tail dentry may not be auth anymore when an auth target inode is provided as required by the caller, because we can't require both of them to be auth in one mds. This bug will only be triggered in kernel client, because ceph-fuse client will try to lookup the target before sending a create request to mds and it can send an open request instead if the target exists. But kernel client will send the create request to mds without lookup first because `atomic open` is supported to improve performance. Fixes: https://tracker.ceph.com/issues/58411 Signed-off-by: Zhansong Gao <zhsgao@hotmail.com> (cherry picked from commit cf5fdcd)
…me mds as the inode Signed-off-by: Zhansong Gao <zhsgao@hotmail.com> (cherry picked from commit 9945f3b)
Contributor
Author
Contributor
Author
|
Reviewed-by: Venky Shankar vshankar@redhat.com |
yuriw
approved these changes
Jul 25, 2023
Contributor
yuriw
left a comment
There was a problem hiding this comment.
Reviewed-by: Venky Shankar vshankar@redhat.com
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.
https://tracker.ceph.com/issues/61235
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. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
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 windows