Lines Matching refs:osd

1459 	u32 osd;  in __decode_primary_temp()  local
1461 ceph_decode_32_safe(p, end, osd, e_inval); in __decode_primary_temp()
1462 if (osd == (u32)-1 && incremental) in __decode_primary_temp()
1469 pg->primary_temp.osd = osd; in __decode_primary_temp()
1489 u32 ceph_get_primary_affinity(struct ceph_osdmap *map, int osd) in ceph_get_primary_affinity() argument
1491 BUG_ON(osd >= map->max_osd); in ceph_get_primary_affinity()
1496 return map->osd_primary_affinity[osd]; in ceph_get_primary_affinity()
1499 static int set_primary_affinity(struct ceph_osdmap *map, int osd, u32 aff) in set_primary_affinity() argument
1501 BUG_ON(osd >= map->max_osd); in set_primary_affinity()
1517 map->osd_primary_affinity[osd] = aff; in set_primary_affinity()
1559 u32 osd, aff; in decode_new_primary_affinity() local
1562 ceph_decode_32_safe(p, end, osd, e_inval); in decode_new_primary_affinity()
1565 ret = set_primary_affinity(map, osd, aff); in decode_new_primary_affinity()
1569 pr_info("osd%d primary-affinity 0x%x\n", osd, aff); in decode_new_primary_affinity()
1847 s32 osd; in decode_new_up_state_weight() local
1851 osd = ceph_decode_32(p); in decode_new_up_state_weight()
1853 BUG_ON(osd >= map->max_osd); in decode_new_up_state_weight()
1854 pr_info("osd%d weight 0x%x %s\n", osd, w, in decode_new_up_state_weight()
1857 map->osd_weight[osd] = w; in decode_new_up_state_weight()
1864 map->osd_state[osd] |= CEPH_OSD_EXISTS; in decode_new_up_state_weight()
1865 map->osd_state[osd] &= ~(CEPH_OSD_AUTOOUT | in decode_new_up_state_weight()
1875 s32 osd; in decode_new_up_state_weight() local
1879 osd = ceph_decode_32(p); in decode_new_up_state_weight()
1886 BUG_ON(osd >= map->max_osd); in decode_new_up_state_weight()
1887 if ((map->osd_state[osd] & CEPH_OSD_UP) && in decode_new_up_state_weight()
1889 pr_info("osd%d down\n", osd); in decode_new_up_state_weight()
1890 if ((map->osd_state[osd] & CEPH_OSD_EXISTS) && in decode_new_up_state_weight()
1892 pr_info("osd%d does not exist\n", osd); in decode_new_up_state_weight()
1893 ret = set_primary_affinity(map, osd, in decode_new_up_state_weight()
1897 memset(map->osd_addr + osd, 0, sizeof(*map->osd_addr)); in decode_new_up_state_weight()
1898 map->osd_state[osd] = 0; in decode_new_up_state_weight()
1900 map->osd_state[osd] ^= xorstate; in decode_new_up_state_weight()
1908 s32 osd; in decode_new_up_state_weight() local
1911 osd = ceph_decode_32(p); in decode_new_up_state_weight()
1912 BUG_ON(osd >= map->max_osd); in decode_new_up_state_weight()
1915 pr_info("osd%d up\n", osd); in decode_new_up_state_weight()
1916 map->osd_state[osd] |= CEPH_OSD_EXISTS | CEPH_OSD_UP; in decode_new_up_state_weight()
1917 map->osd_addr[osd] = addr; in decode_new_up_state_weight()
2308 static int calc_pg_rank(int osd, const struct ceph_osds *acting) in calc_pg_rank() argument
2313 if (acting->osds[i] == osd) in calc_pg_rank()
2568 int osd = pg->pg_upmap.osds[i]; in apply_upmap() local
2570 if (osd != CRUSH_ITEM_NONE && in apply_upmap()
2571 osd < osdmap->max_osd && in apply_upmap()
2572 osdmap->osd_weight[osd] == 0) { in apply_upmap()
2597 int osd = raw->osds[j]; in apply_upmap() local
2599 if (osd == to) { in apply_upmap()
2604 if (osd == from && pos < 0 && in apply_upmap()
2675 int osd = up->osds[i]; in apply_primary_affinity() local
2677 if (osd != CRUSH_ITEM_NONE && in apply_primary_affinity()
2678 osdmap->osd_primary_affinity[osd] != in apply_primary_affinity()
2692 int osd = up->osds[i]; in apply_primary_affinity() local
2695 if (osd == CRUSH_ITEM_NONE) in apply_primary_affinity()
2698 aff = osdmap->osd_primary_affinity[osd]; in apply_primary_affinity()
2701 pps, osd) >> 16) >= aff) { in apply_primary_affinity()
2771 temp->primary = pg->primary_temp.osd; in get_temp_osds()