Skip to content

Commit

Permalink
crush: allow crush rules to set (re)tries counts to 0
Browse files Browse the repository at this point in the history
These two fields are misnomers; they are *retry* counts.

Reflects ceph.git commit f17caba8ae0cad7b6f8f35e53e5f73b444696835.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
  • Loading branch information
Ilya Dryomov authored and Sage Weil committed Apr 5, 2014
1 parent 48a163d commit 6ed1002
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ceph/crush/mapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,12 +684,12 @@ int crush_do_rule(const struct crush_map *map,
break;

case CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES:
if (curstep->arg1 > 0)
if (curstep->arg1 >= 0)
choose_local_retries = curstep->arg1;
break;

case CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES:
if (curstep->arg1 > 0)
if (curstep->arg1 >= 0)
choose_local_fallback_retries = curstep->arg1;
break;

Expand Down

0 comments on commit 6ed1002

Please sign in to comment.