diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-08-19 14:21:57 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:06 -0400 |
commit | 615f996fb8185a0bc02812ebd72cb77ded5645f1 (patch) | |
tree | 0e97c4fd52b44d603e589e41c90892739e6f5a30 /fs/btrfs/hash.h | |
parent | 76fcef19c40328499a2f6d59d76b72fd03d2cc82 (diff) |
Switch btrfs_name_hash() to crc32c
Date: Tue, 19 Aug 2008 19:21:57 +0100
Using a 64-bit hash as the readdir cookie is just asking for trouble.
And gets it, when we try to export the file system by NFS.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/hash.h')
-rw-r--r-- | fs/btrfs/hash.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/hash.h b/fs/btrfs/hash.h index 868ee17ca77a..2a020b276768 100644 --- a/fs/btrfs/hash.h +++ b/fs/btrfs/hash.h | |||
@@ -18,5 +18,10 @@ | |||
18 | 18 | ||
19 | #ifndef __HASH__ | 19 | #ifndef __HASH__ |
20 | #define __HASH__ | 20 | #define __HASH__ |
21 | u64 btrfs_name_hash(const char *name, int len); | 21 | |
22 | #include "crc32c.h" | ||
23 | static inline u64 btrfs_name_hash(const char *name, int len) | ||
24 | { | ||
25 | return btrfs_crc32c((u32)~1, name, len); | ||
26 | } | ||
22 | #endif | 27 | #endif |