Lines Matching refs:osd
1255 u32 osd; in __decode_primary_temp() local
1257 ceph_decode_32_safe(p, end, osd, e_inval); in __decode_primary_temp()
1258 if (osd == (u32)-1 && incremental) in __decode_primary_temp()
1265 pg->primary_temp.osd = osd; in __decode_primary_temp()
1285 u32 ceph_get_primary_affinity(struct ceph_osdmap *map, int osd) in ceph_get_primary_affinity() argument
1287 BUG_ON(osd >= map->max_osd); in ceph_get_primary_affinity()
1292 return map->osd_primary_affinity[osd]; in ceph_get_primary_affinity()
1295 static int set_primary_affinity(struct ceph_osdmap *map, int osd, u32 aff) in set_primary_affinity() argument
1297 BUG_ON(osd >= map->max_osd); in set_primary_affinity()
1313 map->osd_primary_affinity[osd] = aff; in set_primary_affinity()
1355 u32 osd, aff; in decode_new_primary_affinity() local
1358 ceph_decode_32_safe(p, end, osd, e_inval); in decode_new_primary_affinity()
1361 ret = set_primary_affinity(map, osd, aff); in decode_new_primary_affinity()
1365 pr_info("osd%d primary-affinity 0x%x\n", osd, aff); in decode_new_primary_affinity()
1638 s32 osd; in decode_new_up_state_weight() local
1642 osd = ceph_decode_32(p); in decode_new_up_state_weight()
1644 BUG_ON(osd >= map->max_osd); in decode_new_up_state_weight()
1645 pr_info("osd%d weight 0x%x %s\n", osd, w, in decode_new_up_state_weight()
1648 map->osd_weight[osd] = w; in decode_new_up_state_weight()
1655 map->osd_state[osd] |= CEPH_OSD_EXISTS; in decode_new_up_state_weight()
1656 map->osd_state[osd] &= ~(CEPH_OSD_AUTOOUT | in decode_new_up_state_weight()
1666 s32 osd; in decode_new_up_state_weight() local
1670 osd = ceph_decode_32(p); in decode_new_up_state_weight()
1677 BUG_ON(osd >= map->max_osd); in decode_new_up_state_weight()
1678 if ((map->osd_state[osd] & CEPH_OSD_UP) && in decode_new_up_state_weight()
1680 pr_info("osd%d down\n", osd); in decode_new_up_state_weight()
1681 if ((map->osd_state[osd] & CEPH_OSD_EXISTS) && in decode_new_up_state_weight()
1683 pr_info("osd%d does not exist\n", osd); in decode_new_up_state_weight()
1684 ret = set_primary_affinity(map, osd, in decode_new_up_state_weight()
1688 memset(map->osd_addr + osd, 0, sizeof(*map->osd_addr)); in decode_new_up_state_weight()
1689 map->osd_state[osd] = 0; in decode_new_up_state_weight()
1691 map->osd_state[osd] ^= xorstate; in decode_new_up_state_weight()
1699 s32 osd; in decode_new_up_state_weight() local
1702 osd = ceph_decode_32(p); in decode_new_up_state_weight()
1705 BUG_ON(osd >= map->max_osd); in decode_new_up_state_weight()
1706 pr_info("osd%d up\n", osd); in decode_new_up_state_weight()
1707 map->osd_state[osd] |= CEPH_OSD_EXISTS | CEPH_OSD_UP; in decode_new_up_state_weight()
1708 map->osd_addr[osd] = addr; in decode_new_up_state_weight()
2099 static int calc_pg_rank(int osd, const struct ceph_osds *acting) in calc_pg_rank() argument
2104 if (acting->osds[i] == osd) in calc_pg_rank()
2359 int osd = pg->pg_upmap.osds[i]; in apply_upmap() local
2361 if (osd != CRUSH_ITEM_NONE && in apply_upmap()
2362 osd < osdmap->max_osd && in apply_upmap()
2363 osdmap->osd_weight[osd] == 0) { in apply_upmap()
2388 int osd = raw->osds[j]; in apply_upmap() local
2390 if (osd == to) { in apply_upmap()
2395 if (osd == from && pos < 0 && in apply_upmap()
2466 int osd = up->osds[i]; in apply_primary_affinity() local
2468 if (osd != CRUSH_ITEM_NONE && in apply_primary_affinity()
2469 osdmap->osd_primary_affinity[osd] != in apply_primary_affinity()
2483 int osd = up->osds[i]; in apply_primary_affinity() local
2486 if (osd == CRUSH_ITEM_NONE) in apply_primary_affinity()
2489 aff = osdmap->osd_primary_affinity[osd]; in apply_primary_affinity()
2492 pps, osd) >> 16) >= aff) { in apply_primary_affinity()
2562 temp->primary = pg->primary_temp.osd; in get_temp_osds()