Loading net/ceph/crush/mapper.c +13 −22 Original line number Original line Diff line number Diff line Loading @@ -477,7 +477,6 @@ int crush_do_rule(struct crush_map *map, int i, j; int i, j; int numrep; int numrep; int firstn; int firstn; int rc = -1; BUG_ON(ruleno >= map->max_rules); BUG_ON(ruleno >= map->max_rules); Loading @@ -491,14 +490,10 @@ int crush_do_rule(struct crush_map *map, * that this may or may not correspond to the specific types * that this may or may not correspond to the specific types * referenced by the crush rule. * referenced by the crush rule. */ */ if (force >= 0) { if (force >= 0 && if (force >= map->max_devices || force < map->max_devices && map->device_parents[force] == 0) { map->device_parents[force] != 0 && /*dprintk("CRUSH: forcefed device dne\n");*/ !is_out(map, weight, force, x)) { rc = -1; /* force fed device dne */ goto out; } if (!is_out(map, weight, force, x)) { while (1) { while (1) { force_context[++force_pos] = force; force_context[++force_pos] = force; if (force >= 0) if (force >= 0) Loading @@ -509,7 +504,6 @@ int crush_do_rule(struct crush_map *map, break; break; } } } } } for (step = 0; step < rule->len; step++) { for (step = 0; step < rule->len; step++) { firstn = 0; firstn = 0; Loading Loading @@ -600,10 +594,7 @@ int crush_do_rule(struct crush_map *map, BUG_ON(1); BUG_ON(1); } } } } rc = result_len; return result_len; out: return rc; } } Loading
net/ceph/crush/mapper.c +13 −22 Original line number Original line Diff line number Diff line Loading @@ -477,7 +477,6 @@ int crush_do_rule(struct crush_map *map, int i, j; int i, j; int numrep; int numrep; int firstn; int firstn; int rc = -1; BUG_ON(ruleno >= map->max_rules); BUG_ON(ruleno >= map->max_rules); Loading @@ -491,14 +490,10 @@ int crush_do_rule(struct crush_map *map, * that this may or may not correspond to the specific types * that this may or may not correspond to the specific types * referenced by the crush rule. * referenced by the crush rule. */ */ if (force >= 0) { if (force >= 0 && if (force >= map->max_devices || force < map->max_devices && map->device_parents[force] == 0) { map->device_parents[force] != 0 && /*dprintk("CRUSH: forcefed device dne\n");*/ !is_out(map, weight, force, x)) { rc = -1; /* force fed device dne */ goto out; } if (!is_out(map, weight, force, x)) { while (1) { while (1) { force_context[++force_pos] = force; force_context[++force_pos] = force; if (force >= 0) if (force >= 0) Loading @@ -509,7 +504,6 @@ int crush_do_rule(struct crush_map *map, break; break; } } } } } for (step = 0; step < rule->len; step++) { for (step = 0; step < rule->len; step++) { firstn = 0; firstn = 0; Loading Loading @@ -600,10 +594,7 @@ int crush_do_rule(struct crush_map *map, BUG_ON(1); BUG_ON(1); } } } } rc = result_len; return result_len; out: return rc; } }