DAOS API (v2.1 - dev)
Loading...
Searching...
No Matches
daos_task.h
1
10#ifndef __DAOS_TASK_H__
11#define __DAOS_TASK_H__
12
13#if defined(__cplusplus)
14extern "C" {
15#endif
16
17#include <daos_types.h>
18#include <daos_obj.h>
19#include <daos_kv.h>
20#include <daos_array.h>
21#include <daos_errno.h>
22#include <daos_prop.h>
23#include <daos_cont.h>
24#include <daos_pool.h>
25#include <daos_mgmt.h>
26#include <daos/tse.h>
27
29typedef enum {
30 DAOS_OPC_INVALID = -1,
31
33 /* Starting at 0 will break Application Binary Interface backward
34 * compatibility */
35 DAOS_OPC_SET_PARAMS = 3,
36 DAOS_OPC_MGMT_GET_BS_STATE,
37
39 DAOS_OPC_POOL_CONNECT = 5,
40 DAOS_OPC_POOL_DISCONNECT,
41 DAOS_OPC_POOL_EXCLUDE,
42 DAOS_OPC_POOL_EXCLUDE_OUT,
43 DAOS_OPC_POOL_ADD,
44 DAOS_OPC_POOL_QUERY,
45 DAOS_OPC_POOL_QUERY_INFO,
46 DAOS_OPC_POOL_LIST_ATTR,
47 DAOS_OPC_POOL_GET_ATTR,
48 DAOS_OPC_POOL_SET_ATTR,
49 DAOS_OPC_POOL_DEL_ATTR,
50 DAOS_OPC_POOL_STOP_SVC,
51 DAOS_OPC_POOL_LIST_CONT,
52
54 DAOS_OPC_CONT_CREATE = 18,
55 DAOS_OPC_CONT_OPEN,
56 DAOS_OPC_CONT_CLOSE,
57 DAOS_OPC_CONT_DESTROY,
58 DAOS_OPC_CONT_QUERY,
59 DAOS_OPC_CONT_SET_PROP,
60 DAOS_OPC_CONT_UPDATE_ACL,
61 DAOS_OPC_CONT_DELETE_ACL,
62 DAOS_OPC_CONT_AGGREGATE,
63 DAOS_OPC_CONT_ROLLBACK,
64 DAOS_OPC_CONT_SUBSCRIBE,
65 DAOS_OPC_CONT_LIST_ATTR,
66 DAOS_OPC_CONT_GET_ATTR,
67 DAOS_OPC_CONT_SET_ATTR,
68 DAOS_OPC_CONT_DEL_ATTR,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
120
121 DAOS_OPC_POOL_FILTER_CONT,
122 DAOS_OPC_OBJ_KEY2ANCHOR,
123 DAOS_OPC_CONT_SNAP_OIT_CREATE,
124 DAOS_OPC_CONT_SNAP_OIT_DESTROY,
125 DAOS_OPC_MAX
126} daos_opc_t;
127
129typedef struct {
131 const char *grp;
133 d_rank_t rank;
135 uint32_t key_id;
137 uint64_t value;
139 uint64_t value_extra;
141
143typedef struct {
148 uuid_t uuid;
150 const char *grp;
152 unsigned int flags;
158 const char *pool;
160
166
168typedef struct {
170 uuid_t uuid;
172 const char *grp;
174 d_rank_list_t *svc;
178
188
200
212
222
234
236typedef struct {
240 char *buf;
242 size_t *size;
244
246typedef struct {
250 int n;
252 char const *const *names;
254 void *const *values;
256 size_t *sizes;
258
260typedef struct {
264 int n;
266 char const *const *names;
268 void const *const *values;
270 size_t const *sizes;
272
274typedef struct {
278 int n;
280 char const *const *names;
282
284typedef struct {
286 uuid_t uuid;
288 const char *group;
290 d_rank_list_t *targets;
292 d_rank_list_t *failed;
294
296typedef struct {
298 const char *grp;
300 uuid_t uuid;
302 int *state;
304
310
325
327typedef struct {
334 uuid_t uuid;
336 unsigned int flags;
342 const char *cont;
344
350
352typedef struct {
359 uuid_t uuid;
361 int force;
363 const char *cont;
365
375
383
391
393typedef struct {
397 uint8_t type;
399 d_string_t name;
401
403typedef struct {
407 daos_epoch_t epoch;
409
411typedef struct {
415 daos_epoch_t epoch;
417
419typedef struct {
426 daos_epoch_t *epoch;
428
430typedef struct {
434 char *buf;
436 size_t *size;
438
440typedef struct {
444 int n;
446 char const *const *names;
448 void *const *values;
450 size_t *sizes;
452
454typedef struct {
458 int n;
460 char const *const *names;
462 void const *const *values;
464 size_t const *sizes;
466
468typedef struct {
472 int n;
474 char const *const *names;
476
478typedef struct {
482 daos_size_t num_oids;
484 uint64_t *oid;
486
488typedef struct {
495 int *nr;
497 daos_epoch_t *epochs;
499 char **names;
503
505typedef struct {
509 unsigned int opts;
511 daos_epoch_t *epoch;
513 char *name;
515
523
533
535typedef struct {
539 daos_epoch_t epoch;
541 char *name;
543
545typedef struct {
549 daos_epoch_t epoch;
551
561
563typedef struct {
567 uint32_t flags;
569
571typedef struct {
575
585
587typedef struct {
591
593typedef struct {
597
599typedef struct {
603 daos_oclass_id_t cid;
607
617
629
631typedef struct {
635
644typedef struct {
650 daos_key_t *dkey;
652 daos_key_t *akeys;
654 uint64_t flags;
656 unsigned int akey_nr;
658
660typedef struct {
668 d_rank_list_t *ranks;
670
672typedef struct {
681 daos_key_t *dkey;
686 daos_key_t *akey;
690 uint64_t flags;
692 daos_epoch_t *max_epoch;
694
696typedef struct {
702 uint64_t flags;
704 daos_key_t *dkey;
706 uint32_t nr;
708 uint32_t extra_flags;
712 d_sg_list_t *sgls;
720 d_iov_t *csum_iov;
722
727
733 daos_epoch_t epoch;
735 daos_epoch_t **epochs_p;
737 int *nr;
738};
739
785
796
808
825
845
855
871
891
897
909
919
929
939
947
959
961typedef struct {
965
973
975typedef struct {
981 uint64_t flags;
983 const char *key;
985 daos_size_t *buf_size;
987 void *buf;
989
991typedef struct {
997 uint64_t flags;
999 const char *key;
1001 daos_size_t buf_size;
1003 const void *buf;
1005
1007typedef struct {
1013 uint64_t flags;
1015 const char *key;
1017
1036
1061int
1062daos_task_create(daos_opc_t opc, tse_sched_t *sched,
1063 unsigned int num_deps, tse_task_t *dep_tasks[],
1064 tse_task_t **taskp);
1065
1080int
1081daos_task_reset(tse_task_t *task, daos_opc_t opc);
1082
1093void *
1094daos_task_get_args(tse_task_t *task);
1095
1104void *
1105daos_task_get_priv(tse_task_t *task);
1106
1115void *
1116daos_task_set_priv(tse_task_t *task, void *priv);
1117
1131int
1132daos_progress(tse_sched_t *sched, int64_t timeout, bool *is_empty);
1133
1134#if defined(__cplusplus)
1135}
1136#endif
1137
1138#endif /* __DAOS_TASK_H__ */
daos_handle_t oh
Definition daos_task.h:895
daos_size_t chunk_size
Definition daos_task.h:867
daos_handle_t coh
Definition daos_task.h:859
daos_handle_t th
Definition daos_task.h:863
daos_obj_id_t oid
Definition daos_task.h:861
daos_size_t cell_size
Definition daos_task.h:865
daos_handle_t * oh
Definition daos_task.h:869
daos_handle_t th
Definition daos_task.h:945
daos_handle_t oh
Definition daos_task.h:943
daos_size_t * size
Definition daos_task.h:917
daos_handle_t th
Definition daos_task.h:915
daos_handle_t oh
Definition daos_task.h:913
d_sg_list_t * sgl
Definition daos_task.h:907
daos_handle_t th
Definition daos_task.h:903
daos_array_iod_t * iod
Definition daos_task.h:905
daos_handle_t oh
Definition daos_task.h:901
daos_size_t * chunk_size
Definition daos_task.h:887
daos_size_t * cell_size
Definition daos_task.h:885
daos_handle_t coh
Definition daos_task.h:875
daos_handle_t th
Definition daos_task.h:879
daos_obj_id_t oid
Definition daos_task.h:877
unsigned int open_with_attr
Definition daos_task.h:883
daos_handle_t * oh
Definition daos_task.h:889
unsigned int mode
Definition daos_task.h:881
daos_handle_t th
Definition daos_task.h:935
daos_handle_t oh
Definition daos_task.h:933
daos_array_stbuf_t * stbuf
Definition daos_task.h:927
daos_handle_t th
Definition daos_task.h:925
daos_handle_t oh
Definition daos_task.h:923
daos_epoch_t epoch
Definition daos_task.h:407
daos_handle_t coh
Definition daos_task.h:405
daos_handle_t coh
Definition daos_task.h:480
daos_handle_t coh
Definition daos_task.h:348
daos_epoch_t * epoch
Definition daos_task.h:511
daos_prop_t * prop
Definition daos_task.h:321
daos_handle_t poh
Definition daos_task.h:314
daos_handle_t coh
Definition daos_task.h:470
char const *const * names
Definition daos_task.h:474
daos_handle_t coh
Definition daos_task.h:395
daos_epoch_range_t epr
Definition daos_task.h:521
const char * cont
Definition daos_task.h:363
daos_handle_t poh
Definition daos_task.h:354
daos_handle_t coh
Definition daos_task.h:442
void *const * values
Definition daos_task.h:448
char const *const * names
Definition daos_task.h:446
daos_handle_t coh
Definition daos_task.h:432
daos_handle_t coh
Definition daos_task.h:490
daos_anchor_t * anchor
Definition daos_task.h:501
daos_epoch_t * epochs
Definition daos_task.h:497
const char * cont
Definition daos_task.h:342
daos_handle_t * coh
Definition daos_task.h:338
unsigned int flags
Definition daos_task.h:336
daos_handle_t poh
Definition daos_task.h:329
daos_cont_info_t * info
Definition daos_task.h:340
daos_handle_t coh
Definition daos_task.h:369
daos_prop_t * prop
Definition daos_task.h:373
daos_cont_info_t * info
Definition daos_task.h:371
daos_epoch_t epoch
Definition daos_task.h:415
daos_handle_t coh
Definition daos_task.h:413
daos_handle_t coh
Definition daos_task.h:456
void const *const * values
Definition daos_task.h:462
size_t const * sizes
Definition daos_task.h:464
char const *const * names
Definition daos_task.h:460
daos_handle_t coh
Definition daos_task.h:379
daos_prop_t * prop
Definition daos_task.h:381
daos_epoch_t * epoch
Definition daos_task.h:426
daos_handle_t coh
Definition daos_task.h:421
daos_handle_t coh
Definition daos_task.h:387
struct daos_acl * acl
Definition daos_task.h:389
daos_handle_t oh
Definition daos_task.h:963
daos_handle_t th
Definition daos_task.h:971
daos_handle_t oh
Definition daos_task.h:969
daos_size_t * buf_size
Definition daos_task.h:985
uint64_t flags
Definition daos_task.h:981
daos_handle_t th
Definition daos_task.h:979
const char * key
Definition daos_task.h:983
daos_handle_t oh
Definition daos_task.h:977
d_sg_list_t * sgl
Definition daos_task.h:1032
uint32_t * nr
Definition daos_task.h:1028
daos_handle_t th
Definition daos_task.h:1023
daos_anchor_t * anchor
Definition daos_task.h:1034
daos_key_desc_t * kds
Definition daos_task.h:1030
daos_handle_t oh
Definition daos_task.h:1021
daos_handle_t coh
Definition daos_task.h:951
daos_obj_id_t oid
Definition daos_task.h:953
daos_handle_t * oh
Definition daos_task.h:957
unsigned int mode
Definition daos_task.h:955
const void * buf
Definition daos_task.h:1003
uint64_t flags
Definition daos_task.h:997
daos_handle_t th
Definition daos_task.h:995
const char * key
Definition daos_task.h:999
daos_handle_t oh
Definition daos_task.h:993
daos_size_t buf_size
Definition daos_task.h:1001
daos_handle_t th
Definition daos_task.h:1011
const char * key
Definition daos_task.h:1015
daos_handle_t oh
Definition daos_task.h:1009
daos_handle_t oh
Definition daos_task.h:633
struct daos_oclass_list * clist
Definition daos_task.h:613
daos_handle_t coh
Definition daos_task.h:611
daos_anchor_t * anchor
Definition daos_task.h:615
d_sg_list_t * sgl
Definition daos_task.h:755
uint32_t * nr
Definition daos_task.h:751
d_iov_t * csum
Definition daos_task.h:781
daos_size_t * size
Definition daos_task.h:757
daos_recx_t * recxs
Definition daos_task.h:761
uint32_t * versions
Definition daos_task.h:777
daos_anchor_t * dkey_anchor
Definition daos_task.h:773
daos_handle_t th
Definition daos_task.h:745
daos_key_t * akey
Definition daos_task.h:749
daos_key_t * dkey
Definition daos_task.h:747
daos_epoch_range_t * eprs
Definition daos_task.h:763
daos_iod_type_t type
Definition daos_task.h:759
daos_anchor_t * anchor
Definition daos_task.h:771
daos_key_desc_t * kds
Definition daos_task.h:753
daos_anchor_t * akey_anchor
Definition daos_task.h:775
daos_handle_t oh
Definition daos_task.h:743
daos_handle_t coh
Definition daos_task.h:621
daos_obj_id_t oid
Definition daos_task.h:623
daos_handle_t * oh
Definition daos_task.h:627
unsigned int mode
Definition daos_task.h:625
unsigned int akey_nr
Definition daos_task.h:656
daos_handle_t th
Definition daos_task.h:646
daos_key_t * dkey
Definition daos_task.h:650
daos_key_t * akeys
Definition daos_task.h:652
daos_handle_t oh
Definition daos_task.h:648
daos_oclass_id_t cid
Definition daos_task.h:603
daos_handle_t coh
Definition daos_task.h:601
struct daos_oclass_attr * cattr
Definition daos_task.h:605
daos_epoch_t * max_epoch
Definition daos_task.h:692
daos_handle_t th
Definition daos_task.h:676
daos_recx_t * recx
Definition daos_task.h:688
daos_key_t * akey
Definition daos_task.h:686
daos_key_t * dkey
Definition daos_task.h:681
daos_handle_t oh
Definition daos_task.h:674
struct daos_obj_attr * oa
Definition daos_task.h:666
d_rank_list_t * ranks
Definition daos_task.h:668
daos_handle_t th
Definition daos_task.h:664
daos_handle_t oh
Definition daos_task.h:662
daos_oclass_id_t cid
Definition daos_task.h:184
struct daos_oclass_attr * cattr
Definition daos_task.h:186
daos_iod_t * iods
Definition daos_task.h:710
uint32_t nr
Definition daos_task.h:706
d_iov_t * csum_iov
Definition daos_task.h:720
void * extra_arg
Definition daos_task.h:716
uint64_t flags
Definition daos_task.h:702
daos_handle_t th
Definition daos_task.h:698
daos_iom_t * ioms
Definition daos_task.h:714
daos_key_t * dkey
Definition daos_task.h:704
uint32_t extra_flags
Definition daos_task.h:708
daos_handle_t oh
Definition daos_task.h:700
d_sg_list_t * sgls
Definition daos_task.h:712
daos_epoch_t epoch
Definition daos_task.h:733
daos_handle_t oh
Definition daos_task.h:731
daos_epoch_t ** epochs_p
Definition daos_task.h:735
const char * pool
Definition daos_task.h:158
const char * grp
Definition daos_task.h:150
daos_handle_t * poh
Definition daos_task.h:154
daos_pool_info_t * info
Definition daos_task.h:156
unsigned int flags
Definition daos_task.h:152
char const *const * names
Definition daos_task.h:280
daos_handle_t poh
Definition daos_task.h:276
daos_handle_t poh
Definition daos_task.h:164
struct daos_pool_cont_info2 * cont_buf
Definition daos_task.h:232
daos_pool_cont_filter_t * filt
Definition daos_task.h:228
daos_size_t * ncont
Definition daos_task.h:230
void *const * values
Definition daos_task.h:254
char const *const * names
Definition daos_task.h:252
daos_handle_t poh
Definition daos_task.h:248
daos_handle_t poh
Definition daos_task.h:238
struct daos_pool_cont_info * cont_buf
Definition daos_task.h:220
daos_size_t * ncont
Definition daos_task.h:218
daos_handle_t poh
Definition daos_task.h:216
daos_prop_t * prop
Definition daos_task.h:198
daos_pool_info_t * info
Definition daos_task.h:196
d_rank_list_t ** ranks
Definition daos_task.h:194
daos_handle_t poh
Definition daos_task.h:192
daos_target_info_t * info
Definition daos_task.h:210
d_rank_list_t * failed
Definition daos_task.h:292
const char * group
Definition daos_task.h:288
d_rank_list_t * targets
Definition daos_task.h:290
void const *const * values
Definition daos_task.h:268
size_t const * sizes
Definition daos_task.h:270
char const *const * names
Definition daos_task.h:266
daos_handle_t poh
Definition daos_task.h:262
daos_handle_t poh
Definition daos_task.h:308
struct d_tgt_list * tgts
Definition daos_task.h:176
const char * grp
Definition daos_task.h:172
d_rank_list_t * svc
Definition daos_task.h:174
const char * grp
Definition daos_task.h:131
uint64_t value_extra
Definition daos_task.h:139
daos_handle_t th
Definition daos_task.h:573
daos_handle_t th
Definition daos_task.h:589
daos_handle_t th
Definition daos_task.h:565
daos_epoch_t epoch
Definition daos_task.h:581
daos_handle_t coh
Definition daos_task.h:579
daos_handle_t * th
Definition daos_task.h:583
daos_handle_t coh
Definition daos_task.h:555
uint64_t flags
Definition daos_task.h:559
daos_handle_t * th
Definition daos_task.h:557
daos_handle_t th
Definition daos_task.h:595