+struct bloom_hash {
+ unsigned int seed;
+ uint32_t (*fn)(const void *, uint32_t, uint32_t);
+};
+
+static uint32_t bloom_crc32c(const void *buf, uint32_t len, uint32_t seed)
+{
+ return fio_crc32c(buf, len);
+}
+
+static uint32_t bloom_fnv(const void *buf, uint32_t len, uint32_t seed)
+{
+ return fnv(buf, len, seed);
+}
+
+#define BLOOM_SEED 0x8989
+
+static struct bloom_hash hashes[] = {
+ {
+ .seed = BLOOM_SEED,
+ .fn = jhash,
+ },
+ {
+ .seed = BLOOM_SEED,
+ .fn = XXH32,
+ },
+ {
+ .seed = BLOOM_SEED,
+ .fn = murmurhash3,
+ },
+ {
+ .seed = BLOOM_SEED,
+ .fn = bloom_crc32c,
+ },
+ {
+ .seed = BLOOM_SEED,
+ .fn = bloom_fnv,
+ },
+};