summaryrefslogtreecommitdiff
path: root/hash.h
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-08-20 20:11:23 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-08-20 20:11:23 -0400
commita2ec48bb6b799e7a48f041ed34d6547f45509493 (patch)
treed43da2788550fbd8ff674a0005f8803ec3605b96 /hash.h
parentbe8c87e1760ea917544ac18806a0dc214d195b0d (diff)
downloadbtrfs-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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/hash.h b/hash.h
index 868ee17..804fcda 100644
--- a/hash.h
+++ b/hash.h
@@ -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