aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/osdmap.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-07 23:18:22 -0500
committerSage Weil <sage@newdream.net>2009-11-07 23:18:22 -0500
commitfb690390e305ea51e1883b105c7d3c52d7100ba5 (patch)
treec099a71133225b1d22bba976e93dc6ab92a08986 /fs/ceph/osdmap.c
parent1654dd0cf5ee1827322aca156af7d96d757201c7 (diff)
ceph: make CRUSH hash function a bucket property
Make the integer hash function a property of the bucket it is used on. This allows us to gracefully add support for new hash functions without starting from scatch. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/osdmap.c')
-rw-r--r--fs/ceph/osdmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c
index 68478270ad70..8c994c714781 100644
--- a/fs/ceph/osdmap.c
+++ b/fs/ceph/osdmap.c
@@ -210,7 +210,8 @@ static struct crush_map *crush_decode(void *pbyval, void *end)
210 ceph_decode_need(p, end, 4*sizeof(u32), bad); 210 ceph_decode_need(p, end, 4*sizeof(u32), bad);
211 b->id = ceph_decode_32(p); 211 b->id = ceph_decode_32(p);
212 b->type = ceph_decode_16(p); 212 b->type = ceph_decode_16(p);
213 b->alg = ceph_decode_16(p); 213 b->alg = ceph_decode_8(p);
214 b->hash = ceph_decode_8(p);
214 b->weight = ceph_decode_32(p); 215 b->weight = ceph_decode_32(p);
215 b->size = ceph_decode_32(p); 216 b->size = ceph_decode_32(p);
216 217