diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
| commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
| tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/crush | |
| parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) | |
Patched in Tegra support.
Diffstat (limited to 'include/linux/crush')
| -rw-r--r-- | include/linux/crush/crush.h | 26 | ||||
| -rw-r--r-- | include/linux/crush/mapper.h | 9 |
2 files changed, 17 insertions, 18 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h index 25baa287cff..97e435b191f 100644 --- a/include/linux/crush/crush.h +++ b/include/linux/crush/crush.h | |||
| @@ -151,22 +151,25 @@ 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 | |||
| 154 | __s32 max_buckets; | 164 | __s32 max_buckets; |
| 155 | __u32 max_rules; | 165 | __u32 max_rules; |
| 156 | __s32 max_devices; | 166 | __s32 max_devices; |
| 157 | |||
| 158 | /* choose local retries before re-descent */ | ||
| 159 | __u32 choose_local_tries; | ||
| 160 | /* choose local attempts using a fallback permutation before | ||
| 161 | * re-descent */ | ||
| 162 | __u32 choose_local_fallback_tries; | ||
| 163 | /* choose attempts before giving up */ | ||
| 164 | __u32 choose_total_tries; | ||
| 165 | }; | 167 | }; |
| 166 | 168 | ||
| 167 | 169 | ||
| 168 | /* crush.c */ | 170 | /* crush.c */ |
| 169 | extern int crush_get_bucket_item_weight(const struct crush_bucket *b, int pos); | 171 | extern int crush_get_bucket_item_weight(struct crush_bucket *b, int pos); |
| 172 | extern void crush_calc_parents(struct crush_map *map); | ||
| 170 | extern void crush_destroy_bucket_uniform(struct crush_bucket_uniform *b); | 173 | extern void crush_destroy_bucket_uniform(struct crush_bucket_uniform *b); |
| 171 | extern void crush_destroy_bucket_list(struct crush_bucket_list *b); | 174 | extern void crush_destroy_bucket_list(struct crush_bucket_list *b); |
| 172 | extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b); | 175 | extern void crush_destroy_bucket_tree(struct crush_bucket_tree *b); |
| @@ -174,9 +177,4 @@ extern void crush_destroy_bucket_straw(struct crush_bucket_straw *b); | |||
| 174 | extern void crush_destroy_bucket(struct crush_bucket *b); | 177 | extern void crush_destroy_bucket(struct crush_bucket *b); |
| 175 | extern void crush_destroy(struct crush_map *map); | 178 | extern void crush_destroy(struct crush_map *map); |
| 176 | 179 | ||
| 177 | static inline int crush_calc_tree_node(int i) | ||
| 178 | { | ||
| 179 | return ((i+1) << 1)-1; | ||
| 180 | } | ||
| 181 | |||
| 182 | #endif | 180 | #endif |
diff --git a/include/linux/crush/mapper.h b/include/linux/crush/mapper.h index 5772dee3ecb..c46b99c18bb 100644 --- a/include/linux/crush/mapper.h +++ b/include/linux/crush/mapper.h | |||
| @@ -8,12 +8,13 @@ | |||
| 8 | * LGPL2 | 8 | * LGPL2 |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <linux/crush/crush.h> | 11 | #include "crush.h" |
| 12 | 12 | ||
| 13 | extern int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size); | 13 | extern int crush_find_rule(struct crush_map *map, int pool, int type, int size); |
| 14 | extern int crush_do_rule(const struct crush_map *map, | 14 | extern int crush_do_rule(struct crush_map *map, |
| 15 | int ruleno, | 15 | int ruleno, |
| 16 | int x, int *result, int result_max, | 16 | int x, int *result, int result_max, |
| 17 | const __u32 *weights); | 17 | int forcefeed, /* -1 for none */ |
| 18 | __u32 *weights); | ||
| 18 | 19 | ||
| 19 | #endif | 20 | #endif |
