diff options
Diffstat (limited to 'xlators/performance/io-cache/src/ioc-inode.c')
-rw-r--r-- | xlators/performance/io-cache/src/ioc-inode.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c index e647b318342..11da863123f 100644 --- a/xlators/performance/io-cache/src/ioc-inode.c +++ b/xlators/performance/io-cache/src/ioc-inode.c @@ -24,18 +24,16 @@ #include "io-cache.h" +int ioc_log2_page_size; inline uint32_t ioc_hashfn (void *data, int len) { - uint32_t hash = 0; - while (len > 0) { - hash ^= *(uint32_t *)data; - data += sizeof (uint32_t); - len -= sizeof (uint32_t); - } + off_t offset; + + offset = *(off_t *) data; - return hash; + return (offset >> ioc_log2_page_size); } /* |