| .. | .. |
|---|
| 17 | 17 | * The algorithm was originally described in detail in this paper |
|---|
| 18 | 18 | * (although the algorithm has evolved somewhat since then): |
|---|
| 19 | 19 | * |
|---|
| 20 | | - * http://www.ssrc.ucsc.edu/Papers/weil-sc06.pdf |
|---|
| 20 | + * https://www.ssrc.ucsc.edu/Papers/weil-sc06.pdf |
|---|
| 21 | 21 | * |
|---|
| 22 | 22 | * LGPL2 |
|---|
| 23 | 23 | */ |
|---|
| .. | .. |
|---|
| 87 | 87 | struct crush_rule { |
|---|
| 88 | 88 | __u32 len; |
|---|
| 89 | 89 | struct crush_rule_mask mask; |
|---|
| 90 | | - struct crush_rule_step steps[0]; |
|---|
| 90 | + struct crush_rule_step steps[]; |
|---|
| 91 | 91 | }; |
|---|
| 92 | 92 | |
|---|
| 93 | 93 | #define crush_rule_size(len) (sizeof(struct crush_rule) + \ |
|---|
| .. | .. |
|---|
| 301 | 301 | |
|---|
| 302 | 302 | __u32 *choose_tries; |
|---|
| 303 | 303 | #else |
|---|
| 304 | + /* device/bucket type id -> type name (CrushWrapper::type_map) */ |
|---|
| 305 | + struct rb_root type_names; |
|---|
| 306 | + |
|---|
| 307 | + /* device/bucket id -> name (CrushWrapper::name_map) */ |
|---|
| 308 | + struct rb_root names; |
|---|
| 309 | + |
|---|
| 304 | 310 | /* CrushWrapper::choose_args */ |
|---|
| 305 | 311 | struct rb_root choose_args; |
|---|
| 306 | 312 | #endif |
|---|
| .. | .. |
|---|
| 340 | 346 | |
|---|
| 341 | 347 | struct crush_work { |
|---|
| 342 | 348 | struct crush_work_bucket **work; /* Per-bucket working store */ |
|---|
| 349 | +#ifdef __KERNEL__ |
|---|
| 350 | + struct list_head item; |
|---|
| 351 | +#endif |
|---|
| 343 | 352 | }; |
|---|
| 344 | 353 | |
|---|
| 354 | +#ifdef __KERNEL__ |
|---|
| 355 | +/* osdmap.c */ |
|---|
| 356 | +void clear_crush_names(struct rb_root *root); |
|---|
| 357 | +void clear_choose_args(struct crush_map *c); |
|---|
| 358 | +#endif |
|---|
| 359 | + |
|---|
| 345 | 360 | #endif |
|---|