From f0e3ec15d2df47297cbc4108fd3ab624fddd9e6e Mon Sep 17 00:00:00 2001 From: wangdi Date: Thu, 12 Oct 2006 07:40:01 +0000 Subject: [PATCH] correct bit size for computing hash in client --- lustre/obdclass/mea.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/obdclass/mea.c b/lustre/obdclass/mea.c index 89dc781..cf991cd 100644 --- a/lustre/obdclass/mea.c +++ b/lustre/obdclass/mea.c @@ -68,7 +68,7 @@ static int mea_hash_segment(int count, char *name, int namelen) struct ldiskfs_dx_hash_info hinfo; int result; __u64 hash; - __u32 hash_segment = MAX_HASH_SIZE; + __u64 hash_segment = MAX_HASH_SIZE; if (namelen == 0) return 0; @@ -84,7 +84,7 @@ static int mea_hash_segment(int count, char *name, int namelen) hash = (hinfo.hash << 1) & 0x7fffffff; do_div(hash_segment, count); do_div(hash, hash_segment); - LASSERT(hash <= count); + LASSERTF(hash <= count, "hash "LPU64" count "LPU64" \n"); return hash; } -- 1.8.3.1