]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: allow crush rules to set (re)tries counts to 0 1201/head
authorSage Weil <sage@inktank.com>
Sat, 8 Feb 2014 20:23:05 +0000 (12:23 -0800)
committerSage Weil <sage@inktank.com>
Sat, 8 Feb 2014 20:23:05 +0000 (12:23 -0800)
These two fields are misnomers; they are *retry* counts.

Signed-off-by: Sage Weil <sage@inktank.com>
src/crush/mapper.c

index a9c9b422a4174bf46ef864fe88fd7fe284546fda..0b318443bcd42f2923a14e77c834d1961657e65d 100644 (file)
@@ -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;