- bootstrap crush map
crush
-- rule naming
- - would about a tuple of (type, minsize, maxsize, pool) for each rule? then we'd do a
- quick 'search' to find the best rule given (pg_type, pg_size, pg_pool)...
- xml import/export?
- named storage "pools"?
- generic rule definition
ruleno = crush_find_rule(osdc->osdmap->crush, req->r_pgid.pg.pool,
req->r_pgid.pg.type, req->r_pgid.pg.size);
BUG_ON(ruleno < 0); /* fixme, need some proper error handling here */
+ dout(30, "using crush rule %d\n", ruleno);
nr_osds = crush_do_rule(osdc->osdmap->crush, ruleno,
- req->r_pgid.pg.ps, osds, 10,
+ req->r_pgid.pg.ps, osds, req->r_pgid.pg.size,
req->r_pgid.pg.preferred);
for (i=0; i<nr_osds; i++) {
if (ceph_osd_is_up(osdc->osdmap, osds[i]))