Lines Matching refs:hoid

1704 static u64 hoid_get_bitwise_key(const struct ceph_hobject_id *hoid)  in DEFINE_RB_FUNCS2()
1706 return hoid->is_max ? 0x100000000ull : hoid->hash_reverse_bits; in DEFINE_RB_FUNCS2()
1709 static void hoid_get_effective_key(const struct ceph_hobject_id *hoid, in hoid_get_effective_key() argument
1712 if (hoid->key_len) { in hoid_get_effective_key()
1713 *pkey = hoid->key; in hoid_get_effective_key()
1714 *pkey_len = hoid->key_len; in hoid_get_effective_key()
1716 *pkey = hoid->oid; in hoid_get_effective_key()
1717 *pkey_len = hoid->oid_len; in hoid_get_effective_key()
1788 static int decode_hoid(void **p, void *end, struct ceph_hobject_id *hoid) in decode_hoid() argument
1804 hoid->key = ceph_extract_encoded_string(p, end, &hoid->key_len, in decode_hoid()
1806 if (IS_ERR(hoid->key)) { in decode_hoid()
1807 ret = PTR_ERR(hoid->key); in decode_hoid()
1808 hoid->key = NULL; in decode_hoid()
1812 hoid->oid = ceph_extract_encoded_string(p, end, &hoid->oid_len, in decode_hoid()
1814 if (IS_ERR(hoid->oid)) { in decode_hoid()
1815 ret = PTR_ERR(hoid->oid); in decode_hoid()
1816 hoid->oid = NULL; in decode_hoid()
1820 ceph_decode_64_safe(p, end, hoid->snapid, e_inval); in decode_hoid()
1821 ceph_decode_32_safe(p, end, hoid->hash, e_inval); in decode_hoid()
1822 ceph_decode_8_safe(p, end, hoid->is_max, e_inval); in decode_hoid()
1824 hoid->nspace = ceph_extract_encoded_string(p, end, &hoid->nspace_len, in decode_hoid()
1826 if (IS_ERR(hoid->nspace)) { in decode_hoid()
1827 ret = PTR_ERR(hoid->nspace); in decode_hoid()
1828 hoid->nspace = NULL; in decode_hoid()
1832 ceph_decode_64_safe(p, end, hoid->pool, e_inval); in decode_hoid()
1834 ceph_hoid_build_hash_cache(hoid); in decode_hoid()
1841 static int hoid_encoding_size(const struct ceph_hobject_id *hoid) in hoid_encoding_size() argument
1844 4 + hoid->key_len + 4 + hoid->oid_len + 4 + hoid->nspace_len; in hoid_encoding_size()
1847 static void encode_hoid(void **p, void *end, const struct ceph_hobject_id *hoid) in encode_hoid() argument
1849 ceph_start_encoding(p, 4, 3, hoid_encoding_size(hoid)); in encode_hoid()
1850 ceph_encode_string(p, end, hoid->key, hoid->key_len); in encode_hoid()
1851 ceph_encode_string(p, end, hoid->oid, hoid->oid_len); in encode_hoid()
1852 ceph_encode_64(p, hoid->snapid); in encode_hoid()
1853 ceph_encode_32(p, hoid->hash); in encode_hoid()
1854 ceph_encode_8(p, hoid->is_max); in encode_hoid()
1855 ceph_encode_string(p, end, hoid->nspace, hoid->nspace_len); in encode_hoid()
1856 ceph_encode_64(p, hoid->pool); in encode_hoid()
1859 static void free_hoid(struct ceph_hobject_id *hoid) in free_hoid() argument
1861 if (hoid) { in free_hoid()
1862 kfree(hoid->key); in free_hoid()
1863 kfree(hoid->oid); in free_hoid()
1864 kfree(hoid->nspace); in free_hoid()
1865 kfree(hoid); in free_hoid()
1899 const struct ceph_hobject_id *hoid) in lookup_containing_backoff() argument
1908 cmp = hoid_compare(hoid, cur->begin); in lookup_containing_backoff()
1912 if (hoid_compare(hoid, cur->end) < 0) in lookup_containing_backoff()
1953 static void hoid_fill_from_target(struct ceph_hobject_id *hoid, in hoid_fill_from_target() argument
1956 hoid->key = NULL; in hoid_fill_from_target()
1957 hoid->key_len = 0; in hoid_fill_from_target()
1958 hoid->oid = t->target_oid.name; in hoid_fill_from_target()
1959 hoid->oid_len = t->target_oid.name_len; in hoid_fill_from_target()
1960 hoid->snapid = CEPH_NOSNAP; in hoid_fill_from_target()
1961 hoid->hash = t->pgid.seed; in hoid_fill_from_target()
1962 hoid->is_max = false; in hoid_fill_from_target()
1964 hoid->nspace = t->target_oloc.pool_ns->str; in hoid_fill_from_target()
1965 hoid->nspace_len = t->target_oloc.pool_ns->len; in hoid_fill_from_target()
1967 hoid->nspace = NULL; in hoid_fill_from_target()
1968 hoid->nspace_len = 0; in hoid_fill_from_target()
1970 hoid->pool = t->target_oloc.pool; in hoid_fill_from_target()
1971 ceph_hoid_build_hash_cache(hoid); in hoid_fill_from_target()
1979 struct ceph_hobject_id hoid; in should_plug_request() local
1985 hoid_fill_from_target(&hoid, &req->r_t); in should_plug_request()
1986 backoff = lookup_containing_backoff(&spg->backoffs, &hoid); in should_plug_request()
4345 struct ceph_hobject_id hoid; in target_contained_by() local
4348 hoid_fill_from_target(&hoid, t); in target_contained_by()
4349 cmp = hoid_compare(&hoid, begin); in target_contained_by()
4350 return !cmp || (cmp > 0 && hoid_compare(&hoid, end) < 0); in target_contained_by()