Lines Matching refs:pg

396 	struct ceph_pg_mapping *pg = NULL;  in __insert_pg_mapping()  local
402 pg = rb_entry(parent, struct ceph_pg_mapping, node); in __insert_pg_mapping()
403 c = pgid_cmp(new->pgid, pg->pgid); in __insert_pg_mapping()
421 struct ceph_pg_mapping *pg; in __lookup_pg_mapping() local
425 pg = rb_entry(n, struct ceph_pg_mapping, node); in __lookup_pg_mapping()
426 c = pgid_cmp(pgid, pg->pgid); in __lookup_pg_mapping()
433 pgid.pool, pgid.seed, pg); in __lookup_pg_mapping()
434 return pg; in __lookup_pg_mapping()
442 struct ceph_pg_mapping *pg = __lookup_pg_mapping(root, pgid); in __remove_pg_mapping() local
444 if (pg) { in __remove_pg_mapping()
446 pg); in __remove_pg_mapping()
447 rb_erase(&pg->node, root); in __remove_pg_mapping()
448 kfree(pg); in __remove_pg_mapping()
660 struct ceph_pg_mapping *pg = in ceph_osdmap_destroy() local
663 rb_erase(&pg->node, &map->pg_temp); in ceph_osdmap_destroy()
664 kfree(pg); in ceph_osdmap_destroy()
667 struct ceph_pg_mapping *pg = in ceph_osdmap_destroy() local
670 rb_erase(&pg->node, &map->primary_temp); in ceph_osdmap_destroy()
671 kfree(pg); in ceph_osdmap_destroy()
865 struct ceph_pg_mapping *pg; in __decode_pg_temp() local
869 if (len > (UINT_MAX - sizeof(*pg)) / sizeof(u32)) in __decode_pg_temp()
872 pg = kzalloc(sizeof(*pg) + len*sizeof(u32), GFP_NOFS); in __decode_pg_temp()
873 if (!pg) in __decode_pg_temp()
876 pg->pgid = pgid; in __decode_pg_temp()
877 pg->pg_temp.len = len; in __decode_pg_temp()
879 pg->pg_temp.osds[i] = ceph_decode_32(p); in __decode_pg_temp()
881 ret = __insert_pg_mapping(pg, &map->pg_temp); in __decode_pg_temp()
883 kfree(pg); in __decode_pg_temp()
926 struct ceph_pg_mapping *pg; in __decode_primary_temp() local
928 pg = kzalloc(sizeof(*pg), GFP_NOFS); in __decode_primary_temp()
929 if (!pg) in __decode_primary_temp()
932 pg->pgid = pgid; in __decode_primary_temp()
933 pg->primary_temp.osd = osd; in __decode_primary_temp()
935 ret = __insert_pg_mapping(pg, &map->primary_temp); in __decode_primary_temp()
937 kfree(pg); in __decode_primary_temp()
1643 struct ceph_pg_mapping *pg; in apply_temps() local
1653 pg = __lookup_pg_mapping(&osdmap->pg_temp, pgid); in apply_temps()
1654 if (pg) { in apply_temps()
1658 for (i = 0; i < pg->pg_temp.len; i++) { in apply_temps()
1659 if (ceph_osd_is_down(osdmap, pg->pg_temp.osds[i])) { in apply_temps()
1665 osds[temp_len++] = pg->pg_temp.osds[i]; in apply_temps()
1682 pg = __lookup_pg_mapping(&osdmap->primary_temp, pgid); in apply_temps()
1683 if (pg) in apply_temps()
1684 temp_primary = pg->primary_temp.osd; in apply_temps()