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-2024 Intel Corporation.
3
* (C) Copyright 2026 Hewlett Packard Enterprise Development LP
4
*
5
* SPDX-License-Identifier: BSD-2-Clause-Patent
6
*/
16
17
#ifndef __DAOS_UNS_H__
18
#define __DAOS_UNS_H__
19
20
#if defined(__cplusplus)
21
extern
"C"
{
22
#endif
23
24
#include <daos_prop.h>
25
#include <daos_obj_class.h>
26
#include <
daos_cont.h
>
27
29
enum
{
30
/*
31
* String does not include daos:// prefix
32
* Path that is passed does not have daos: prefix but is direct:
33
* (/puuid/cuuid/xyz) and does not need to parse a path UNS attrs.
34
* This is usually not set.
35
*/
36
DUNS_NO_PREFIX = (1 << 0),
37
38
/* look only at the last entry in the path. */
39
DUNS_NO_REVERSE_LOOKUP = (1 << 1),
40
41
/*
42
* check only for direct path.
43
* Do not attempt to get the extended attribute of the path, and assume
44
* the path is a direct path that is either of format:
45
* - /puuid/cuuid/xyz
46
* - /pool_label/container_label/xyz
47
* This is usually not set.
48
*/
49
DUNS_NO_CHECK_PATH = (1 << 2),
50
};
51
53
struct
duns_attr_t
{
55
daos_cont_layout_t
da_type
;
57
daos_oclass_id_t
da_oclass_id
;
59
daos_size_t
da_chunk_size
;
61
daos_prop_t
*
da_props
;
68
uint32_t
da_flags
;
76
char
da_pool
[DAOS_PROP_LABEL_MAX_LEN + 1];
85
char
da_cont
[DAOS_PROP_LABEL_MAX_LEN + 1];
91
char
*
da_sys
;
100
char
*
da_rel_path
;
102
bool
da_on_lustre
;
108
bool
da_no_prefix
;
114
uuid_t
da_puuid
;
121
uuid_t
da_cuuid
;
123
daos_oclass_id_t
da_dir_oclass_id
;
125
daos_oclass_id_t
da_file_oclass_id
;
127
char
da_hints
[
DAOS_CONT_HINT_MAX_LEN
];
128
};
129
131
#define DUNS_XATTR_NAME "user.daos"
133
#define DUNS_MAX_XATTR_LEN 170
135
#define DUNS_XATTR_FMT "DAOS.%s://%36s/%36s"
141
#define DUNS_LUSTRE_XATTR_FMT "%36s/%36s"
142
162
int
163
duns_create_path
(
daos_handle_t
poh,
const
char
*path,
struct
duns_attr_t
*attrp);
164
191
int
192
duns_resolve_path
(
const
char
*path,
struct
duns_attr_t
*attr);
193
202
int
203
duns_destroy_path
(
daos_handle_t
poh,
const
char
*path);
204
214
int
215
duns_parse_attr
(
char
*str, daos_size_t len,
struct
duns_attr_t
*attr);
216
226
int
227
duns_set_sys_name
(
struct
duns_attr_t
*attrp,
const
char
*sys);
228
234
void
235
duns_destroy_attr
(
struct
duns_attr_t
*attrp);
236
254
int
255
duns_link_cont
(
daos_handle_t
poh,
const
char
*cont,
const
char
*path);
256
257
#if defined(__cplusplus)
258
}
259
#endif
260
#endif
/* __DAOS_UNS_H__ */
daos_cont.h
DAOS_CONT_HINT_MAX_LEN
#define DAOS_CONT_HINT_MAX_LEN
Definition
daos_cont.h:94
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:76
daos_prop_t
Definition
daos_prop.h:663
duns_attr_t
Definition
daos_uns.h:53
duns_attr_t::da_no_prefix
bool da_no_prefix
Definition
daos_uns.h:108
duns_attr_t::da_hints
char da_hints[DAOS_CONT_HINT_MAX_LEN]
Definition
daos_uns.h:127
duns_attr_t::da_file_oclass_id
daos_oclass_id_t da_file_oclass_id
Definition
daos_uns.h:125
duns_attr_t::da_type
daos_cont_layout_t da_type
Definition
daos_uns.h:55
duns_attr_t::da_puuid
uuid_t da_puuid
Definition
daos_uns.h:114
duns_attr_t::da_pool
char da_pool[DAOS_PROP_LABEL_MAX_LEN+1]
Definition
daos_uns.h:76
duns_attr_t::da_flags
uint32_t da_flags
Definition
daos_uns.h:68
duns_attr_t::da_dir_oclass_id
daos_oclass_id_t da_dir_oclass_id
Definition
daos_uns.h:123
duns_attr_t::da_props
daos_prop_t * da_props
Definition
daos_uns.h:61
duns_attr_t::da_on_lustre
bool da_on_lustre
Definition
daos_uns.h:102
duns_attr_t::da_cont
char da_cont[DAOS_PROP_LABEL_MAX_LEN+1]
Definition
daos_uns.h:85
duns_attr_t::da_chunk_size
daos_size_t da_chunk_size
Definition
daos_uns.h:59
duns_attr_t::da_sys
char * da_sys
Definition
daos_uns.h:91
duns_attr_t::da_rel_path
char * da_rel_path
Definition
daos_uns.h:100
duns_attr_t::da_oclass_id
daos_oclass_id_t da_oclass_id
Definition
daos_uns.h:57
duns_attr_t::da_cuuid
uuid_t da_cuuid
Definition
daos_uns.h:121
src
include
daos_uns.h
Generated by
1.18.0