From: Adam Kupczyk Date: Mon, 4 Jun 2018 10:50:49 +0000 (+0200) Subject: common/performance: Now hobject_t's hash no longer depends directly on oid. X-Git-Tag: v12.2.8~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7a3387b341955a42ef307f644cd01c5f54696e5;p=ceph.git common/performance: Now hobject_t's hash no longer depends directly on oid. Signed-off-by: Adam Kupczyk (cherry picked from commit c14504c157d3d6a8eecddaf6c83280ee254c069d) --- diff --git a/src/common/hobject.h b/src/common/hobject.h index 09aefd16fde..24eeb9754e2 100644 --- a/src/common/hobject.h +++ b/src/common/hobject.h @@ -300,13 +300,8 @@ WRITE_CLASS_ENCODER(hobject_t) namespace std { template<> struct hash { size_t operator()(const hobject_t &r) const { - static std::hash H; static rjhash 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