]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: avoid killing dead requests
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 13 Feb 2024 20:58:19 +0000 (15:58 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 20 Mar 2024 14:56:53 +0000 (10:56 -0400)
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 <pdonnell@redhat.com>
src/mds/MDCache.cc
src/mds/Mutation.h

index 38df8e3b03e3f47163e9dcf5cb02e40ad19b8883..179c461f8072b6bed199529d68c74d8d0b76aed8 100644 (file)
@@ -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;
   }
index a8a89e1ef3ffa6b2919d061ccc89f853aaa43c2c..6e51275fbc157843901a3898129d4494f823d900 100644 (file)
@@ -277,6 +277,7 @@ public:
   bool committing = false;
   bool aborted = false;
   bool killed = false;
+  bool dead = false;
 
   // for applying projected inode changes
   std::set<MDSCacheObject*> projected_nodes;