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#include <daos_pipeline.h>
28
30typedef enum {
31 DAOS_OPC_INVALID = -1,
32
34 /* Starting at 0 will break Application Binary Interface backward
35 * compatibility */
36 DAOS_OPC_MGMT_LIST_POOLS = 2,
37 DAOS_OPC_SET_PARAMS,
38 DAOS_OPC_MGMT_GET_BS_STATE,
39
41 DAOS_OPC_POOL_CONNECT = 5,
42 DAOS_OPC_POOL_DISCONNECT,
43 DAOS_OPC_POOL_EXCLUDE,
44 DAOS_OPC_POOL_EXCLUDE_OUT,
45 DAOS_OPC_POOL_ADD,
46 DAOS_OPC_POOL_QUERY,
47 DAOS_OPC_POOL_QUERY_INFO,
48 DAOS_OPC_POOL_LIST_ATTR,
49 DAOS_OPC_POOL_GET_ATTR,
50 DAOS_OPC_POOL_SET_ATTR,
51 DAOS_OPC_POOL_DEL_ATTR,
52 DAOS_OPC_POOL_STOP_SVC,
53 DAOS_OPC_POOL_LIST_CONT,
54
56 DAOS_OPC_CONT_CREATE = 18,
57 DAOS_OPC_CONT_OPEN,
58 DAOS_OPC_CONT_CLOSE,
59 DAOS_OPC_CONT_DESTROY,
60 DAOS_OPC_CONT_QUERY,
61 DAOS_OPC_CONT_SET_PROP,
62 DAOS_OPC_CONT_UPDATE_ACL,
63 DAOS_OPC_CONT_DELETE_ACL,
64 DAOS_OPC_CONT_AGGREGATE,
65 DAOS_OPC_CONT_ROLLBACK,
66 DAOS_OPC_CONT_SUBSCRIBE,
67 DAOS_OPC_CONT_LIST_ATTR,
68 DAOS_OPC_CONT_GET_ATTR,
69 DAOS_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,
120 DAOS_OPC_KV_REMOVE,
121 DAOS_OPC_KV_LIST,
122
123 DAOS_OPC_POOL_FILTER_CONT,
124 DAOS_OPC_OBJ_KEY2ANCHOR,
125 DAOS_OPC_CONT_SNAP_OIT_CREATE,
126 DAOS_OPC_CONT_SNAP_OIT_DESTROY,
127
129 DAOS_OPC_PIPELINE_RUN,
130
131 DAOS_OPC_MAX
132} daos_opc_t;
133
135typedef struct {
137 const char *grp;
139 d_rank_t rank;
141 uint32_t key_id;
143 uint64_t value;
145 uint64_t value_extra;
147
149typedef struct {
154 uuid_t uuid;
156 const char *grp;
158 unsigned int flags;
164 const char *pool;
166
172
174typedef struct {
176 uuid_t uuid;
178 const char *grp;
180 d_rank_list_t *svc;
184
194
196typedef struct {
198 const char *grp;
200 daos_mgmt_pool_info_t *pools;
202 daos_size_t *npools;
204
216
228
238
250
252typedef struct {
256 char *buf;
258 size_t *size;
260
262typedef struct {
266 int n;
268 char const *const *names;
270 void *const *values;
272 size_t *sizes;
274
276typedef struct {
280 int n;
282 char const *const *names;
284 void const *const *values;
286 size_t const *sizes;
288
290typedef struct {
294 int n;
296 char const *const *names;
298
300typedef struct {
302 uuid_t uuid;
304 const char *group;
306 d_rank_list_t *targets;
308 d_rank_list_t *failed;
310
312typedef struct {
314 const char *grp;
316 uuid_t uuid;
318 int *state;
320
326
341
343typedef struct {
350 uuid_t uuid;
352 unsigned int flags;
358 const char *cont;
360
366
368typedef struct {
375 uuid_t uuid;
377 int force;
379 const char *cont;
381
391
399
407
409typedef struct {
413 uint8_t type;
415 d_string_t name;
417
419typedef struct {
423 daos_epoch_t epoch;
425
427typedef struct {
431 daos_epoch_t epoch;
433
435typedef struct {
442 daos_epoch_t *epoch;
444
446typedef struct {
450 char *buf;
452 size_t *size;
454
456typedef struct {
460 int n;
462 char const *const *names;
464 void *const *values;
466 size_t *sizes;
468
470typedef struct {
474 int n;
476 char const *const *names;
478 void const *const *values;
480 size_t const *sizes;
482
484typedef struct {
488 int n;
490 char const *const *names;
492
494typedef struct {
498 daos_size_t num_oids;
500 uint64_t *oid;
502
504typedef struct {
511 int *nr;
513 daos_epoch_t *epochs;
515 char **names;
519
521typedef struct {
525 unsigned int opts;
527 daos_epoch_t *epoch;
529 char *name;
531
539
549
551typedef struct {
555 daos_epoch_t epoch;
557 char *name;
559
561typedef struct {
565 daos_epoch_t epoch;
567
577
579typedef struct {
583 uint32_t flags;
585
587typedef struct {
591
601
603typedef struct {
607
609typedef struct {
613
615typedef struct {
619 daos_oclass_id_t cid;
623
633
645
647typedef struct {
651
660typedef struct {
666 daos_key_t *dkey;
668 daos_key_t *akeys;
670 uint64_t flags;
672 unsigned int akey_nr;
674
676typedef struct {
684 d_rank_list_t *ranks;
686
688typedef struct {
697 daos_key_t *dkey;
702 daos_key_t *akey;
706 uint64_t flags;
708 daos_epoch_t *max_epoch;
710
712typedef struct {
718 uint64_t flags;
720 daos_key_t *dkey;
722 uint32_t nr;
724 uint32_t extra_flags;
728 d_sg_list_t *sgls;
736 d_iov_t *csum_iov;
738
743
749 daos_epoch_t epoch;
751 daos_epoch_t **epochs_p;
753 int *nr;
754};
755
801
812
824
841
861
871
887
907
913
925
935
945
955
963
975
977typedef struct {
981
989
991typedef struct {
997 uint64_t flags;
999 const char *key;
1001 daos_size_t *buf_size;
1003 void *buf;
1005
1007typedef struct {
1013 uint64_t flags;
1015 const char *key;
1017 daos_size_t buf_size;
1019 const void *buf;
1021
1023typedef struct {
1029 uint64_t flags;
1031 const char *key;
1033
1052
1086
1108int
1109daos_task_create(daos_opc_t opc, tse_sched_t *sched,
1110 unsigned int num_deps, tse_task_t *dep_tasks[],
1111 tse_task_t **taskp);
1112
1126int
1127daos_task_reset(tse_task_t *task, daos_opc_t opc);
1128
1139void *
1140daos_task_get_args(tse_task_t *task);
1141
1150void *
1151daos_task_get_priv(tse_task_t *task);
1152
1161void *
1162daos_task_set_priv(tse_task_t *task, void *priv);
1163
1176int
1177daos_progress(tse_sched_t *sched, int64_t timeout, bool *is_empty);
1178
1179#if defined(__cplusplus)
1180}
1181#endif
1182
1183#endif /* __DAOS_TASK_H__ */
daos_handle_t oh
Definition daos_task.h:911
daos_size_t chunk_size
Definition daos_task.h:883
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
daos_size_t cell_size
Definition daos_task.h:881
daos_handle_t * oh
Definition daos_task.h:885
daos_handle_t th
Definition daos_task.h:961
daos_handle_t oh
Definition daos_task.h:959
daos_size_t * size
Definition daos_task.h:933
daos_handle_t th
Definition daos_task.h:931
daos_handle_t oh
Definition daos_task.h:929
d_sg_list_t * sgl
Definition daos_task.h:923
daos_handle_t th
Definition daos_task.h:919
daos_array_iod_t * iod
Definition daos_task.h:921
daos_handle_t oh
Definition daos_task.h:917
daos_size_t * chunk_size
Definition daos_task.h:903
daos_size_t * cell_size
Definition daos_task.h:901
daos_handle_t coh
Definition daos_task.h:891
daos_handle_t th
Definition daos_task.h:895
daos_obj_id_t oid
Definition daos_task.h:893
unsigned int open_with_attr
Definition daos_task.h:899
daos_handle_t * oh
Definition daos_task.h:905
unsigned int mode
Definition daos_task.h:897
daos_handle_t th
Definition daos_task.h:951
daos_handle_t oh
Definition daos_task.h:949
daos_array_stbuf_t * stbuf
Definition daos_task.h:943
daos_handle_t th
Definition daos_task.h:941
daos_handle_t oh
Definition daos_task.h:939
daos_epoch_t epoch
Definition daos_task.h:423
daos_handle_t coh
Definition daos_task.h:421
daos_handle_t coh
Definition daos_task.h:496
daos_handle_t coh
Definition daos_task.h:364
daos_epoch_t * epoch
Definition daos_task.h:527
daos_prop_t * prop
Definition daos_task.h:337
daos_handle_t poh
Definition daos_task.h:330
daos_handle_t coh
Definition daos_task.h:486
char const *const * names
Definition daos_task.h:490
daos_handle_t coh
Definition daos_task.h:411
daos_epoch_range_t epr
Definition daos_task.h:537
const char * cont
Definition daos_task.h:379
daos_handle_t poh
Definition daos_task.h:370
daos_handle_t coh
Definition daos_task.h:458
void *const * values
Definition daos_task.h:464
char const *const * names
Definition daos_task.h:462
daos_handle_t coh
Definition daos_task.h:448
daos_handle_t coh
Definition daos_task.h:506
daos_anchor_t * anchor
Definition daos_task.h:517
daos_epoch_t * epochs
Definition daos_task.h:513
const char * cont
Definition daos_task.h:358
daos_handle_t * coh
Definition daos_task.h:354
unsigned int flags
Definition daos_task.h:352
daos_handle_t poh
Definition daos_task.h:345
daos_cont_info_t * info
Definition daos_task.h:356
daos_handle_t coh
Definition daos_task.h:385
daos_prop_t * prop
Definition daos_task.h:389
daos_cont_info_t * info
Definition daos_task.h:387
daos_epoch_t epoch
Definition daos_task.h:431
daos_handle_t coh
Definition daos_task.h:429
daos_handle_t coh
Definition daos_task.h:472
void const *const * values
Definition daos_task.h:478
size_t const * sizes
Definition daos_task.h:480
char const *const * names
Definition daos_task.h:476
daos_handle_t coh
Definition daos_task.h:395
daos_prop_t * prop
Definition daos_task.h:397
daos_epoch_t * epoch
Definition daos_task.h:442
daos_handle_t coh
Definition daos_task.h:437
daos_handle_t coh
Definition daos_task.h:403
struct daos_acl * acl
Definition daos_task.h:405
daos_handle_t oh
Definition daos_task.h:979
daos_handle_t th
Definition daos_task.h:987
daos_handle_t oh
Definition daos_task.h:985
daos_size_t * buf_size
Definition daos_task.h:1001
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
d_sg_list_t * sgl
Definition daos_task.h:1048
uint32_t * nr
Definition daos_task.h:1044
daos_handle_t th
Definition daos_task.h:1039
daos_anchor_t * anchor
Definition daos_task.h:1050
daos_key_desc_t * kds
Definition daos_task.h:1046
daos_handle_t oh
Definition daos_task.h:1037
daos_handle_t coh
Definition daos_task.h:967
daos_obj_id_t oid
Definition daos_task.h:969
daos_handle_t * oh
Definition daos_task.h:973
unsigned int mode
Definition daos_task.h:971
const void * buf
Definition daos_task.h:1019
uint64_t flags
Definition daos_task.h:1013
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_size_t buf_size
Definition daos_task.h:1017
daos_handle_t th
Definition daos_task.h:1027
const char * key
Definition daos_task.h:1031
daos_handle_t oh
Definition daos_task.h:1025
daos_mgmt_pool_info_t * pools
Definition daos_task.h:200
daos_size_t * npools
Definition daos_task.h:202
daos_handle_t oh
Definition daos_task.h:649
struct daos_oclass_list * clist
Definition daos_task.h:629
daos_handle_t coh
Definition daos_task.h:627
daos_anchor_t * anchor
Definition daos_task.h:631
d_sg_list_t * sgl
Definition daos_task.h:771
uint32_t * nr
Definition daos_task.h:767
d_iov_t * csum
Definition daos_task.h:797
daos_size_t * size
Definition daos_task.h:773
daos_recx_t * recxs
Definition daos_task.h:777
uint32_t * versions
Definition daos_task.h:793
daos_anchor_t * dkey_anchor
Definition daos_task.h:789
daos_handle_t th
Definition daos_task.h:761
daos_key_t * akey
Definition daos_task.h:765
daos_key_t * dkey
Definition daos_task.h:763
daos_epoch_range_t * eprs
Definition daos_task.h:779
daos_iod_type_t type
Definition daos_task.h:775
daos_anchor_t * anchor
Definition daos_task.h:787
daos_key_desc_t * kds
Definition daos_task.h:769
daos_anchor_t * akey_anchor
Definition daos_task.h:791
daos_handle_t oh
Definition daos_task.h:759
daos_handle_t coh
Definition daos_task.h:637
daos_obj_id_t oid
Definition daos_task.h:639
daos_handle_t * oh
Definition daos_task.h:643
unsigned int mode
Definition daos_task.h:641
unsigned int akey_nr
Definition daos_task.h:672
daos_handle_t th
Definition daos_task.h:662
daos_key_t * dkey
Definition daos_task.h:666
daos_key_t * akeys
Definition daos_task.h:668
daos_handle_t oh
Definition daos_task.h:664
daos_oclass_id_t cid
Definition daos_task.h:619
daos_handle_t coh
Definition daos_task.h:617
struct daos_oclass_attr * cattr
Definition daos_task.h:621
daos_epoch_t * max_epoch
Definition daos_task.h:708
daos_handle_t th
Definition daos_task.h:692
daos_recx_t * recx
Definition daos_task.h:704
daos_key_t * akey
Definition daos_task.h:702
daos_key_t * dkey
Definition daos_task.h:697
daos_handle_t oh
Definition daos_task.h:690
struct daos_obj_attr * oa
Definition daos_task.h:682
d_rank_list_t * ranks
Definition daos_task.h:684
daos_handle_t th
Definition daos_task.h:680
daos_handle_t oh
Definition daos_task.h:678
daos_oclass_id_t cid
Definition daos_task.h:190
struct daos_oclass_attr * cattr
Definition daos_task.h:192
daos_iod_t * iods
Definition daos_task.h:726
uint32_t nr
Definition daos_task.h:722
d_iov_t * csum_iov
Definition daos_task.h:736
void * extra_arg
Definition daos_task.h:732
uint64_t flags
Definition daos_task.h:718
daos_handle_t th
Definition daos_task.h:714
daos_iom_t * ioms
Definition daos_task.h:730
daos_key_t * dkey
Definition daos_task.h:720
uint32_t extra_flags
Definition daos_task.h:724
daos_handle_t oh
Definition daos_task.h:716
d_sg_list_t * sgls
Definition daos_task.h:728
daos_epoch_t epoch
Definition daos_task.h:749
daos_handle_t oh
Definition daos_task.h:747
daos_epoch_t ** epochs_p
Definition daos_task.h:751
daos_iod_t * iods
Definition daos_task.h:1068
d_sg_list_t * sgl_keys
Definition daos_task.h:1076
daos_size_t * recx_size
Definition daos_task.h:1080
daos_pipeline_t * pipeline
Definition daos_task.h:1060
d_sg_list_t * sgl_recx
Definition daos_task.h:1078
daos_pipeline_stats_t * stats
Definition daos_task.h:1084
daos_handle_t th
Definition daos_task.h:1058
d_sg_list_t * sgl_agg
Definition daos_task.h:1082
daos_key_t * dkey
Definition daos_task.h:1064
daos_anchor_t * anchor
Definition daos_task.h:1070
daos_key_desc_t * kds
Definition daos_task.h:1074
daos_handle_t oh
Definition daos_task.h:1056
const char * pool
Definition daos_task.h:164
const char * grp
Definition daos_task.h:156
daos_handle_t * poh
Definition daos_task.h:160
daos_pool_info_t * info
Definition daos_task.h:162
unsigned int flags
Definition daos_task.h:158
char const *const * names
Definition daos_task.h:296
daos_handle_t poh
Definition daos_task.h:292
daos_handle_t poh
Definition daos_task.h:170
struct daos_pool_cont_info2 * cont_buf
Definition daos_task.h:248
daos_pool_cont_filter_t * filt
Definition daos_task.h:244
daos_size_t * ncont
Definition daos_task.h:246
void *const * values
Definition daos_task.h:270
char const *const * names
Definition daos_task.h:268
daos_handle_t poh
Definition daos_task.h:264
daos_handle_t poh
Definition daos_task.h:254
struct daos_pool_cont_info * cont_buf
Definition daos_task.h:236
daos_size_t * ncont
Definition daos_task.h:234
daos_handle_t poh
Definition daos_task.h:232
daos_prop_t * prop
Definition daos_task.h:214
daos_pool_info_t * info
Definition daos_task.h:212
d_rank_list_t ** ranks
Definition daos_task.h:210
daos_handle_t poh
Definition daos_task.h:208
daos_target_info_t * info
Definition daos_task.h:226
d_rank_list_t * failed
Definition daos_task.h:308
const char * group
Definition daos_task.h:304
d_rank_list_t * targets
Definition daos_task.h:306
void const *const * values
Definition daos_task.h:284
size_t const * sizes
Definition daos_task.h:286
char const *const * names
Definition daos_task.h:282
daos_handle_t poh
Definition daos_task.h:278
daos_handle_t poh
Definition daos_task.h:324
struct d_tgt_list * tgts
Definition daos_task.h:182
const char * grp
Definition daos_task.h:178
d_rank_list_t * svc
Definition daos_task.h:180
const char * grp
Definition daos_task.h:137
uint64_t value_extra
Definition daos_task.h:145
daos_handle_t th
Definition daos_task.h:589
daos_handle_t th
Definition daos_task.h:605
daos_handle_t th
Definition daos_task.h:581
daos_epoch_t epoch
Definition daos_task.h:597
daos_handle_t coh
Definition daos_task.h:595
daos_handle_t * th
Definition daos_task.h:599
daos_handle_t coh
Definition daos_task.h:571
uint64_t flags
Definition daos_task.h:575
daos_handle_t * th
Definition daos_task.h:573
daos_handle_t th
Definition daos_task.h:611
Definition tse.h:30