From: wangdi Date: Thu, 12 Oct 2006 07:40:01 +0000 (+0000) Subject: correct bit size for computing hash in client X-Git-Tag: v1_8_0_110~486^2~593 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f0e3ec15d2df47297cbc4108fd3ab624fddd9e6e;p=fs%2Flustre-release.git correct bit size for computing hash in client --- 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; }