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

octopus: mds: add request to batch_op before taking auth pins and locks #37022

Merged
merged 3 commits into from Oct 3, 2020

Conversation

Vicente-Cheng
Copy link
Contributor

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


backport of #34246
parent tracker: https://tracker.ceph.com/issues/44785

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

batch_op is in either CInode::batch_ops or CDentry::batch_ops. Current
code gets the map by dereferencing mdr->in[0] or mdr->dn[0].back().
The problem is that MDCache::path_traverse() may clear mdr->in[0] and
mdr->dn[0]. batch_op leaks when mds kills a request whose mdr->in[0] or
mdr->dn[0] were cleared.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 7768d2c)

Conflicts:
	src/mds/Mutation.h
	  - octopus does not use the specific ns, use the original one
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 7e59369)
MDS does not dispatch non-head requests in batch_op. So non-head
requests in batch_op should not hold any authpins and locks. Otherwise
head request may wait for these authpins/locks.

Fixes: https://tracker.ceph.com/issues/44785
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 975d9ba)
@yuriw
Copy link
Contributor

yuriw commented Sep 21, 2020

@yuriw yuriw merged commit 351f27b into ceph:octopus Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants