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

quincy: mds: drop locks and retry when lock set changes #53242

Merged
merged 1 commit into from Oct 9, 2023

Conversation

batrick
Copy link
Member

@batrick batrick commented Aug 31, 2023

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


backport of #52522
parent tracker: https://tracker.ceph.com/issues/62052

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

An optimization was added to avoid an unnecessary gather on the inode
filelock when the client can safely get the file size without also
getting issued the requested caps. However, if a retry of getattr
is necessary, this conditional inclusion of the inode filelock
can cause lock-order violations resulting in deadlock.

So, if we've already acquired some of the inode's locks then we must
drop locks and retry.

Fixes: https://tracker.ceph.com/issues/62052
Fixes: c822b3e
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit b5719ac)
@batrick batrick added this to the quincy milestone Aug 31, 2023
@batrick batrick added cephfs Ceph File System needs-qa labels Aug 31, 2023
@vshankar vshankar requested a review from a team September 5, 2023 09:43
vshankar added a commit to vshankar/ceph that referenced this pull request Oct 9, 2023
* refs/pull/53242/head:
	mds: drop locks and retry when lock set changes
vshankar added a commit to vshankar/ceph that referenced this pull request Oct 9, 2023
* refs/pull/53242/head:
	mds: drop locks and retry when lock set changes
@batrick
Copy link
Member Author

batrick commented Oct 9, 2023

@vshankar this needs to be in the next Quincy release.

Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

@yuriw yuriw merged commit 478a394 into ceph:quincy Oct 9, 2023
11 checks passed
@batrick batrick deleted the wip-62660-quincy branch October 9, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants