aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osdmap.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-07 00:55:25 -0500
committerSage Weil <sage@newdream.net>2009-11-07 00:55:25 -0500
commit1654dd0cf5ee1827322aca156af7d96d757201c7 (patch)
treeba71b1a1e214b929937f02a1794b3d32b8ff1342 /fs/ceph/osdmap.c
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/osdmap.c')
-rw-r--r--fs/ceph/osdmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c
index a025555b70af..68478270ad70 100644
--- a/fs/ceph/osdmap.c
+++ b/fs/ceph/osdmap.c
@@ -809,7 +809,7 @@ int ceph_calc_object_layout(struct ceph_object_layout *ol,
809 return -EIO; 809 return -EIO;
810 810
811 pool = &osdmap->pg_pool[poolid]; 811 pool = &osdmap->pg_pool[poolid];
812 ps = ceph_full_name_hash(oid, strlen(oid)); 812 ps = ceph_str_hash(pool->v.object_hash, oid, strlen(oid));
813 if (preferred >= 0) { 813 if (preferred >= 0) {
814 ps += preferred; 814 ps += preferred;
815 num = le32_to_cpu(pool->v.lpg_num); 815 num = le32_to_cpu(pool->v.lpg_num);