]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: cache: don't handle cache if the obc is blocked
authorGreg Farnum <greg@inktank.com>
Fri, 4 Oct 2013 22:54:21 +0000 (15:54 -0700)
committerGreg Farnum <greg@inktank.com>
Fri, 25 Oct 2013 20:36:45 +0000 (13:36 -0700)
Right now the only way that can happen is if we're in the middle of a
promote!

Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/ReplicatedPG.cc

index 1952b860372c5e1ab7bd2f95a7f155323dd75b8a..df69ecb20e47bada40e511ecbf669efc19e62ebf 100644 (file)
@@ -1147,6 +1147,10 @@ void ReplicatedPG::do_op(OpRequestRef op)
 bool ReplicatedPG::maybe_handle_cache(OpRequestRef op, ObjectContextRef obc,
                                       int r)
 {
+  if (obc.get() && obc->is_blocked()) {
+    // we're already doing something with this object
+    return false;
+  }
   switch(pool.info.cache_mode) {
   case pg_pool_t::CACHEMODE_NONE:
     return false;