diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-08-20 20:11:23 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2008-08-20 20:11:23 -0400 |
commit | a2ec48bb6b799e7a48f041ed34d6547f45509493 (patch) | |
tree | d43da2788550fbd8ff674a0005f8803ec3605b96 /hash.h | |
parent | be8c87e1760ea917544ac18806a0dc214d195b0d (diff) | |
download | btrfs-progs-a2ec48bb6b799e7a48f041ed34d6547f45509493.tar.gz |
Switch btrfs_name_hash() to crc32c
Date: Tue, 19 Aug 2008 19:21:22 +0100
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'hash.h')
-rw-r--r-- | hash.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -18,5 +18,10 @@ #ifndef __HASH__ #define __HASH__ -u64 btrfs_name_hash(const char *name, int len); +#include "crc32c.h" + +static inline u64 btrfs_name_hash(const char *name, int len) +{ + return crc32c((u32)~1, name, len); +} #endif |