diff options
author | Sage Weil <sage@newdream.net> | 2009-11-07 00:55:25 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-07 00:55:25 -0500 |
commit | 1654dd0cf5ee1827322aca156af7d96d757201c7 (patch) | |
tree | ba71b1a1e214b929937f02a1794b3d32b8ff1342 /fs/ceph/ceph_hash.h | |
parent | cfbbcd24a6bfd794295ee7ad76dfbff40ad6b934 (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.h | 13 |
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 000000000000..5ac470c433c9 --- /dev/null +++ b/fs/ceph/ceph_hash.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef _FS_CEPH_HASH_H | ||
2 | #define _FS_CEPH_HASH_H | ||
3 | |||
4 | #define CEPH_STR_HASH_LINUX 0x1 /* linux dcache hash */ | ||
5 | #define CEPH_STR_HASH_RJENKINS 0x2 /* robert jenkins' */ | ||
6 | |||
7 | extern unsigned ceph_str_hash_linux(const char *s, unsigned len); | ||
8 | extern unsigned ceph_str_hash_rjenkins(const char *s, unsigned len); | ||
9 | |||
10 | extern unsigned ceph_str_hash(int type, const char *s, unsigned len); | ||
11 | extern const char *ceph_str_hash_name(int type); | ||
12 | |||
13 | #endif | ||