]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: remove lookup_object_context method
authorLoic Dachary <loic@dachary.org>
Tue, 13 Aug 2013 14:13:19 +0000 (16:13 +0200)
committerLoic Dachary <loic@dachary.org>
Thu, 22 Aug 2013 00:10:59 +0000 (02:10 +0200)
Both ReplicatedPG::lookup_object_context and
ReplicatedPG::_lookup_object_context methods are provided by
SharedPtrRegistry.

http://tracker.ceph.com/issues/5510 refs #5510

Signed-off-by: Loic Dachary <loic@dachary.org>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index d8c14ec34d443bb81b2dab48841647abc0bd4800..54d5d3a22650f0331f3771eb5050def90cb05cbc 100644 (file)
@@ -4492,14 +4492,6 @@ void ReplicatedPG::handle_watch_timeout(WatchRef watch)
   eval_repop(repop);
 }
 
-ObjectContext *ReplicatedPG::_lookup_object_context(const hobject_t& oid)
-{
-  map<hobject_t, ObjectContext*>::iterator p = object_contexts.find(oid);
-  if (p != object_contexts.end())
-    return p->second;
-  return NULL;
-}
-
 ObjectContextRef ReplicatedPG::create_object_context(const object_info_t& oi,
                                                     SnapSetContext *ssc)
 {
@@ -7468,7 +7460,7 @@ void ReplicatedPG::scan_range(
     handle.reset_tp_timeout();
     ObjectContextRef obc;
     if (is_primary())
-      obc = _lookup_object_context(*p);
+      obc = object_contexts.lookup(*p);
     if (obc) {
       bi->objects[*p] = obc->obs.oi.version;
       dout(20) << "  " << *p << " " << obc->obs.oi.version << dendl;
index 9d11ca2fe470ab49e22332db8a1ad229bbc2c1be..133be172a98e5cbd3e46e157261f7b08cd9e88f7 100644 (file)
@@ -298,15 +298,6 @@ public:
   void handle_watch_timeout(WatchRef watch);
 protected:
 
-  ObjectContext *lookup_object_context(const hobject_t& soid) {
-    if (object_contexts.count(soid)) {
-      ObjectContext *obc = object_contexts[soid];
-      obc->ref++;
-      return obc;
-    }
-    return NULL;
-  }
-  ObjectContext *_lookup_object_context(const hobject_t& oid);
   ObjectContextRef create_object_context(const object_info_t& oi, SnapSetContext *ssc);
   ObjectContextRef get_object_context(const hobject_t& soid, bool can_create);