]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: do not promote nonexistent clones
authorSage Weil <sage@inktank.com>
Mon, 30 Dec 2013 19:10:46 +0000 (11:10 -0800)
committerSage Weil <sage@inktank.com>
Tue, 14 Jan 2014 00:19:46 +0000 (16:19 -0800)
Do not promote a clone for a snap that we know doesn't exist.  If
find_object_context() didn't give us a missing_oid, there is nothing to
promote.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc

index 780bfd6f844a1750412c19f5398f41051675f269..8f5ccbb67e2e2d6820680abe80ca741ca175e755 100644 (file)
@@ -1366,6 +1366,11 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op, ObjectContextRef obc,
     return false;
   }
 
+  if (r == -ENOENT && missing_oid == hobject_t()) {
+    // we know this object is logically absent (e.g., an undefined clone)
+    return false;
+  }
+
   switch(pool.info.cache_mode) {
   case pg_pool_t::CACHEMODE_NONE:
     return false;