Skip to content

pacific: mds: rdlock_path_xlock_dentry supports returning auth target inode#51609

Merged
yuriw merged 2 commits intoceph:pacificfrom
vshankar:tr-61235
Jul 25, 2023
Merged

pacific: mds: rdlock_path_xlock_dentry supports returning auth target inode#51609
yuriw merged 2 commits intoceph:pacificfrom
vshankar:tr-61235

Conversation

@vshankar
Copy link
Contributor

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

Contribution Guidelines

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

zhsgao added 2 commits May 20, 2023 16:21
`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)
@vshankar vshankar requested a review from a team May 20, 2023 10:53
@github-actions github-actions bot added the tests label May 20, 2023
@github-actions github-actions bot added this to the pacific milestone May 20, 2023
@vshankar
Copy link
Contributor Author

@vshankar
Copy link
Contributor Author

Reviewed-by: Venky Shankar vshankar@redhat.com

Copy link
Contributor

@yuriw yuriw left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Venky Shankar vshankar@redhat.com

@yuriw yuriw merged commit 74182cb into ceph:pacific Jul 25, 2023
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