diff options
author | Sage Weil <sage@inktank.com> | 2012-05-07 18:36:49 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-05-07 18:39:35 -0400 |
commit | f671d4cd9b36691ac4ef42cde44c1b7a84e13631 (patch) | |
tree | 9f961d2a6dfdee4ffa3b4c8d2b7308dfda85e177 /include/linux/crush | |
parent | fc7c3ae5ab9246ad96aab4d0d57f67e9255cfb56 (diff) |
crush: fix tree node weight lookup
Fix the node weight lookup for tree buckets by using a correct accessor.
Reflects ceph.git commit d287ade5bcbdca82a3aef145b92924cf1e856733.
Reviewed-by: Alex Elder <elder@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include/linux/crush')
-rw-r--r-- | include/linux/crush/crush.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h index 158a4d25ca83..7c4750811b96 100644 --- a/include/linux/crush/crush.h +++ b/include/linux/crush/crush.h | |||
@@ -166,4 +166,9 @@ extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b); | |||
166 | extern void crush_destroy_bucket(struct crush_bucket *b); | 166 | extern void crush_destroy_bucket(struct crush_bucket *b); |
167 | extern void crush_destroy(struct crush_map *map); | 167 | extern void crush_destroy(struct crush_map *map); |
168 | 168 | ||
169 | static inline int crush_calc_tree_node(int i) | ||
170 | { | ||
171 | return ((i+1) << 1)-1; | ||
172 | } | ||
173 | |||
169 | #endif | 174 | #endif |