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
b=20581 MDS returns full hash for readdir to decrease hash collision
[fs/lustre-release.git]
/
lustre
/
include
/
lustre_lite.h
diff --git
a/lustre/include/lustre_lite.h
b/lustre/include/lustre_lite.h
index
cb0e730
..
ac71d69
100644
(file)
--- a/
lustre/include/lustre_lite.h
+++ b/
lustre/include/lustre_lite.h
@@
-150,9
+150,14
@@
static inline void ll_dir_chain_fini(struct ll_dir_chain *chain)
{
}
-static inline unsigned long hash_x_index(
unsigned long value
)
+static inline unsigned long hash_x_index(
__u64 hash
)
{
- return ~0UL - value;
+#ifdef __KERNEL__
+# if BITS_PER_LONG == 32
+ hash >>= 32;
+# endif
+#endif
+ return ~0UL - hash;
}
/** @} lite */