| 42 | using ceph::timespan_str; |
| 43 | |
| 44 | int MaskedOption::get_precision(const CrushWrapper *crush) |
| 45 | { |
| 46 | // 0 = most precise |
| 47 | if (mask.location_type.size()) { |
| 48 | int r = crush->get_type_id(mask.location_type); |
| 49 | if (r >= 0) { |
| 50 | return r; |
| 51 | } |
| 52 | // bad type name, ignore it |
| 53 | } |
| 54 | int num_types = crush->get_num_type_names(); |
| 55 | if (mask.device_class.size()) { |
| 56 | return num_types; |
| 57 | } |
| 58 | return num_types + 1; |
| 59 | } |
| 60 | |
| 61 | void OptionMask::dump(Formatter *f) const |
| 62 | { |
no test coverage detected