Lines Matching refs:backoff
1850 struct ceph_osd_backoff *backoff; in alloc_backoff() local
1852 backoff = kzalloc(sizeof(*backoff), GFP_NOIO); in alloc_backoff()
1853 if (!backoff) in alloc_backoff()
1856 RB_CLEAR_NODE(&backoff->spg_node); in alloc_backoff()
1857 RB_CLEAR_NODE(&backoff->id_node); in alloc_backoff()
1858 return backoff; in alloc_backoff()
1861 static void free_backoff(struct ceph_osd_backoff *backoff) in free_backoff() argument
1863 WARN_ON(!RB_EMPTY_NODE(&backoff->spg_node)); in free_backoff()
1864 WARN_ON(!RB_EMPTY_NODE(&backoff->id_node)); in free_backoff()
1866 free_hoid(backoff->begin); in free_backoff()
1867 free_hoid(backoff->end); in free_backoff()
1868 kfree(backoff); in free_backoff()
1874 DEFINE_RB_INSDEL_FUNCS2(backoff, struct ceph_osd_backoff, begin, hoid_compare,
1916 struct ceph_osd_backoff *backoff = in DEFINE_RB_FUNCS() local
1920 erase_backoff(&spg->backoffs, backoff); in DEFINE_RB_FUNCS()
1921 erase_backoff_by_id(&osd->o_backoffs_by_id, backoff); in DEFINE_RB_FUNCS()
1922 free_backoff(backoff); in DEFINE_RB_FUNCS()
1957 struct ceph_osd_backoff *backoff; in should_plug_request() local
1965 backoff = lookup_containing_backoff(&spg->backoffs, &hoid); in should_plug_request()
1966 if (!backoff) in should_plug_request()
1970 __func__, req, req->r_tid, osd->o_osd, backoff->spgid.pgid.pool, in should_plug_request()
1971 backoff->spgid.pgid.seed, backoff->spgid.shard, backoff->id); in should_plug_request()
4287 const struct ceph_osd_backoff *backoff, in create_backoff_message() argument
4298 hoid_encoding_size(backoff->begin); in create_backoff_message()
4300 hoid_encoding_size(backoff->end); in create_backoff_message()
4309 encode_spgid(&p, &backoff->spgid); in create_backoff_message()
4312 ceph_encode_64(&p, backoff->id); in create_backoff_message()
4313 encode_hoid(&p, end, backoff->begin); in create_backoff_message()
4314 encode_hoid(&p, end, backoff->end); in create_backoff_message()
4327 struct ceph_osd_backoff *backoff; in handle_backoff_block() local
4344 backoff = alloc_backoff(); in handle_backoff_block()
4345 if (!backoff) { in handle_backoff_block()
4349 backoff->spgid = m->spgid; /* struct */ in handle_backoff_block()
4350 backoff->id = m->id; in handle_backoff_block()
4351 backoff->begin = m->begin; in handle_backoff_block()
4353 backoff->end = m->end; in handle_backoff_block()
4356 insert_backoff(&spg->backoffs, backoff); in handle_backoff_block()
4357 insert_backoff_by_id(&osd->o_backoffs_by_id, backoff); in handle_backoff_block()
4363 msg = create_backoff_message(backoff, m->map_epoch); in handle_backoff_block()
4387 struct ceph_osd_backoff *backoff; in handle_backoff_unblock() local
4393 backoff = lookup_backoff_by_id(&osd->o_backoffs_by_id, m->id); in handle_backoff_unblock()
4394 if (!backoff) { in handle_backoff_unblock()
4401 if (hoid_compare(backoff->begin, m->begin) && in handle_backoff_unblock()
4402 hoid_compare(backoff->end, m->end)) { in handle_backoff_unblock()
4409 spg = lookup_spg_mapping(&osd->o_backoff_mappings, &backoff->spgid); in handle_backoff_unblock()
4412 erase_backoff(&spg->backoffs, backoff); in handle_backoff_unblock()
4413 erase_backoff_by_id(&osd->o_backoffs_by_id, backoff); in handle_backoff_unblock()
4414 free_backoff(backoff); in handle_backoff_unblock()