Skip to content

Commit d83ed85

Browse files
idryomovSage Weil
authored andcommitted
crush: add SET_CHOOSELEAF_VARY_R step
This lets you adjust the vary_r tunable on a per-rule basis. Reflects ceph.git commit f944ccc20aee60a7d8da7e405ec75ad1cd449fac. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
1 parent e2b149c commit d83ed85

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎include/linux/crush/crush.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ enum {
5151
CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */
5252
CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES = 10,
5353
CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES = 11,
54+
CRUSH_RULE_SET_CHOOSELEAF_VARY_R = 12
5455
};
5556

5657
/*

‎net/ceph/crush/mapper.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,11 @@ int crush_do_rule(const struct crush_map *map,
709709
choose_local_fallback_retries = curstep->arg1;
710710
break;
711711

712+
case CRUSH_RULE_SET_CHOOSELEAF_VARY_R:
713+
if (curstep->arg1 >= 0)
714+
vary_r = curstep->arg1;
715+
break;
716+
712717
case CRUSH_RULE_CHOOSELEAF_FIRSTN:
713718
case CRUSH_RULE_CHOOSE_FIRSTN:
714719
firstn = 1;

0 commit comments

Comments
 (0)