Lines Matching refs:spg
1655 struct ceph_spg_mapping *spg; in alloc_spg_mapping() local
1657 spg = kmalloc(sizeof(*spg), GFP_NOIO); in alloc_spg_mapping()
1658 if (!spg) in alloc_spg_mapping()
1661 RB_CLEAR_NODE(&spg->node); in alloc_spg_mapping()
1662 spg->backoffs = RB_ROOT; in alloc_spg_mapping()
1663 return spg; in alloc_spg_mapping()
1666 static void free_spg_mapping(struct ceph_spg_mapping *spg) in free_spg_mapping() argument
1668 WARN_ON(!RB_EMPTY_NODE(&spg->node)); in free_spg_mapping()
1669 WARN_ON(!RB_EMPTY_ROOT(&spg->backoffs)); in free_spg_mapping()
1671 kfree(spg); in free_spg_mapping()
1911 struct ceph_spg_mapping *spg = in DEFINE_RB_FUNCS() local
1915 while (!RB_EMPTY_ROOT(&spg->backoffs)) { in DEFINE_RB_FUNCS()
1917 rb_entry(rb_first(&spg->backoffs), in DEFINE_RB_FUNCS()
1920 erase_backoff(&spg->backoffs, backoff); in DEFINE_RB_FUNCS()
1924 erase_spg_mapping(&osd->o_backoff_mappings, spg); in DEFINE_RB_FUNCS()
1925 free_spg_mapping(spg); in DEFINE_RB_FUNCS()
1956 struct ceph_spg_mapping *spg; in should_plug_request() local
1960 spg = lookup_spg_mapping(&osd->o_backoff_mappings, &req->r_t.spgid); in should_plug_request()
1961 if (!spg) in should_plug_request()
1965 backoff = lookup_containing_backoff(&spg->backoffs, &hoid); in should_plug_request()
4317 struct ceph_spg_mapping *spg; in handle_backoff_block() local
4324 spg = lookup_spg_mapping(&osd->o_backoff_mappings, &m->spgid); in handle_backoff_block()
4325 if (!spg) { in handle_backoff_block()
4326 spg = alloc_spg_mapping(); in handle_backoff_block()
4327 if (!spg) { in handle_backoff_block()
4331 spg->spgid = m->spgid; /* struct */ in handle_backoff_block()
4332 insert_spg_mapping(&osd->o_backoff_mappings, spg); in handle_backoff_block()
4347 insert_backoff(&spg->backoffs, backoff); in handle_backoff_block()
4377 struct ceph_spg_mapping *spg; in handle_backoff_unblock() local
4400 spg = lookup_spg_mapping(&osd->o_backoff_mappings, &backoff->spgid); in handle_backoff_unblock()
4401 BUG_ON(!spg); in handle_backoff_unblock()
4403 erase_backoff(&spg->backoffs, backoff); in handle_backoff_unblock()
4407 if (RB_EMPTY_ROOT(&spg->backoffs)) { in handle_backoff_unblock()
4408 erase_spg_mapping(&osd->o_backoff_mappings, spg); in handle_backoff_unblock()
4409 free_spg_mapping(spg); in handle_backoff_unblock()