Skip to content

Commit 917edad

Browse files
committed
crush: CHOOSE_LEAF -> CHOOSELEAF throughout
This aligns the internal identifier names with the user-visible names in the decompiled crush map language. Reflects ceph.git commit caa0e22e15e4226c3671318ba1f61314bf6da2a6. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
1 parent cc10df4 commit 917edad

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎include/linux/crush/crush.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ enum {
4444
/* arg2 = type */
4545
CRUSH_RULE_CHOOSE_INDEP = 3, /* same */
4646
CRUSH_RULE_EMIT = 4, /* no args */
47-
CRUSH_RULE_CHOOSE_LEAF_FIRSTN = 6,
48-
CRUSH_RULE_CHOOSE_LEAF_INDEP = 7,
47+
CRUSH_RULE_CHOOSELEAF_FIRSTN = 6,
48+
CRUSH_RULE_CHOOSELEAF_INDEP = 7,
4949

5050
CRUSH_RULE_SET_CHOOSE_TRIES = 8, /* override choose_total_tries */
51-
CRUSH_RULE_SET_CHOOSE_LEAF_TRIES = 9, /* override chooseleaf_descend_once */
51+
CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */
5252
};
5353

5454
/*

‎net/ceph/crush/mapper.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,25 +666,25 @@ int crush_do_rule(const struct crush_map *map,
666666
choose_tries = curstep->arg1;
667667
break;
668668

669-
case CRUSH_RULE_SET_CHOOSE_LEAF_TRIES:
669+
case CRUSH_RULE_SET_CHOOSELEAF_TRIES:
670670
if (curstep->arg1 > 0)
671671
choose_leaf_tries = curstep->arg1;
672672
break;
673673

674-
case CRUSH_RULE_CHOOSE_LEAF_FIRSTN:
674+
case CRUSH_RULE_CHOOSELEAF_FIRSTN:
675675
case CRUSH_RULE_CHOOSE_FIRSTN:
676676
firstn = 1;
677677
/* fall through */
678-
case CRUSH_RULE_CHOOSE_LEAF_INDEP:
678+
case CRUSH_RULE_CHOOSELEAF_INDEP:
679679
case CRUSH_RULE_CHOOSE_INDEP:
680680
if (wsize == 0)
681681
break;
682682

683683
recurse_to_leaf =
684684
curstep->op ==
685-
CRUSH_RULE_CHOOSE_LEAF_FIRSTN ||
685+
CRUSH_RULE_CHOOSELEAF_FIRSTN ||
686686
curstep->op ==
687-
CRUSH_RULE_CHOOSE_LEAF_INDEP;
687+
CRUSH_RULE_CHOOSELEAF_INDEP;
688688

689689
/* reset output */
690690
osize = 0;

0 commit comments

Comments
 (0)