Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimic: cephfs: client: _readdir_cache_cb() may use the readdir_cache already clear #30933

merged 1 commit into from Oct 23, 2019


Copy link

smithfarm commented Oct 15, 2019

backport tracker:

backport of #29526
parent tracker:

this backport was staged using version
find the latest version at

Calling function _readdir_cache_cb() means to get dir information from the cache, but in the while loop,
the contents of readdir_cache are not static.

For example, _getattr() will trigger insert_trace to update readdir_cache, such as:
1. insert_trace()->clear_dir_complete_and_ordered() or
2. insert_trace()->add_update_inode()->add_update_cap()-> check_cap_issue()->clear_dir_complete_and_ordered()
So, there is a possibility that dn is empty after the _getattr() call.

Signed-off-by: huanwen ren <>
(cherry picked from commit 404c067)
@smithfarm smithfarm added this to the mimic milestone Oct 15, 2019
@smithfarm smithfarm added the cephfs label Oct 15, 2019
@smithfarm smithfarm changed the title mimic: client: _readdir_cache_cb() may use the readdir_cache already clear mimic: cephfs: client: _readdir_cache_cb() may use the readdir_cache already clear Oct 15, 2019
@smithfarm smithfarm requested a review from batrick Oct 15, 2019

This comment has been minimized.

Copy link

yuriw commented Oct 17, 2019

@yuriw yuriw merged commit 27fd57f into ceph:mimic Oct 23, 2019
4 checks passed
4 checks passed
Docs: build check OK - docs built
Signed-off-by all commits in this PR are signed
Unmodified Submodules submodules for project are unmodified
make check make check succeeded
@smithfarm smithfarm deleted the smithfarm:wip-42038-mimic branch Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.