DAOS API (v2.1 - dev)
Loading...
Searching...
No Matches
daos_array.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2016-2024 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
22#include <daos_types.h>
23#include <daos_obj.h>
24#include <daos_obj_class.h>
25
27typedef struct {
29 daos_off_t rg_idx;
31 daos_size_t rg_len;
33
35typedef struct {
37 daos_size_t arr_nr;
44 daos_size_t arr_nr_short_read;
46 daos_size_t arr_nr_read;
48
50typedef struct {
52 daos_size_t st_size;
54 daos_epoch_t st_max_epoch;
56
79static inline int
80daos_array_generate_oid(daos_handle_t coh, daos_obj_id_t *oid, bool add_attr, daos_oclass_id_t cid,
81 daos_oclass_hints_t hints, uint32_t args)
82{
83 enum daos_otype_t type;
84
85 type = DAOS_OT_ARRAY_ATTR;
86
87 if (add_attr)
88 type = DAOS_OT_ARRAY;
89
90 return daos_obj_generate_oid(coh, oid, type, cid, hints, args);
91}
92
127int
129 daos_size_t cell_size, daos_size_t chunk_size,
130 daos_handle_t *oh, daos_event_t *ev);
131
159int
161 unsigned int mode, daos_size_t *cell_size,
162 daos_size_t *chunk_size, daos_handle_t *oh, daos_event_t *ev);
163
192int
194 daos_handle_t th, unsigned int mode,
195 daos_size_t cell_size, daos_size_t chunk_size,
196 daos_handle_t *oh, daos_event_t *ev);
197
218int
220
238int
239daos_array_global2local(daos_handle_t coh, d_iov_t glob, unsigned int mode,
240 daos_handle_t *oh);
241
254int
256
279int
281 d_sg_list_t *sgl, daos_event_t *ev);
282
304int
306 d_sg_list_t *sgl, daos_event_t *ev);
307
324int
326
343int
345
365int
367 daos_event_t *ev);
368
390int
392
409int
411 daos_event_t *ev);
412
428int
429daos_array_get_attr(daos_handle_t oh, daos_size_t *chunk_size,
430 daos_size_t *cell_size);
431
444int
445daos_array_update_chunk_size(daos_handle_t oh, daos_size_t chunk_size);
446
447#if defined(__cplusplus)
448}
449#endif
450
451#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_update_chunk_size(daos_handle_t oh, daos_size_t chunk_size)
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_stat(daos_handle_t oh, daos_handle_t th, daos_array_stbuf_t *stbuf, 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:39
daos_size_t arr_nr
Definition daos_array.h:37
daos_size_t arr_nr_short_read
Definition daos_array.h:44
daos_size_t arr_nr_read
Definition daos_array.h:46
daos_epoch_t st_max_epoch
Definition daos_array.h:54
daos_size_t st_size
Definition daos_array.h:52
daos_size_t rg_len
Definition daos_array.h:31
daos_off_t rg_idx
Definition daos_array.h:29