From 9c8288b257bfb72f259058fb287bc975694c97ef Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 15 Nov 2006 13:27:28 +0000 Subject: [PATCH] lu_object: return back old hash: hash_long() proved to be a disadvantage. --- lustre/obdclass/lu_object.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/obdclass/lu_object.c b/lustre/obdclass/lu_object.c index 01353a9..23f83f8 100644 --- a/lustre/obdclass/lu_object.c +++ b/lustre/obdclass/lu_object.c @@ -436,16 +436,20 @@ static int lu_site_htable_mask; static __u32 fid_hash(const struct lu_fid *f) { + /* all objects with same id and different versions will belong to same + * collisions list. */ +#if 1 + return (fid_seq(f) - 1) * LUSTRE_SEQ_MAX_WIDTH + fid_oid(f); +#else unsigned long hash; __u64 seq; - /* all objects with same id and different versions will belong to same - * collisions list. */ seq = fid_seq(f); hash = seq ^ fid_oid(f); if (sizeof hash != sizeof seq) hash ^= seq >> 32; return hash_long(hash, lu_site_htable_bits); +#endif } /* -- 1.8.3.1