DAOS API (v2.1 - dev)
Loading...
Searching...
No Matches
daos_cont.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2020-2024 Intel Corporation.
3 *
4 * SPDX-License-Identifier: BSD-2-Clause-Patent
5 */
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
121
136int
138
139/*
140 * Container API
141 */
142
166int
167daos_cont_create(daos_handle_t poh, uuid_t *uuid, daos_prop_t *cont_prop, daos_event_t *ev);
168
193int
195 daos_prop_t *cont_prop, uuid_t *uuid,
196 daos_event_t *ev);
197
222int
223daos_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
243
268int
269daos_cont_destroy(daos_handle_t poh, const char *cont, int force, daos_event_t *ev);
270
300int
302 daos_prop_t *cont_prop, daos_event_t *ev);
303
323int
325
342int
344
360int
362
379int
381 daos_event_t *ev);
382
403int
405
426int
428 d_string_t name, daos_event_t *ev);
429
449int
450daos_cont_set_owner(daos_handle_t coh, d_string_t user, d_string_t group,
451 daos_event_t *ev);
452
472int
473daos_cont_set_owner_no_check(daos_handle_t coh, d_string_t user, d_string_t group,
474 daos_event_t *ev);
475
492int
493daos_cont_list_attr(daos_handle_t coh, char *buffer, size_t *size,
494 daos_event_t *ev);
495
514int
515daos_cont_get_attr(daos_handle_t coh, int n, char const *const names[],
516 void *const buffers[], size_t sizes[], daos_event_t *ev);
517
530int
531daos_cont_set_attr(daos_handle_t coh, int n, char const *const names[],
532 void const *const values[], size_t const sizes[],
533 daos_event_t *ev);
534
553int
554daos_cont_del_attr(daos_handle_t coh, int n, char const *const names[],
555 daos_event_t *ev);
556
579int
580daos_cont_alloc_oids(daos_handle_t coh, daos_size_t num_oids, uint64_t *oid,
581 daos_event_t *ev);
582
592int
593daos_cont_aggregate(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev);
594
603int
604daos_cont_rollback(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev);
605
622int
623daos_cont_subscribe(daos_handle_t coh, daos_epoch_t *epoch, daos_event_t *ev);
624
626#define DAOS_SNAPSHOT_MAX_LEN 128
627
641int
642daos_cont_create_snap(daos_handle_t coh, daos_epoch_t *epoch, char *name,
643 daos_event_t *ev);
644
652
668int
669daos_cont_create_snap_opt(daos_handle_t coh, daos_epoch_t *epoch, char *name,
670 enum daos_snapshot_opts opts, daos_event_t *ev);
671
691int
692daos_cont_list_snap(daos_handle_t coh, int *nr, daos_epoch_t *epochs,
693 char **names, daos_anchor_t *anchor, daos_event_t *ev);
694
708int
710 daos_event_t *ev);
711
728int
729daos_cont_get_perms(daos_prop_t *cont_prop, uid_t uid, gid_t *gids, size_t nr_gids,
730 uint64_t *perms);
731
741int
742daos_cont_snap_oit_create(daos_handle_t coh, daos_epoch_t epoch, char *name,
743 daos_event_t *ev);
744
753int
755
756#if defined(__cplusplus)
757}
758#endif /* __cplusplus */
759#endif /* __DAOS_CONT_H__ */
int daos_cont_create_snap(daos_handle_t coh, daos_epoch_t *epoch, char *name, daos_event_t *ev)
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)
int daos_cont_get_perms(daos_prop_t *cont_prop, uid_t uid, gid_t *gids, size_t nr_gids, uint64_t *perms)
int daos_cont_delete_acl(daos_handle_t coh, enum daos_acl_principal_type type, d_string_t name, daos_event_t *ev)
int daos_cont_del_attr(daos_handle_t coh, int n, char const *const names[], daos_event_t *ev)
int daos_cont_list_attr(daos_handle_t coh, char *buffer, size_t *size, daos_event_t *ev)
int daos_cont_update_acl(daos_handle_t coh, struct daos_acl *acl, daos_event_t *ev)
int daos_cont_local2global(daos_handle_t coh, d_iov_t *glob)
int daos_cont_set_owner(daos_handle_t coh, d_string_t user, d_string_t group, daos_event_t *ev)
int daos_cont_overwrite_acl(daos_handle_t coh, struct daos_acl *acl, daos_event_t *ev)
#define daos_cont_destroy
Definition daos_cont.h:18
int daos_cont_close(daos_handle_t coh, daos_event_t *ev)
int daos_cont_get_acl(daos_handle_t coh, daos_prop_t **acl_prop, daos_event_t *ev)
int daos_cont_query(daos_handle_t coh, daos_cont_info_t *info, daos_prop_t *cont_prop, daos_event_t *ev)
int daos_cont_snap_oit_create(daos_handle_t coh, daos_epoch_t epoch, char *name, daos_event_t *ev)
int daos_cont_destroy_snap(daos_handle_t coh, daos_epoch_range_t epr, daos_event_t *ev)
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)
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)
d_rank_list_t * daos_rank_list_parse(const char *str, const char *sep)
int daos_cont_aggregate(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev)
int daos_cont_alloc_oids(daos_handle_t coh, daos_size_t num_oids, uint64_t *oid, daos_event_t *ev)
int daos_cont_global2local(daos_handle_t poh, d_iov_t glob, daos_handle_t *coh)
daos_snapshot_opts
Definition daos_cont.h:646
@ DAOS_SNAP_OPT_CR
Definition daos_cont.h:648
@ DAOS_SNAP_OPT_OIT
Definition daos_cont.h:650
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)
int daos_cont_snap_oit_destroy(daos_handle_t coh, daos_handle_t oh, daos_event_t *ev)
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)
int daos_cont_set_owner_no_check(daos_handle_t coh, d_string_t user, d_string_t group, daos_event_t *ev)
int daos_cont_rollback(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev)
#define daos_cont_open
Definition daos_cont.h:16
int daos_cont_status_clear(daos_handle_t coh, daos_event_t *ev)
#define daos_cont_create
Definition daos_cont.h:20
int daos_cont_set_prop(daos_handle_t coh, daos_prop_t *prop, daos_event_t *ev)
int daos_cont_subscribe(daos_handle_t coh, daos_epoch_t *epoch, daos_event_t *ev)
daos_acl_principal_type