]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: find_object_context: drop snapdir handling
authorSage Weil <sage@redhat.com>
Fri, 1 Sep 2017 14:16:29 +0000 (10:16 -0400)
committerSage Weil <sage@redhat.com>
Mon, 11 Sep 2017 14:13:34 +0000 (09:13 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index b9a78e36495278ac5583d2fc7e95ce71ba16c43a..878bd399b9ba75d5d2c100dd5492a842b4949c3f 100644 (file)
@@ -9743,29 +9743,6 @@ int PrimaryLogPG::find_object_context(const hobject_t& oid,
 
   hobject_t head = oid.get_head();
 
-  // want the snapdir?
-  if (oid.snap == CEPH_SNAPDIR) {
-    // return head or snapdir, whichever exists.
-    ObjectContextRef headobc = get_object_context(head, can_create);
-    ObjectContextRef obc = headobc;
-    if (!obc || !obc->obs.exists)
-      obc = get_object_context(oid, can_create);
-    if (!obc || !obc->obs.exists) {
-      // if we have neither, we would want to promote the head.
-      if (pmissing)
-       *pmissing = head;
-      if (pobc)
-       *pobc = headobc; // may be null
-      return -ENOENT;
-    }
-    dout(10) << "find_object_context " << oid
-            << " @" << oid.snap
-            << " oi=" << obc->obs.oi
-            << dendl;
-    *pobc = obc;
-
-  }
-
   // we want a snap
   if (!map_snapid_to_clone && pool.info.is_removed_snap(oid.snap)) {
     dout(10) << __func__ << " snap " << oid.snap << " is removed" << dendl;