OSDN Git Service

crush: allow crush rules to set (re)tries counts to 0
authorIlya Dryomov <ilya.dryomov@inktank.com>
Wed, 19 Mar 2014 14:58:37 +0000 (16:58 +0200)
committerSage Weil <sage@inktank.com>
Sat, 5 Apr 2014 04:07:25 +0000 (21:07 -0700)
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>
net/ceph/crush/mapper.c

index 074bb2a..b3fb849 100644 (file)
@@ -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;