diff options
| author | Sage Weil <sage@inktank.com> | 2012-05-07 18:38:35 -0400 |
|---|---|---|
| committer | Sage Weil <sage@inktank.com> | 2012-05-07 18:38:35 -0400 |
| commit | 8b12d47b80c7a34dffdd98244d99316db490ec58 (patch) | |
| tree | fb97986bc823ebcce487d573fc83ee3b1c8f5f98 /include/linux | |
| parent | e49bf4c51cbe27439c00516d4297193d45dd4097 (diff) | |
crush: clean up types, const-ness
Move various types from int -> __u32 (or similar), and add const as
appropriate.
This reflects changes that have been present in the userland implementation
for some time.
Reviewed-by: Alex Elder <elder@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/crush/crush.h | 2 | ||||
| -rw-r--r-- | include/linux/crush/mapper.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h index 97e435b191f4..3f50369a50e8 100644 --- a/include/linux/crush/crush.h +++ b/include/linux/crush/crush.h | |||
| @@ -168,7 +168,7 @@ struct crush_map { | |||
| 168 | 168 | ||
| 169 | 169 | ||
| 170 | /* crush.c */ | 170 | /* crush.c */ |
| 171 | extern int crush_get_bucket_item_weight(struct crush_bucket *b, int pos); | 171 | extern int crush_get_bucket_item_weight(const struct crush_bucket *b, int pos); |
| 172 | extern void crush_calc_parents(struct crush_map *map); | 172 | extern void crush_calc_parents(struct crush_map *map); |
| 173 | extern void crush_destroy_bucket_uniform(struct crush_bucket_uniform *b); | 173 | extern void crush_destroy_bucket_uniform(struct crush_bucket_uniform *b); |
| 174 | extern void crush_destroy_bucket_list(struct crush_bucket_list *b); | 174 | extern void crush_destroy_bucket_list(struct crush_bucket_list *b); |
diff --git a/include/linux/crush/mapper.h b/include/linux/crush/mapper.h index c46b99c18bb0..9322ab8bccd8 100644 --- a/include/linux/crush/mapper.h +++ b/include/linux/crush/mapper.h | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include "crush.h" | 11 | #include "crush.h" |
| 12 | 12 | ||
| 13 | extern int crush_find_rule(struct crush_map *map, int pool, int type, int size); | 13 | extern int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size); |
| 14 | extern int crush_do_rule(struct crush_map *map, | 14 | extern int crush_do_rule(const 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 | int forcefeed, /* -1 for none */ | 17 | int forcefeed, /* -1 for none */ |
| 18 | __u32 *weights); | 18 | const __u32 *weights); |
| 19 | 19 | ||
| 20 | #endif | 20 | #endif |
