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>
This commit is contained in:
Sage Weil
2009-11-06 21:55:25 -08:00
parent cfbbcd24a6
commit 1654dd0cf5
9 changed files with 137 additions and 81 deletions

View File

@@ -809,7 +809,7 @@ int ceph_calc_object_layout(struct ceph_object_layout *ol,
return -EIO;
pool = &osdmap->pg_pool[poolid];
ps = ceph_full_name_hash(oid, strlen(oid));
ps = ceph_str_hash(pool->v.object_hash, oid, strlen(oid));
if (preferred >= 0) {
ps += preferred;
num = le32_to_cpu(pool->v.lpg_num);