]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/performance: Now hobject_t's hash no longer depends directly on oid. 22723/head
authorAdam Kupczyk <akupczyk@redhat.com>
Mon, 4 Jun 2018 10:50:49 +0000 (12:50 +0200)
committerSage Weil <sage@redhat.com>
Tue, 26 Jun 2018 22:01:26 +0000 (17:01 -0500)
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit c14504c157d3d6a8eecddaf6c83280ee254c069d)

src/common/hobject.h

index 09aefd16fdedfc9a7b446fae96f77710fc3d45cd..24eeb9754e2f24290828a03e3fa372cb5aac691b 100644 (file)
@@ -300,13 +300,8 @@ WRITE_CLASS_ENCODER(hobject_t)
 namespace std {
   template<> struct hash<hobject_t> {
     size_t operator()(const hobject_t &r) const {
-      static std::hash<object_t> H;
       static rjhash<uint64_t> RJ;
-      size_t hash;
-      hash = H(r.oid);
-      hash = RJ(hash ^ r.get_hash());
-      hash = RJ(hash ^ r.snap);
-      return hash;
+      return RJ(r.get_hash() ^ r.snap);
     }
   };
 } // namespace std