]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/crush/mapper.c
import quincy beta 17.1.0
[ceph.git] / ceph / src / crush / mapper.c
index 4ac57262716a5f2887f7ec03a377bedef89b76f7..736cc6162c9747cbab80dcf5b9413a72d7c31f86 100644 (file)
  * Implement the core CRUSH mapping algorithm.
  */
 
-/**
- * crush_find_rule - find a crush_rule id for a given ruleset, type, and size.
- * @map: the crush_map
- * @ruleset: the storage ruleset id (user defined)
- * @type: storage ruleset type (user defined)
- * @size: output set size
- */
-int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size)
-{
-       __u32 i;
-
-       for (i = 0; i < map->max_rules; i++) {
-               if (map->rules[i] &&
-                   map->rules[i]->mask.ruleset == ruleset &&
-                   map->rules[i]->mask.type == type &&
-                   map->rules[i]->mask.min_size <= size &&
-                   map->rules[i]->mask.max_size >= size)
-                       return i;
-       }
-       return -1;
-}
-
 /*
  * bucket choose methods
  *