projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for blkin tracing in rbd engine
[fio.git]
/
hash.h
diff --git
a/hash.h
b/hash.h
index 1d7608beb40500dba75541f374b815f88672eadb..d227b938a246881229ab5d5e304427da8f03cff3 100644
(file)
--- a/
hash.h
+++ b/
hash.h
@@
-44,15
+44,15
@@
#define GOLDEN_RATIO_32 0x61C88647
#define GOLDEN_RATIO_64 0x61C8864680B583EBull
#define GOLDEN_RATIO_32 0x61C88647
#define GOLDEN_RATIO_64 0x61C8864680B583EBull
-static inline unsigned long __hash_long(u
nsigned long
val)
+static inline unsigned long __hash_long(u
int64_t
val)
{
{
- u
nsigned long
hash = val;
+ u
int64_t
hash = val;
#if BITS_PER_LONG == 64
hash *= GOLDEN_RATIO_64;
#else
/* Sigh, gcc can't optimise this alone like it does for 32 bits. */
#if BITS_PER_LONG == 64
hash *= GOLDEN_RATIO_64;
#else
/* Sigh, gcc can't optimise this alone like it does for 32 bits. */
- u
nsigned long
n = hash;
+ u
int64_t
n = hash;
n <<= 18;
hash -= n;
n <<= 33;
n <<= 18;
hash -= n;
n <<= 33;