Lines Matching refs:t

443 static void target_init(struct ceph_osd_request_target *t)  in target_init()  argument
445 ceph_oid_init(&t->base_oid); in target_init()
446 ceph_oloc_init(&t->base_oloc); in target_init()
447 ceph_oid_init(&t->target_oid); in target_init()
448 ceph_oloc_init(&t->target_oloc); in target_init()
450 ceph_osds_init(&t->acting); in target_init()
451 ceph_osds_init(&t->up); in target_init()
452 t->size = -1; in target_init()
453 t->min_size = -1; in target_init()
455 t->osd = CEPH_HOMELESS_OSD; in target_init()
487 static void target_destroy(struct ceph_osd_request_target *t) in target_destroy() argument
489 ceph_oid_destroy(&t->base_oid); in target_destroy()
490 ceph_oloc_destroy(&t->base_oloc); in target_destroy()
491 ceph_oid_destroy(&t->target_oid); in target_destroy()
492 ceph_oloc_destroy(&t->target_oloc); in target_destroy()
1546 const struct ceph_osd_request_target *t, in target_should_be_paused() argument
1554 WARN_ON(pi->id != t->target_oloc.pool); in target_should_be_paused()
1555 return ((t->flags & CEPH_OSD_FLAG_READ) && pauserd) || in target_should_be_paused()
1556 ((t->flags & CEPH_OSD_FLAG_WRITE) && pausewr) || in target_should_be_paused()
1606 struct ceph_osd_request_target *t, in calc_target() argument
1612 bool is_read = t->flags & CEPH_OSD_FLAG_READ; in calc_target()
1613 bool is_write = t->flags & CEPH_OSD_FLAG_WRITE; in calc_target()
1623 t->epoch = osdc->osdmap->epoch; in calc_target()
1624 pi = ceph_pg_pool_by_id(osdc->osdmap, t->base_oloc.pool); in calc_target()
1626 t->osd = CEPH_HOMELESS_OSD; in calc_target()
1632 if (t->last_force_resend < pi->last_force_request_resend) { in calc_target()
1633 t->last_force_resend = pi->last_force_request_resend; in calc_target()
1635 } else if (t->last_force_resend == 0) { in calc_target()
1641 ceph_oid_copy(&t->target_oid, &t->base_oid); in calc_target()
1642 ceph_oloc_copy(&t->target_oloc, &t->base_oloc); in calc_target()
1643 if ((t->flags & CEPH_OSD_FLAG_IGNORE_OVERLAY) == 0) { in calc_target()
1645 t->target_oloc.pool = pi->read_tier; in calc_target()
1647 t->target_oloc.pool = pi->write_tier; in calc_target()
1649 pi = ceph_pg_pool_by_id(osdc->osdmap, t->target_oloc.pool); in calc_target()
1651 t->osd = CEPH_HOMELESS_OSD; in calc_target()
1657 __ceph_object_locator_to_pg(pi, &t->target_oid, &t->target_oloc, &pgid); in calc_target()
1659 last_pgid.seed = ceph_stable_mod(pgid.seed, t->pg_num, t->pg_num_mask); in calc_target()
1663 ceph_is_new_interval(&t->acting, in calc_target()
1665 &t->up, in calc_target()
1667 t->size, in calc_target()
1669 t->min_size, in calc_target()
1671 t->pg_num, in calc_target()
1673 t->sort_bitwise, in calc_target()
1675 t->recovery_deletes, in calc_target()
1680 if (t->paused && !target_should_be_paused(osdc, t, pi)) { in calc_target()
1681 t->paused = false; in calc_target()
1684 legacy_change = ceph_pg_compare(&t->pgid, &pgid) || in calc_target()
1685 ceph_osds_changed(&t->acting, &acting, in calc_target()
1686 t->used_replica || any_change); in calc_target()
1687 if (t->pg_num) in calc_target()
1688 split = ceph_pg_is_split(&last_pgid, t->pg_num, pi->pg_num); in calc_target()
1691 t->pgid = pgid; /* struct */ in calc_target()
1692 ceph_pg_to_primary_shard(osdc->osdmap, pi, &pgid, &t->spgid); in calc_target()
1693 ceph_osds_copy(&t->acting, &acting); in calc_target()
1694 ceph_osds_copy(&t->up, &up); in calc_target()
1695 t->size = pi->size; in calc_target()
1696 t->min_size = pi->min_size; in calc_target()
1697 t->pg_num = pi->pg_num; in calc_target()
1698 t->pg_num_mask = pi->pg_num_mask; in calc_target()
1699 t->sort_bitwise = sort_bitwise; in calc_target()
1700 t->recovery_deletes = recovery_deletes; in calc_target()
1702 if ((t->flags & (CEPH_OSD_FLAG_BALANCE_READS | in calc_target()
1709 if (t->flags & CEPH_OSD_FLAG_BALANCE_READS) { in calc_target()
1714 t->osd = acting.osds[pos]; in calc_target()
1715 t->used_replica = pos > 0; in calc_target()
1717 t->osd = acting.primary; in calc_target()
1718 t->used_replica = false; in calc_target()
1728 dout("%s t %p -> %d%d%d%d ct_res %d osd%d\n", __func__, t, unpaused, in calc_target()
1729 legacy_change, force_resend, split, ct_res, t->osd); in calc_target()
2013 const struct ceph_osd_request_target *t) in hoid_fill_from_target() argument
2017 hoid->oid = t->target_oid.name; in hoid_fill_from_target()
2018 hoid->oid_len = t->target_oid.name_len; in hoid_fill_from_target()
2020 hoid->hash = t->pgid.seed; in hoid_fill_from_target()
2022 if (t->target_oloc.pool_ns) { in hoid_fill_from_target()
2023 hoid->nspace = t->target_oloc.pool_ns->str; in hoid_fill_from_target()
2024 hoid->nspace_len = t->target_oloc.pool_ns->len; in hoid_fill_from_target()
2029 hoid->pool = t->target_oloc.pool; in hoid_fill_from_target()
2803 target_destroy(&lreq->t); in linger_release()
2840 target_init(&lreq->t); in linger_alloc()
3162 target_copy(&req->r_t, &lreq->t); in send_linger()
3256 target_copy(&req->r_t, &lreq->t); in send_linger_ping()
3283 calc_target(osdc, &lreq->t, false); in linger_submit()
3284 osd = lookup_create_osd(osdc, lreq->t.osd, true); in linger_submit()
3927 ct_res = calc_target(osdc, &lreq->t, true); in recalc_linger_target()
3931 osd = lookup_create_osd(osdc, lreq->t.osd, true); in recalc_linger_target()
3969 pool_cleared_full(osdc, lreq->t.base_oloc.pool)); in scan_requests()
4459 static bool target_contained_by(const struct ceph_osd_request_target *t, in target_contained_by() argument
4466 hoid_fill_from_target(&hoid, t); in target_contained_by()
4798 ceph_oid_copy(&lreq->t.base_oid, oid); in ceph_osdc_watch()
4799 ceph_oloc_copy(&lreq->t.base_oloc, oloc); in ceph_osdc_watch()
4800 lreq->t.flags = CEPH_OSD_FLAG_WRITE; in ceph_osdc_watch()
4836 ceph_oid_copy(&req->r_base_oid, &lreq->t.base_oid); in ceph_osdc_unwatch()
4837 ceph_oloc_copy(&req->r_base_oloc, &lreq->t.base_oloc); in ceph_osdc_unwatch()
4983 ceph_oid_copy(&lreq->t.base_oid, oid); in ceph_osdc_notify()
4984 ceph_oloc_copy(&lreq->t.base_oloc, oloc); in ceph_osdc_notify()
4985 lreq->t.flags = CEPH_OSD_FLAG_READ; in ceph_osdc_notify()