summaryrefslogtreecommitdiffstats
path: root/fs/ceph/crush/crush.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-07 20:18:22 -0800
committerSage Weil <sage@newdream.net>2009-11-07 20:18:22 -0800
commitfb690390e305ea51e1883b105c7d3c52d7100ba5 (patch)
treec099a71133225b1d22bba976e93dc6ab92a08986 /fs/ceph/crush/crush.h
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/crush/crush.h')
-rw-r--r--fs/ceph/crush/crush.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/crush/crush.h b/fs/ceph/crush/crush.h
index 92c6b3c3a57..dcd7e752370 100644
--- a/fs/ceph/crush/crush.h
+++ b/fs/ceph/crush/crush.h
@@ -102,7 +102,8 @@ extern const char *crush_bucket_alg_name(int alg);
struct crush_bucket {
__s32 id; /* this'll be negative */
__u16 type; /* non-zero; type=0 is reserved for devices */
- __u16 alg; /* one of CRUSH_BUCKET_* */
+ __u8 alg; /* one of CRUSH_BUCKET_* */
+ __u8 hash; /* which hash function to use, CRUSH_HASH_* */
__u32 weight; /* 16-bit fixed point */
__u32 size; /* num items */
__s32 *items;