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-2024 Intel Corporation.
3 * (C) Copyright 2025 Hewlett Packard Enterprise Development LP
4 *
5 * SPDX-License-Identifier: BSD-2-Clause-Patent
6 */
12
13#ifndef __DAOS_CONT_H__
14#define __DAOS_CONT_H__
15
17#define daos_cont_open daos_cont_open2
19#define daos_cont_destroy daos_cont_destroy2
21#define daos_cont_create daos_cont_create2
22
23#if defined(__cplusplus)
24extern "C" {
25#endif
26
27#include <daos_security.h>
28
33#define DAOS_COO_RO (1U << 0)
34
39#define DAOS_COO_RW (1U << 1)
40
46#define DAOS_COO_EX (1U << 2)
47
51#define DAOS_COO_FORCE (1U << 3)
52
54#define DAOS_COO_RO_MDSTATS (1U << 4)
55
64#define DAOS_COO_EVICT (1U << 5)
65
75#define DAOS_COO_EVICT_ALL (1U << 6)
76
82#define DAOS_COO_NEW_LAYOUT (1U << 7)
83
85#define DAOS_COO_NBITS (8)
86
88#define DAOS_COO_MASK ((1U << DAOS_COO_NBITS) - 1)
89
91#define DAOS_COO_IO_BASE_MASK (DAOS_COO_RO | DAOS_COO_RW | DAOS_COO_EX)
92
94#define DAOS_CONT_HINT_MAX_LEN 128
95
108d_rank_list_t *daos_rank_list_parse(const char *str, const char *sep);
109
130int
131daos_cont_local2global(daos_handle_t coh, d_iov_t *glob);
132
147int
148daos_cont_global2local(daos_handle_t poh, d_iov_t glob, daos_handle_t *coh);
149
150/*
151 * Container API
152 */
153
177int
178 daos_cont_create(daos_handle_t poh, uuid_t *uuid, daos_prop_t *cont_prop, daos_event_t *ev);
179
204int
205daos_cont_create_with_label(daos_handle_t poh, const char *label,
206 daos_prop_t *cont_prop, uuid_t *uuid,
207 daos_event_t *ev);
208
233int
234 daos_cont_open(daos_handle_t poh, const char *cont, unsigned int flags, daos_handle_t *coh,
235 daos_cont_info_t *info, daos_event_t *ev);
236
252int
253daos_cont_close(daos_handle_t coh, daos_event_t *ev);
254
279int
280 daos_cont_destroy(daos_handle_t poh, const char *cont, int force, daos_event_t *ev);
281
311int
312daos_cont_query(daos_handle_t coh, daos_cont_info_t *info,
313 daos_prop_t *cont_prop, daos_event_t *ev);
314
334int
335daos_cont_get_acl(daos_handle_t coh, daos_prop_t **acl_prop, daos_event_t *ev);
336
353int
354daos_cont_set_prop(daos_handle_t coh, daos_prop_t *prop, daos_event_t *ev);
355
371int
372daos_cont_status_clear(daos_handle_t coh, daos_event_t *ev);
373
390int
391daos_cont_overwrite_acl(daos_handle_t coh, struct daos_acl *acl,
392 daos_event_t *ev);
393
414int
415daos_cont_update_acl(daos_handle_t coh, struct daos_acl *acl, daos_event_t *ev);
416
437int
438daos_cont_delete_acl(daos_handle_t coh, enum daos_acl_principal_type type,
439 d_string_t name, daos_event_t *ev);
440
460int
461daos_cont_set_owner(daos_handle_t coh, d_string_t user, d_string_t group,
462 daos_event_t *ev);
463
483int
484daos_cont_set_owner_no_check(daos_handle_t coh, d_string_t user, d_string_t group,
485 daos_event_t *ev);
486
503int
504daos_cont_list_attr(daos_handle_t coh, char *buffer, size_t *size,
505 daos_event_t *ev);
506
525int
526daos_cont_get_attr(daos_handle_t coh, int n, char const *const names[],
527 void *const buffers[], size_t sizes[], daos_event_t *ev);
528
541int
542daos_cont_set_attr(daos_handle_t coh, int n, char const *const names[],
543 void const *const values[], size_t const sizes[],
544 daos_event_t *ev);
545
564int
565daos_cont_del_attr(daos_handle_t coh, int n, char const *const names[],
566 daos_event_t *ev);
567
590int
591daos_cont_alloc_oids(daos_handle_t coh, daos_size_t num_oids, uint64_t *oid,
592 daos_event_t *ev);
593
603int
604daos_cont_aggregate(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev);
605
614int
615daos_cont_rollback(daos_handle_t coh, daos_epoch_t epoch, daos_event_t *ev);
616
633int
634daos_cont_subscribe(daos_handle_t coh, daos_epoch_t *epoch, daos_event_t *ev);
635
637#define DAOS_SNAPSHOT_MAX_LEN 128
638
652int
653daos_cont_create_snap(daos_handle_t coh, daos_epoch_t *epoch, char *name,
654 daos_event_t *ev);
655
657 enum daos_snapshot_opts {
659 DAOS_SNAP_OPT_CR = (1 << 0),
661 DAOS_SNAP_OPT_OIT = (1 << 1),
662};
663
679int
680daos_cont_create_snap_opt(daos_handle_t coh, daos_epoch_t *epoch, char *name,
681 enum daos_snapshot_opts opts, daos_event_t *ev);
682
702int
703daos_cont_list_snap(daos_handle_t coh, int *nr, daos_epoch_t *epochs,
704 char **names, daos_anchor_t *anchor, daos_event_t *ev);
705
719int
720daos_cont_destroy_snap(daos_handle_t coh, daos_epoch_range_t epr,
721 daos_event_t *ev);
722
739int
740daos_cont_get_perms(daos_prop_t *cont_prop, uid_t uid, gid_t *gids, size_t nr_gids,
741 uint64_t *perms);
742
752int
753daos_cont_snap_oit_create(daos_handle_t coh, daos_epoch_t epoch, char *name,
754 daos_event_t *ev);
755
764int
765daos_cont_snap_oit_destroy(daos_handle_t coh, daos_handle_t oh, daos_event_t *ev);
766
767#if defined(__cplusplus)
768}
769#endif /* __cplusplus */
770#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:19
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:657
DAOS_SNAP_OPT_CR
@ DAOS_SNAP_OPT_CR
Definition daos_cont.h:659
DAOS_SNAP_OPT_OIT
@ DAOS_SNAP_OPT_OIT
Definition daos_cont.h:661
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_set_owner_no_check
int daos_cont_set_owner_no_check(daos_handle_t coh, d_string_t user, d_string_t group, 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:17
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:21
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:60
daos_cont_info_t
Definition daos_types.h:130
daos_epoch_range_t
Definition daos_types.h:119
daos_handle_t
Definition daos_types.h:75
daos_prop_t
Definition daos_prop.h:646