diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2020-05-19 17:09:52 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-06-01 13:22:53 +0200 |
commit | 86403a92c3c5c6c395983fdbfc5e2f29dc39279b (patch) | |
tree | 0c1b12653a587c8ca07f16d448066281659b6458 /include | |
parent | libceph: add non-asserting rbtree insertion helper (diff) | |
download | linux-86403a92c3c5c6c395983fdbfc5e2f29dc39279b.tar.xz linux-86403a92c3c5c6c395983fdbfc5e2f29dc39279b.zip |
libceph: decode CRUSH device/bucket types and names
These would be matched with the provided client location to calculate
the locality value.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/crush/crush.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h index 38b0e4d50ed9..33c16f2de7f6 100644 --- a/include/linux/crush/crush.h +++ b/include/linux/crush/crush.h @@ -301,6 +301,12 @@ struct crush_map { __u32 *choose_tries; #else + /* device/bucket type id -> type name (CrushWrapper::type_map) */ + struct rb_root type_names; + + /* device/bucket id -> name (CrushWrapper::name_map) */ + struct rb_root names; + /* CrushWrapper::choose_args */ struct rb_root choose_args; #endif @@ -342,4 +348,10 @@ struct crush_work { struct crush_work_bucket **work; /* Per-bucket working store */ }; +#ifdef __KERNEL__ +/* osdmap.c */ +void clear_crush_names(struct rb_root *root); +void clear_choose_args(struct crush_map *c); +#endif + #endif |