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: v14.0.1~1009^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c14504c157d3d6a8eecddaf6c83280ee254c069d;p=ceph.git common/performance: Now hobject_t's hash no longer depends directly on oid. Signed-off-by: Adam Kupczyk --- diff --git a/src/common/hobject.h b/src/common/hobject.h index c2d2c6b31863..59a3109f4402 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