aboutsummaryrefslogtreecommitdiff
path: root/fs/ceph/ceph_hash.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-06 21:55:25 -0800
committerSage Weil <sage@newdream.net>2009-11-06 21:55:25 -0800
commit1654dd0cf5ee1827322aca156af7d96d757201c7 (patch)
treeba71b1a1e214b929937f02a1794b3d32b8ff1342 /fs/ceph/ceph_hash.h
parentcfbbcd24a6bfd794295ee7ad76dfbff40ad6b934 (diff)
ceph: make object hash a pg_pool property
The object will be hashed to a placement seed (ps) based on the pg_pool's hash function. This allows new hashes to be introduced into an existing object store, or selection of a hash appropriate to the objects that will be stored in a particular pool. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/ceph_hash.h')
-rw-r--r--fs/ceph/ceph_hash.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ceph/ceph_hash.h b/fs/ceph/ceph_hash.h
new file mode 100644
index 00000000000..5ac470c433c
--- /dev/null
+++ b/fs/ceph/ceph_hash.h
@@ -0,0 +1,13 @@
+#ifndef _FS_CEPH_HASH_H
+#define _FS_CEPH_HASH_H
+
+#define CEPH_STR_HASH_LINUX 0x1 /* linux dcache hash */
+#define CEPH_STR_HASH_RJENKINS 0x2 /* robert jenkins' */
+
+extern unsigned ceph_str_hash_linux(const char *s, unsigned len);
+extern unsigned ceph_str_hash_rjenkins(const char *s, unsigned len);
+
+extern unsigned ceph_str_hash(int type, const char *s, unsigned len);
+extern const char *ceph_str_hash_name(int type);
+
+#endif