DAOS API: src/include/daos_cont.h Source File

| DAOS API (v2.1 - dev)

Loading...
Searching...
No Matches
daos_cont.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2020-2023 Intel Corporation.
3 *
4 * SPDX-License-Identifier: BSD-2-Clause-Patent
5 */
11
12#ifndef __DAOS_CONT_H__
13#define __DAOS_CONT_H__
14
16#define daos_cont_open daos_cont_open2
18#define daos_cont_destroy daos_cont_destroy2
20#define daos_cont_create daos_cont_create2
21
22#if defined(__cplusplus)
23extern "C" {
24#endif
25
26#include <daos_security.h>
27
32#define DAOS_COO_RO (1U << 0)
33
38#define DAOS_COO_RW (1U << 1)
39
45#define DAOS_COO_EX (1U << 2)
46
50#define DAOS_COO_FORCE (1U << 3)
51
53#define DAOS_COO_RO_MDSTATS (1U << 4)
54
63#define DAOS_COO_EVICT (1U << 5)
64
74#define DAOS_COO_EVICT_ALL (1U << 6)
75
77#define DAOS_COO_NBITS (7)
78
80#define DAOS_COO_MASK ((1U << DAOS_COO_NBITS) - 1)
81
83#define DAOS_CONT_HINT_MAX_LEN 128
84
97d_rank_list_t *daos_rank_list_parse(const char *str, const char *sep);
98
119int
120daos_cont_local2global(daos_handle_t coh, d_iov_t *glob);
121
136int
137daos_cont_global2local(daos_handle_t poh, d_iov_t glob, daos_handle_t *coh);
138
139/*
140 * Container API
141 */
142
166int
167 daos_cont_create(daos_handle_t poh, uuid_t *uuid, daos_prop_t *cont_prop, daos_event_t *ev);
168
193int
194daos_cont_create_with_label(daos_handle_t poh, const char *label,
195 daos_prop_t *cont_prop, uuid_t *uuid,
196 daos_event_t *ev);
197
222int
223 daos_cont_open(daos_handle_t poh, const char *cont, unsigned int flags, daos_handle_t *coh,
224 daos_cont_info_t *info, daos_event_t *ev);
225
241int
242daos_cont_close(daos_handle_t coh, daos_event_t *ev);
243
268int
269 daos_cont_destroy(daos_handle_t poh, const char *cont, int force, daos_event_t *ev);
270
300int
301daos_cont_query(daos_handle_t coh, daos_cont_info_t *info,
302 daos_prop_t *cont_prop, daos_event_t *ev);
303
323int
324daos_cont_get_acl(daos_handle_t coh, daos_prop_t **acl_prop, daos_event_t *ev);
325
342int
343daos_cont_set_prop(daos_handle_t coh, daos_prop_t *prop, daos_event_t *ev);
344
360int
361daos_cont_status_clear(daos_handle_t coh, daos_event_t *ev);
362
379int
380daos_cont_overwrite_acl(daos_handle_t coh, struct daos_acl *acl,
381 daos_event_t *ev);
382
403int
404daos_cont_update_acl(daos_handle_t coh, struct daos_acl *acl, daos_event_t *ev);
405
426int
427daos_cont_delete_acl(daos_handle_t coh, enum daos_acl_principal_type type,
428 d_string_t name, daos_event_t *ev);
429
448int
449daos_cont_set_owner(daos_handle_t coh, d_string_t user, d_string_t group,
450 daos_event_t *ev);
451
468int
469daos_cont_list_attr(daos_handle_t coh, char *buffer, size_t *size,
470 daos_event_t *ev);
471
490int
491daos_cont_get_attr(daos_handle_t coh, int n, char const *const names[],
492 void *const buffers[], size_t sizes[], daos_event_t *ev);
493
506int
507daos_cont_set_attr(daos_handle_t coh, int n, char const *const names[],
508 void const *const values[], size_t const sizes[],
509 daos_event_t *ev);
510
529int
530daos_cont_del_attr(daos_handle_t coh, int n, char const *const names[],
531 daos_event_t *ev);
532
555int
556daos_cont_alloc_oids(daos_handle_t coh, daos_size_t num_oids, uint64_t *oid,
557 daos_event_t *ev);
558
568int
569daos_cont_aggregate(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev);
570
579int
580daos_cont_rollback(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev);
581
598int
599daos_cont_subscribe(daos_handle_t coh, daos_epoch_t *epoch, daos_event_t *ev);
600
602#define DAOS_SNAPSHOT_MAX_LEN 128
603
617int
618daos_cont_create_snap(daos_handle_t coh, daos_epoch_t *epoch, char *name,
619 daos_event_t *ev);
620
622 enum daos_snapshot_opts {
624 DAOS_SNAP_OPT_CR = (1 << 0),
626 DAOS_SNAP_OPT_OIT = (1 << 1),
627};
628
644int
645daos_cont_create_snap_opt(daos_handle_t coh, daos_epoch_t *epoch, char *name,
646 enum daos_snapshot_opts opts, daos_event_t *ev);
647
667int
668daos_cont_list_snap(daos_handle_t coh, int *nr, daos_epoch_t *epochs,
669 char **names, daos_anchor_t *anchor, daos_event_t *ev);
670
684int
685daos_cont_destroy_snap(daos_handle_t coh, daos_epoch_range_t epr,
686 daos_event_t *ev);
687
704int
705daos_cont_get_perms(daos_prop_t *cont_prop, uid_t uid, gid_t *gids, size_t nr_gids,
706 uint64_t *perms);
707
717int
718daos_cont_snap_oit_create(daos_handle_t coh, daos_epoch_t epoch, char *name,
719 daos_event_t *ev);
720
729int
730daos_cont_snap_oit_destroy(daos_handle_t coh, daos_handle_t oh, daos_event_t *ev);
731
732#if defined(__cplusplus)
733}
734#endif /* __cplusplus */
735#endif /* __DAOS_CONT_H__ */
daos_cont_create_snap
int daos_cont_create_snap(daos_handle_t coh, daos_epoch_t *epoch, char *name, daos_event_t *ev)
daos_cont_set_attr
int daos_cont_set_attr(daos_handle_t coh, int n, char const *const names[], void const *const values[], size_t const sizes[], daos_event_t *ev)
daos_cont_get_perms
int daos_cont_get_perms(daos_prop_t *cont_prop, uid_t uid, gid_t *gids, size_t nr_gids, uint64_t *perms)
daos_cont_delete_acl
int daos_cont_delete_acl(daos_handle_t coh, enum daos_acl_principal_type type, d_string_t name, daos_event_t *ev)
daos_cont_del_attr
int daos_cont_del_attr(daos_handle_t coh, int n, char const *const names[], daos_event_t *ev)
daos_cont_list_attr
int daos_cont_list_attr(daos_handle_t coh, char *buffer, size_t *size, daos_event_t *ev)
daos_cont_update_acl
int daos_cont_update_acl(daos_handle_t coh, struct daos_acl *acl, daos_event_t *ev)
daos_cont_local2global
int daos_cont_local2global(daos_handle_t coh, d_iov_t *glob)
daos_cont_set_owner
int daos_cont_set_owner(daos_handle_t coh, d_string_t user, d_string_t group, daos_event_t *ev)
daos_cont_overwrite_acl
int daos_cont_overwrite_acl(daos_handle_t coh, struct daos_acl *acl, daos_event_t *ev)
daos_cont_destroy
#define daos_cont_destroy
Definition daos_cont.h:18
daos_cont_close
int daos_cont_close(daos_handle_t coh, daos_event_t *ev)
daos_cont_get_acl
int daos_cont_get_acl(daos_handle_t coh, daos_prop_t **acl_prop, daos_event_t *ev)
daos_cont_query
int daos_cont_query(daos_handle_t coh, daos_cont_info_t *info, daos_prop_t *cont_prop, daos_event_t *ev)
daos_cont_snap_oit_create
int daos_cont_snap_oit_create(daos_handle_t coh, daos_epoch_t epoch, char *name, daos_event_t *ev)
daos_cont_destroy_snap
int daos_cont_destroy_snap(daos_handle_t coh, daos_epoch_range_t epr, daos_event_t *ev)
daos_cont_list_snap
int daos_cont_list_snap(daos_handle_t coh, int *nr, daos_epoch_t *epochs, char **names, daos_anchor_t *anchor, daos_event_t *ev)
daos_cont_create_snap_opt
int daos_cont_create_snap_opt(daos_handle_t coh, daos_epoch_t *epoch, char *name, enum daos_snapshot_opts opts, daos_event_t *ev)
daos_rank_list_parse
d_rank_list_t * daos_rank_list_parse(const char *str, const char *sep)
daos_cont_aggregate
int daos_cont_aggregate(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev)
daos_cont_alloc_oids
int daos_cont_alloc_oids(daos_handle_t coh, daos_size_t num_oids, uint64_t *oid, daos_event_t *ev)
daos_cont_global2local
int daos_cont_global2local(daos_handle_t poh, d_iov_t glob, daos_handle_t *coh)
daos_snapshot_opts
daos_snapshot_opts
Definition daos_cont.h:622
DAOS_SNAP_OPT_CR
@ DAOS_SNAP_OPT_CR
Definition daos_cont.h:624
DAOS_SNAP_OPT_OIT
@ DAOS_SNAP_OPT_OIT
Definition daos_cont.h:626
daos_cont_create_with_label
int daos_cont_create_with_label(daos_handle_t poh, const char *label, daos_prop_t *cont_prop, uuid_t *uuid, daos_event_t *ev)
daos_cont_snap_oit_destroy
int daos_cont_snap_oit_destroy(daos_handle_t coh, daos_handle_t oh, daos_event_t *ev)
daos_cont_get_attr
int daos_cont_get_attr(daos_handle_t coh, int n, char const *const names[], void *const buffers[], size_t sizes[], daos_event_t *ev)
daos_cont_rollback
int daos_cont_rollback(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev)
daos_cont_open
#define daos_cont_open
Definition daos_cont.h:16
daos_cont_status_clear
int daos_cont_status_clear(daos_handle_t coh, daos_event_t *ev)
daos_cont_create
#define daos_cont_create
Definition daos_cont.h:20
daos_cont_set_prop
int daos_cont_set_prop(daos_handle_t coh, daos_prop_t *prop, daos_event_t *ev)
daos_cont_subscribe
int daos_cont_subscribe(daos_handle_t coh, daos_epoch_t *epoch, daos_event_t *ev)
daos_security.h
daos_acl_principal_type
daos_acl_principal_type
Definition daos_security.h:79
daos_acl
Definition daos_security.h:63
daos_anchor_t
Definition daos_types.h:58
daos_cont_info_t
Definition daos_types.h:128
daos_epoch_range_t
Definition daos_types.h:117
daos_handle_t
Definition daos_types.h:73
daos_prop_t
Definition daos_prop.h:635