DAOS API
(v2.1 - dev)
Toggle main menu visibility
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
*/
15
16
#ifndef __DAOS_UNS_H__
17
#define __DAOS_UNS_H__
18
19
#if defined(__cplusplus)
20
extern
"C"
{
21
#endif
22
24
enum
{
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
48
struct
duns_attr_t
{
50
daos_cont_layout_t
da_type
;
52
daos_oclass_id_t
da_oclass_id
;
54
daos_size_t
da_chunk_size
;
56
daos_prop_t
*
da_props
;
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
;
95
char
*
da_rel_path
;
97
bool
da_on_lustre
;
103
bool
da_no_prefix
;
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
;
122
char
da_hints
[
DAOS_CONT_HINT_MAX_LEN
];
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
157
int
158
duns_create_path
(
daos_handle_t
poh,
const
char
*path,
struct
duns_attr_t
*attrp);
159
186
int
187
duns_resolve_path
(
const
char
*path,
struct
duns_attr_t
*attr);
188
197
int
198
duns_destroy_path
(
daos_handle_t
poh,
const
char
*path);
199
209
int
210
duns_parse_attr
(
char
*str, daos_size_t len,
struct
duns_attr_t
*attr);
211
221
int
222
duns_set_sys_name
(
struct
duns_attr_t
*attrp,
const
char
*sys);
223
229
void
230
duns_destroy_attr
(
struct
duns_attr_t
*attrp);
231
249
int
250
duns_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__ */
DAOS_CONT_HINT_MAX_LEN
#define DAOS_CONT_HINT_MAX_LEN
Definition
daos_cont.h:83
duns_set_sys_name
int duns_set_sys_name(struct duns_attr_t *attrp, const char *sys)
duns_destroy_attr
void duns_destroy_attr(struct duns_attr_t *attrp)
duns_destroy_path
int duns_destroy_path(daos_handle_t poh, const char *path)
duns_parse_attr
int duns_parse_attr(char *str, daos_size_t len, struct duns_attr_t *attr)
duns_resolve_path
int duns_resolve_path(const char *path, struct duns_attr_t *attr)
duns_link_cont
int duns_link_cont(daos_handle_t poh, const char *cont, const char *path)
duns_create_path
int duns_create_path(daos_handle_t poh, const char *path, struct duns_attr_t *attrp)
daos_handle_t
Definition
daos_types.h:73
daos_prop_t
Definition
daos_prop.h:635
duns_attr_t
Definition
daos_uns.h:48
duns_attr_t::da_no_prefix
bool da_no_prefix
Definition
daos_uns.h:103
duns_attr_t::da_hints
char da_hints[DAOS_CONT_HINT_MAX_LEN]
Definition
daos_uns.h:122
duns_attr_t::da_file_oclass_id
daos_oclass_id_t da_file_oclass_id
Definition
daos_uns.h:120
duns_attr_t::da_type
daos_cont_layout_t da_type
Definition
daos_uns.h:50
duns_attr_t::da_puuid
uuid_t da_puuid
Definition
daos_uns.h:109
duns_attr_t::da_pool
char da_pool[DAOS_PROP_LABEL_MAX_LEN+1]
Definition
daos_uns.h:71
duns_attr_t::da_flags
uint32_t da_flags
Definition
daos_uns.h:63
duns_attr_t::da_dir_oclass_id
daos_oclass_id_t da_dir_oclass_id
Definition
daos_uns.h:118
duns_attr_t::da_props
daos_prop_t * da_props
Definition
daos_uns.h:56
duns_attr_t::da_on_lustre
bool da_on_lustre
Definition
daos_uns.h:97
duns_attr_t::da_cont
char da_cont[DAOS_PROP_LABEL_MAX_LEN+1]
Definition
daos_uns.h:80
duns_attr_t::da_chunk_size
daos_size_t da_chunk_size
Definition
daos_uns.h:54
duns_attr_t::da_sys
char * da_sys
Definition
daos_uns.h:86
duns_attr_t::da_rel_path
char * da_rel_path
Definition
daos_uns.h:95
duns_attr_t::da_oclass_id
daos_oclass_id_t da_oclass_id
Definition
daos_uns.h:52
duns_attr_t::da_cuuid
uuid_t da_cuuid
Definition
daos_uns.h:116
src
include
daos_uns.h
Generated by
1.17.0