diff options
| -rw-r--r-- | include/linux/crush/crush.h | 1 | ||||
| -rw-r--r-- | net/ceph/crush/mapper.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h index 75f36a6c7f67..4fad5f8ee01d 100644 --- a/include/linux/crush/crush.h +++ b/include/linux/crush/crush.h | |||
| @@ -51,6 +51,7 @@ enum { | |||
| 51 | CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */ | 51 | CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */ |
| 52 | CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES = 10, | 52 | CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES = 10, |
| 53 | CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES = 11, | 53 | CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES = 11, |
| 54 | CRUSH_RULE_SET_CHOOSELEAF_VARY_R = 12 | ||
| 54 | }; | 55 | }; |
| 55 | 56 | ||
| 56 | /* | 57 | /* |
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c index 947150cde297..a1ef53c04415 100644 --- a/net/ceph/crush/mapper.c +++ b/net/ceph/crush/mapper.c | |||
| @@ -709,6 +709,11 @@ int crush_do_rule(const struct crush_map *map, | |||
| 709 | choose_local_fallback_retries = curstep->arg1; | 709 | choose_local_fallback_retries = curstep->arg1; |
| 710 | break; | 710 | break; |
| 711 | 711 | ||
| 712 | case CRUSH_RULE_SET_CHOOSELEAF_VARY_R: | ||
| 713 | if (curstep->arg1 >= 0) | ||
| 714 | vary_r = curstep->arg1; | ||
| 715 | break; | ||
| 716 | |||
| 712 | case CRUSH_RULE_CHOOSELEAF_FIRSTN: | 717 | case CRUSH_RULE_CHOOSELEAF_FIRSTN: |
| 713 | case CRUSH_RULE_CHOOSE_FIRSTN: | 718 | case CRUSH_RULE_CHOOSE_FIRSTN: |
| 714 | firstn = 1; | 719 | firstn = 1; |
