]> 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. 22294/head
authorAdam Kupczyk <akupczyk@redhat.com>
Mon, 4 Jun 2018 10:50:49 +0000 (12:50 +0200)
committerAdam Kupczyk <akupczyk@redhat.com>
Mon, 4 Jun 2018 10:50:49 +0000 (12:50 +0200)
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
src/common/hobject.h

index c2d2c6b31863b4e66a61c24bb1d85e69f66068f0..59a3109f4402bbbc5341090eb876093f87748c4b 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