DAOS API (v2.1 - dev)
Loading...
Searching...
No Matches
daos_uns.h
Go to the documentation of this file.
1/*
2 * (C) Copyright 2019-2023 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
24enum {
25 /*
26 * String does not include daos:// prefix
27 * Path that is passed does not have daos: prefix but is direct:
28 * (/puuid/cuuid/xyz) and does not need to parse a path UNS attrs.
29 * This is usually not set.
30 */
31 DUNS_NO_PREFIX = (1 << 0),
32
33 /* look only at the last entry in the path. */
34 DUNS_NO_REVERSE_LOOKUP = (1 << 1),
35
36 /*
37 * check only for direct path.
38 * Do not attempt to get the extended attribute of the path, and assume
39 * the path is a direct path that is either of format:
40 * - /puuid/cuuid/xyz
41 * - /pool_label/container_label/xyz
42 * This is usually not set.
43 */
44 DUNS_NO_CHECK_PATH = (1 << 2),
45};
46
50 daos_cont_layout_t da_type;
52 daos_oclass_id_t da_oclass_id;
54 daos_size_t da_chunk_size;
63 uint32_t da_flags;
71 char da_pool[DAOS_PROP_LABEL_MAX_LEN + 1];
80 char da_cont[DAOS_PROP_LABEL_MAX_LEN + 1];
86 char *da_sys;
109 uuid_t da_puuid;
116 uuid_t da_cuuid;
118 daos_oclass_id_t da_dir_oclass_id;
120 daos_oclass_id_t da_file_oclass_id;
123};
124
126#define DUNS_XATTR_NAME "user.daos"
128#define DUNS_MAX_XATTR_LEN 170
130#define DUNS_XATTR_FMT "DAOS.%s://%36s/%36s"
136#define DUNS_LUSTRE_XATTR_FMT "%36s/%36s"
137
157int
158duns_create_path(daos_handle_t poh, const char *path, struct duns_attr_t *attrp);
159
186int
187duns_resolve_path(const char *path, struct duns_attr_t *attr);
188
197int
198duns_destroy_path(daos_handle_t poh, const char *path);
199
209int
210duns_parse_attr(char *str, daos_size_t len, struct duns_attr_t *attr);
211
221int
222duns_set_sys_name(struct duns_attr_t *attrp, const char *sys);
223
229void
231
249int
250duns_link_cont(daos_handle_t poh, const char *cont, const char *path);
251
252#if defined(__cplusplus)
253}
254#endif
255#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:103
char da_hints[DAOS_CONT_HINT_MAX_LEN]
Definition daos_uns.h:122
daos_oclass_id_t da_file_oclass_id
Definition daos_uns.h:120
daos_cont_layout_t da_type
Definition daos_uns.h:50
uuid_t da_puuid
Definition daos_uns.h:109
char da_pool[DAOS_PROP_LABEL_MAX_LEN+1]
Definition daos_uns.h:71
uint32_t da_flags
Definition daos_uns.h:63
daos_oclass_id_t da_dir_oclass_id
Definition daos_uns.h:118
daos_prop_t * da_props
Definition daos_uns.h:56
bool da_on_lustre
Definition daos_uns.h:97
char da_cont[DAOS_PROP_LABEL_MAX_LEN+1]
Definition daos_uns.h:80
daos_size_t da_chunk_size
Definition daos_uns.h:54
char * da_sys
Definition daos_uns.h:86
char * da_rel_path
Definition daos_uns.h:95
daos_oclass_id_t da_oclass_id
Definition daos_uns.h:52
uuid_t da_cuuid
Definition daos_uns.h:116