Add jhash (Jenkins hash) and use that for file names
[fio.git] / filehash.c
index 1df7db0c2f2d754fd4ae7bbc674ac408d7ea7848..1bb1eb237606096a8d0bbec6b0ec583f34bafc00 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "fio.h"
 #include "flist.h"
-#include "crc/crc16.h"
+#include "hash.h"
 
 #define HASH_BUCKETS   512
 #define HASH_MASK      (HASH_BUCKETS - 1)
@@ -15,7 +15,7 @@ static struct fio_mutex *hash_lock;
 
 static unsigned short hash(const char *name)
 {
-       return crc16((const unsigned char *) name, strlen(name)) & HASH_MASK;
+       return jhash(name, strlen(name), 0) & HASH_MASK;
 }
 
 void remove_file_hash(struct fio_file *f)