DAOS API (v2.1 - dev)
Loading...
Searching...
No Matches
daos_uns.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2019-2024 Intel Corporation.
3 *
4 * SPDX-License-Identifier: BSD-2-Clause-Patent
5 */
16#ifndef __DAOS_UNS_H__
17#define __DAOS_UNS_H__
18
19#if defined(__cplusplus)
20extern "C" {
21#endif
22
23#include <daos_prop.h>
24#include <daos_obj_class.h>
25#include <daos_cont.h>
26
28enum {
29 /*
30 * String does not include daos:// prefix
31 * Path that is passed does not have daos: prefix but is direct:
32 * (/puuid/cuuid/xyz) and does not need to parse a path UNS attrs.
33 * This is usually not set.
34 */
35 DUNS_NO_PREFIX = (1 << 0),
36
37 /* look only at the last entry in the path. */
38 DUNS_NO_REVERSE_LOOKUP = (1 << 1),
39
40 /*
41 * check only for direct path.
42 * Do not attempt to get the extended attribute of the path, and assume
43 * the path is a direct path that is either of format:
44 * - /puuid/cuuid/xyz
45 * - /pool_label/container_label/xyz
46 * This is usually not set.
47 */
48 DUNS_NO_CHECK_PATH = (1 << 2),
49};
50
54 daos_cont_layout_t da_type;
56 daos_oclass_id_t da_oclass_id;
58 daos_size_t da_chunk_size;
67 uint32_t da_flags;
75 char da_pool[DAOS_PROP_LABEL_MAX_LEN + 1];
84 char da_cont[DAOS_PROP_LABEL_MAX_LEN + 1];
90 char *da_sys;
113 uuid_t da_puuid;
120 uuid_t da_cuuid;
122 daos_oclass_id_t da_dir_oclass_id;
124 daos_oclass_id_t da_file_oclass_id;
127};
128
130#define DUNS_XATTR_NAME "user.daos"
132#define DUNS_MAX_XATTR_LEN 170
134#define DUNS_XATTR_FMT "DAOS.%s://%36s/%36s"
140#define DUNS_LUSTRE_XATTR_FMT "%36s/%36s"
141
161int
162duns_create_path(daos_handle_t poh, const char *path, struct duns_attr_t *attrp);
163
190int
191duns_resolve_path(const char *path, struct duns_attr_t *attr);
192
201int
202duns_destroy_path(daos_handle_t poh, const char *path);
203
213int
214duns_parse_attr(char *str, daos_size_t len, struct duns_attr_t *attr);
215
225int
226duns_set_sys_name(struct duns_attr_t *attrp, const char *sys);
227
233void
235
253int
254duns_link_cont(daos_handle_t poh, const char *cont, const char *path);
255
256#if defined(__cplusplus)
257}
258#endif
259#endif /* __DAOS_UNS_H__ */
#define DAOS_CONT_HINT_MAX_LEN
Definition daos_cont.h:83
int duns_set_sys_name(struct duns_attr_t *attrp, const char *sys)
void duns_destroy_attr(struct duns_attr_t *attrp)
int duns_destroy_path(daos_handle_t poh, const char *path)
int duns_parse_attr(char *str, daos_size_t len, struct duns_attr_t *attr)
int duns_resolve_path(const char *path, struct duns_attr_t *attr)
int duns_link_cont(daos_handle_t poh, const char *cont, const char *path)
int duns_create_path(daos_handle_t poh, const char *path, struct duns_attr_t *attrp)
bool da_no_prefix
Definition daos_uns.h:107
char da_hints[DAOS_CONT_HINT_MAX_LEN]
Definition daos_uns.h:126
daos_oclass_id_t da_file_oclass_id
Definition daos_uns.h:124
daos_cont_layout_t da_type
Definition daos_uns.h:54
uuid_t da_puuid
Definition daos_uns.h:113
char da_pool[DAOS_PROP_LABEL_MAX_LEN+1]
Definition daos_uns.h:75
uint32_t da_flags
Definition daos_uns.h:67
daos_oclass_id_t da_dir_oclass_id
Definition daos_uns.h:122
daos_prop_t * da_props
Definition daos_uns.h:60
bool da_on_lustre
Definition daos_uns.h:101
char da_cont[DAOS_PROP_LABEL_MAX_LEN+1]
Definition daos_uns.h:84
daos_size_t da_chunk_size
Definition daos_uns.h:58
char * da_sys
Definition daos_uns.h:90
char * da_rel_path
Definition daos_uns.h:99
daos_oclass_id_t da_oclass_id
Definition daos_uns.h:56
uuid_t da_cuuid
Definition daos_uns.h:120