]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Cache tiering: do not allow flush/evict when there are requests pending 2445/head
authorZhiqiang Wang <wonzhq@hotmail.com>
Wed, 10 Sep 2014 06:53:39 +0000 (14:53 +0800)
committerZhiqiang Wang <wonzhq@hotmail.com>
Wed, 10 Sep 2014 06:53:39 +0000 (14:53 +0800)
Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
src/osd/ReplicatedPG.cc
src/osd/osd_types.h

index 7578b6e4091bb0b2b99fc29eb2987151f5a4e5cb..1254d09e6a63e4cb926dde2264dcb6208787b95c 100644 (file)
@@ -11362,6 +11362,11 @@ bool ReplicatedPG::agent_work(int start_max)
       osd->logger->inc(l_osd_agent_skip);
       continue;
     }
+    if (obc->is_request_pending()) {
+      dout(20) << __func__ << " skip (request pending) " << obc->obs.oi << dendl;
+      osd->logger->inc(l_osd_agent_skip);
+      continue;
+    }
 
     // be careful flushing omap to an EC pool.
     if (base_pool->is_erasure() &&
index 87f3252ccefe985001c2cdf54d9c8efc6c4e667d..11ac469d4c85d89b4bf50b42b46d07bf170f6d5d 100644 (file)
@@ -2971,6 +2971,9 @@ public:
       *requeue_snaptrimmer = true;
     }
   }
+  bool is_request_pending() {
+    return (rwstate.count > 0);
+  }
 
   ObjectContext()
     : ssc(NULL),