Skip to content

client: anchor dentries for trimming to make cap traversal safe - #22073

Merged
batrick merged 2 commits into
ceph:masterfrom
batrick:i24137
May 19, 2018
Merged

batrick merged 2 commits into
ceph:masterfrom
batrick:i24137

Conversation

@batrick

@batrick batrick commented May 18, 2018

Copy link
Copy Markdown
Member

@batrick batrick added bug-fix cephfs Ceph File System labels May 18, 2018
@batrick
batrick requested a review from ukernel May 18, 2018 00:13
@batrick

batrick commented May 18, 2018

Copy link
Copy Markdown
Member Author

@ukernel thanks for the reproducer. I'm working on adding it to a QA test.

I think this fix is simpler than what you had posted in [1]; I don't like the absurd complexity of deleting dentries during traversal, so let's not do it.

[1] http://tracker.ceph.com/issues/24137

Comment thread src/client/Client.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"trimming anchored dentries"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done, thanks

Comment thread src/client/Client.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe rename 'anchor' to 'to_trim'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done, thanks

@batrick

batrick commented May 19, 2018

Copy link
Copy Markdown
Member Author

@ukernel

ukernel commented May 19, 2018

Copy link
Copy Markdown
Contributor

I think it's better to not add the qa test. It's too tricky to arrange inodes in session->caps. we don't know if it still works in the future.

@batrick

batrick commented May 19, 2018

Copy link
Copy Markdown
Member Author

It doesn't hurt to run the test so I'm inclined to keep it for now. It serves as a useful template for other tests. I'll add a note that it's unlikely to continue testing as expected.

@batrick
batrick merged commit 9199179 into ceph:master May 19, 2018
batrick added a commit that referenced this pull request May 19, 2018
* refs/pull/22073/head:
	client: delay dentry trimming until after cap traversal
	qa: test for trim_caps segfault for trimmed dentries

Reviewed-by: Zheng Yan <[email protected]>
@batrick
batrick deleted the i24137 branch May 19, 2018 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix cephfs Ceph File System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants