]> Pileus Git - ~andy/linux/blobdiff - fs/btrfs/hash.h
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[~andy/linux] / fs / btrfs / hash.h
index db2ff9773b99d02300e84f4bec207f59c65e73ef..1d982812ab6761077673985dea55970f418cedf7 100644 (file)
@@ -24,4 +24,14 @@ static inline u64 btrfs_name_hash(const char *name, int len)
 {
        return crc32c((u32)~1, name, len);
 }
+
+/*
+ * Figure the key offset of an extended inode ref
+ */
+static inline u64 btrfs_extref_hash(u64 parent_objectid, const char *name,
+                                   int len)
+{
+       return (u64) crc32c(parent_objectid, name, len);
+}
+
 #endif