1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 23d14c5d2SYehuda Sadeh #ifndef CEPH_CRUSH_HASH_H 33d14c5d2SYehuda Sadeh #define CEPH_CRUSH_HASH_H 43d14c5d2SYehuda Sadeh 5b459be73SIlya Dryomov #ifdef __KERNEL__ 6b459be73SIlya Dryomov # include <linux/types.h> 7b459be73SIlya Dryomov #else 8b459be73SIlya Dryomov # include "crush_compat.h" 9b459be73SIlya Dryomov #endif 10b459be73SIlya Dryomov 113d14c5d2SYehuda Sadeh #define CRUSH_HASH_RJENKINS1 0 123d14c5d2SYehuda Sadeh 133d14c5d2SYehuda Sadeh #define CRUSH_HASH_DEFAULT CRUSH_HASH_RJENKINS1 143d14c5d2SYehuda Sadeh 153d14c5d2SYehuda Sadeh extern const char *crush_hash_name(int type); 163d14c5d2SYehuda Sadeh 173d14c5d2SYehuda Sadeh extern __u32 crush_hash32(int type, __u32 a); 183d14c5d2SYehuda Sadeh extern __u32 crush_hash32_2(int type, __u32 a, __u32 b); 193d14c5d2SYehuda Sadeh extern __u32 crush_hash32_3(int type, __u32 a, __u32 b, __u32 c); 203d14c5d2SYehuda Sadeh extern __u32 crush_hash32_4(int type, __u32 a, __u32 b, __u32 c, __u32 d); 213d14c5d2SYehuda Sadeh extern __u32 crush_hash32_5(int type, __u32 a, __u32 b, __u32 c, __u32 d, 223d14c5d2SYehuda Sadeh __u32 e); 233d14c5d2SYehuda Sadeh 243d14c5d2SYehuda Sadeh #endif 25