@@ -49,19 +49,19 @@ struct daos_fio_options {
49
49
static struct fio_option options [] = {
50
50
{
51
51
.name = "pool" ,
52
- .lname = "pool uuid" ,
52
+ .lname = "pool uuid or label " ,
53
53
.type = FIO_OPT_STR_STORE ,
54
54
.off1 = offsetof(struct daos_fio_options , pool ),
55
- .help = "DAOS pool uuid" ,
55
+ .help = "DAOS pool uuid or label " ,
56
56
.category = FIO_OPT_C_ENGINE ,
57
57
.group = FIO_OPT_G_DFS ,
58
58
},
59
59
{
60
60
.name = "cont" ,
61
- .lname = "container uuid" ,
61
+ .lname = "container uuid or label " ,
62
62
.type = FIO_OPT_STR_STORE ,
63
63
.off1 = offsetof(struct daos_fio_options , cont ),
64
- .help = "DAOS container uuid" ,
64
+ .help = "DAOS container uuid or label " ,
65
65
.category = FIO_OPT_C_ENGINE ,
66
66
.group = FIO_OPT_G_DFS ,
67
67
},
@@ -103,7 +103,6 @@ static struct fio_option options[] = {
103
103
static int daos_fio_global_init (struct thread_data * td )
104
104
{
105
105
struct daos_fio_options * eo = td -> eo ;
106
- uuid_t pool_uuid , co_uuid ;
107
106
daos_pool_info_t pool_info ;
108
107
daos_cont_info_t co_info ;
109
108
int rc = 0 ;
@@ -124,6 +123,10 @@ static int daos_fio_global_init(struct thread_data *td)
124
123
return rc ;
125
124
}
126
125
126
+ #if !defined(DAOS_API_VERSION_MAJOR ) || \
127
+ (DAOS_API_VERSION_MAJOR == 1 && DAOS_API_VERSION_MINOR < 3 )
128
+ uuid_t pool_uuid , co_uuid ;
129
+
127
130
rc = uuid_parse (eo -> pool , pool_uuid );
128
131
if (rc ) {
129
132
log_err ("Failed to parse 'Pool uuid': %s\n" , eo -> pool );
@@ -137,6 +140,7 @@ static int daos_fio_global_init(struct thread_data *td)
137
140
td_verror (td , EINVAL , "uuid_parse(eo->cont)" );
138
141
return EINVAL ;
139
142
}
143
+ #endif
140
144
141
145
/* Connect to the DAOS pool */
142
146
#if !defined(DAOS_API_VERSION_MAJOR ) || DAOS_API_VERSION_MAJOR < 1
@@ -152,9 +156,12 @@ static int daos_fio_global_init(struct thread_data *td)
152
156
rc = daos_pool_connect (pool_uuid , NULL , svcl , DAOS_PC_RW ,
153
157
& poh , & pool_info , NULL );
154
158
d_rank_list_free (svcl );
155
- #else
159
+ #elif ( DAOS_API_VERSION_MAJOR == 1 && DAOS_API_VERSION_MINOR < 3 )
156
160
rc = daos_pool_connect (pool_uuid , NULL , DAOS_PC_RW , & poh , & pool_info ,
157
161
NULL );
162
+ #else
163
+ rc = daos_pool_connect (eo -> pool , NULL , DAOS_PC_RW , & poh , & pool_info ,
164
+ NULL );
158
165
#endif
159
166
if (rc ) {
160
167
log_err ("Failed to connect to pool %d\n" , rc );
@@ -163,7 +170,12 @@ static int daos_fio_global_init(struct thread_data *td)
163
170
}
164
171
165
172
/* Open the DAOS container */
173
+ #if !defined(DAOS_API_VERSION_MAJOR ) || \
174
+ (DAOS_API_VERSION_MAJOR == 1 && DAOS_API_VERSION_MINOR < 3 )
166
175
rc = daos_cont_open (poh , co_uuid , DAOS_COO_RW , & coh , & co_info , NULL );
176
+ #else
177
+ rc = daos_cont_open (poh , eo -> cont , DAOS_COO_RW , & coh , & co_info , NULL );
178
+ #endif
167
179
if (rc ) {
168
180
log_err ("Failed to open container: %d\n" , rc );
169
181
td_verror (td , rc , "daos_cont_open" );
0 commit comments