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
merged 1 commit into from Oct 23, 2019

Conversation

@smithfarm
Copy link
Contributor

smithfarm commented Oct 15, 2019

backport tracker: https://tracker.ceph.com/issues/42038


backport of #29526
parent tracker: https://tracker.ceph.com/issues/41148

this backport was staged using ceph-backport.sh version 15.0.0.6113
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh

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.

Fixes: http://tracker.ceph.com/issues/41148
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
(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
@yuriw

This comment has been minimized.

Copy link
Contributor

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
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
@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
Projects
None yet
4 participants
You can’t perform that action at this time.