From: Patrick Donnelly Date: Tue, 13 Feb 2024 20:58:19 +0000 (-0500) Subject: mds: avoid killing dead requests X-Git-Tag: v20.0.0~2328^2~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b72e153d2b36956e97b8686aeb6aaacffe928750;p=ceph.git mds: avoid killing dead requests This is important when you have: * sub-op A finishes and resumes parent * parent kills all sub-ops (including sub-op A) Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 38df8e3b03e3..179c461f8072 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -9864,6 +9864,8 @@ void MDCache::request_cleanup(const MDRequestRef& mdr) { dout(15) << "request_cleanup " << *mdr << dendl; + mdr->dead = true; + if (mdr->has_more()) { if (mdr->more()->is_ambiguous_auth) mdr->clear_ambiguous_auth(); @@ -9904,7 +9906,7 @@ void MDCache::request_cleanup(const MDRequestRef& mdr) void MDCache::request_kill(const MDRequestRef& mdr) { - if (mdr->killed) { + if (mdr->killed || mdr->dead) { /* ignore duplicate kills */ return; } diff --git a/src/mds/Mutation.h b/src/mds/Mutation.h index a8a89e1ef3ff..6e51275fbc15 100644 --- a/src/mds/Mutation.h +++ b/src/mds/Mutation.h @@ -277,6 +277,7 @@ public: bool committing = false; bool aborted = false; bool killed = false; + bool dead = false; // for applying projected inode changes std::set projected_nodes;