Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Branch HEAD
[fs/lustre-release.git]
/
lustre
/
obdclass
/
mea.c
diff --git
a/lustre/obdclass/mea.c
b/lustre/obdclass/mea.c
index
15f15d8
..
a7bd3e4
100644
(file)
--- a/
lustre/obdclass/mea.c
+++ b/
lustre/obdclass/mea.c
@@
-117,8
+117,8
@@
static __u32 hash_build(const char *name, int namelen)
{
__u32 hash;
- hash = (hash_build0(name, namelen) << 1) & MAX_HASH_SIZE;
- if (hash > MAX_HASH_SIZE - HASH_GRAY_AREA)
+ hash = (hash_build0(name, namelen) << 1) & MAX_HASH_SIZE
_32
;
+ if (hash > MAX_HASH_SIZE
_32
- HASH_GRAY_AREA)
hash &= HASH_GRAY_AREA - 1;
return hash;
}
@@
-127,9
+127,9
@@
static int mea_hash_segment(int count, const char *name, int namelen)
{
__u32 hash;
- LASSERT(IS_PO2(MAX_HASH_SIZE + 1));
+ LASSERT(IS_PO2(MAX_HASH_SIZE
_32
+ 1));
- hash = hash_build(name, namelen) / (MAX_HASH_SIZE / count);
+ hash = hash_build(name, namelen) / (MAX_HASH_SIZE
_32
/ count);
LASSERTF(hash < count, "hash %x count %d \n", hash, count);
return hash;