aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/crush/crush.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/crush/crush.h')
-rw-r--r--include/linux/crush/crush.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h
index 97e435b191f..7c4750811b9 100644
--- a/include/linux/crush/crush.h
+++ b/include/linux/crush/crush.h
@@ -151,16 +151,6 @@ struct crush_map {
151 struct crush_bucket **buckets; 151 struct crush_bucket **buckets;
152 struct crush_rule **rules; 152 struct crush_rule **rules;
153 153
154 /*
155 * Parent pointers to identify the parent bucket a device or
156 * bucket in the hierarchy. If an item appears more than
157 * once, this is the _last_ time it appeared (where buckets
158 * are processed in bucket id order, from -1 on down to
159 * -max_buckets.
160 */
161 __u32 *bucket_parents;
162 __u32 *device_parents;
163
164 __s32 max_buckets; 154 __s32 max_buckets;
165 __u32 max_rules; 155 __u32 max_rules;
166 __s32 max_devices; 156 __s32 max_devices;
@@ -168,8 +158,7 @@ struct crush_map {
168 158
169 159
170/* crush.c */ 160/* crush.c */
171extern int crush_get_bucket_item_weight(struct crush_bucket *b, int pos); 161extern int crush_get_bucket_item_weight(const struct crush_bucket *b, int pos);
172extern void crush_calc_parents(struct crush_map *map);
173extern void crush_destroy_bucket_uniform(struct crush_bucket_uniform *b); 162extern void crush_destroy_bucket_uniform(struct crush_bucket_uniform *b);
174extern void crush_destroy_bucket_list(struct crush_bucket_list *b); 163extern void crush_destroy_bucket_list(struct crush_bucket_list *b);
175extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b); 164extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b);
@@ -177,4 +166,9 @@ extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b);
177extern void crush_destroy_bucket(struct crush_bucket *b); 166extern void crush_destroy_bucket(struct crush_bucket *b);
178extern void crush_destroy(struct crush_map *map); 167extern void crush_destroy(struct crush_map *map);
179 168
169static inline int crush_calc_tree_node(int i)
170{
171 return ((i+1) << 1)-1;
172}
173
180#endif 174#endif