DAOS API (v2.0)
Loading...
Searching...
No Matches
daos_array.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2016-2021 Intel Corporation.
3 *
4 * SPDX-License-Identifier: BSD-2-Clause-Patent
5 */
15#ifndef __DAOS_ARRAY_H__
16#define __DAOS_ARRAY_H__
17
18#if defined(__cplusplus)
19extern "C" {
20#endif
21
23typedef struct {
25 daos_off_t rg_idx;
27 daos_size_t rg_len;
29
31typedef struct {
33 daos_size_t arr_nr;
36 /*
37 * On read only: return the number of records that are short fetched
38 * from the largest dkey(s). This helps for checking for short reads. If
39 * this values is not zero, then a short read is possible and should be
40 * checked with daos_array_get_size() compared with the indexes being
41 * read.
42 */
43 daos_size_t arr_nr_short_read;
44 daos_size_t arr_nr_read;
46
69static inline int
70daos_array_generate_oid(daos_handle_t coh, daos_obj_id_t *oid, bool add_attr, daos_oclass_id_t cid,
71 daos_oclass_hints_t hints, uint32_t args)
72{
73 enum daos_otype_t type;
74
75 type = DAOS_OT_ARRAY_ATTR;
76
77 if (add_attr)
78 type = DAOS_OT_ARRAY;
79
80 return daos_obj_generate_oid(coh, oid, type, cid, hints, args);
81}
82
117int
119 daos_size_t cell_size, daos_size_t chunk_size,
120 daos_handle_t *oh, daos_event_t *ev);
121
150int
152 unsigned int mode, daos_size_t *cell_size,
153 daos_size_t *chunk_size, daos_handle_t *oh, daos_event_t *ev);
154
183int
185 daos_handle_t th, unsigned int mode,
186 daos_size_t cell_size, daos_size_t chunk_size,
187 daos_handle_t *oh, daos_event_t *ev);
188
209int
211
229int
230daos_array_global2local(daos_handle_t coh, d_iov_t glob, unsigned int mode,
231 daos_handle_t *oh);
232
245int
247
270int
272 d_sg_list_t *sgl, daos_event_t *ev);
273
295int
297 d_sg_list_t *sgl, daos_event_t *ev);
298
315int
317 daos_event_t *ev);
318
338int
340 daos_event_t *ev);
341
363int
365
382int
384 daos_event_t *ev);
385
401int
402daos_array_get_attr(daos_handle_t oh, daos_size_t *chunk_size,
403 daos_size_t *cell_size);
404
405#if defined(__cplusplus)
406}
407#endif
408
409#endif /* __DAOS_ARRAY_H__ */
int daos_array_read(daos_handle_t oh, daos_handle_t th, daos_array_iod_t *iod, d_sg_list_t *sgl, daos_event_t *ev)
int daos_array_local2global(daos_handle_t oh, d_iov_t *glob)
int daos_array_close(daos_handle_t oh, daos_event_t *ev)
int daos_array_open(daos_handle_t coh, daos_obj_id_t oid, daos_handle_t th, unsigned int mode, daos_size_t *cell_size, daos_size_t *chunk_size, daos_handle_t *oh, daos_event_t *ev)
int daos_array_get_attr(daos_handle_t oh, daos_size_t *chunk_size, daos_size_t *cell_size)
int daos_array_set_size(daos_handle_t oh, daos_handle_t th, daos_size_t size, daos_event_t *ev)
int daos_array_get_size(daos_handle_t oh, daos_handle_t th, daos_size_t *size, daos_event_t *ev)
int daos_array_global2local(daos_handle_t coh, d_iov_t glob, unsigned int mode, daos_handle_t *oh)
int daos_array_open_with_attr(daos_handle_t coh, daos_obj_id_t oid, daos_handle_t th, unsigned int mode, daos_size_t cell_size, daos_size_t chunk_size, daos_handle_t *oh, daos_event_t *ev)
int daos_array_punch(daos_handle_t oh, daos_handle_t th, daos_array_iod_t *iod, daos_event_t *ev)
int daos_array_write(daos_handle_t oh, daos_handle_t th, daos_array_iod_t *iod, d_sg_list_t *sgl, daos_event_t *ev)
int daos_array_destroy(daos_handle_t oh, daos_handle_t th, daos_event_t *ev)
int daos_array_create(daos_handle_t coh, daos_obj_id_t oid, daos_handle_t th, daos_size_t cell_size, daos_size_t chunk_size, daos_handle_t *oh, daos_event_t *ev)
daos_range_t * arr_rgs
Definition daos_array.h:35
daos_size_t arr_nr
Definition daos_array.h:33
daos_size_t rg_len
Definition daos_array.h:27
daos_off_t rg_idx
Definition daos_array.h:25