From: Sage Weil Date: Sat, 8 Feb 2014 20:23:05 +0000 (-0800) Subject: crush: allow crush rules to set (re)tries counts to 0 X-Git-Tag: v0.77~7^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1201%2Fhead;p=ceph.git crush: allow crush rules to set (re)tries counts to 0 These two fields are misnomers; they are *retry* counts. Signed-off-by: Sage Weil --- diff --git a/src/crush/mapper.c b/src/crush/mapper.c index a9c9b422a41..0b318443bcd 100644 --- a/src/crush/mapper.c +++ b/src/crush/mapper.c @@ -716,12 +716,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;