fix DAOS plugin options passing.
Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@intel.com>master
parent
46ff4e26be
commit
14d67c19d9
|
@ -98,21 +98,23 @@ static void DAOS_Delete(char *, IOR_param_t *);
|
||||||
static char* DAOS_GetVersion();
|
static char* DAOS_GetVersion();
|
||||||
static void DAOS_Fsync(void *, IOR_param_t *);
|
static void DAOS_Fsync(void *, IOR_param_t *);
|
||||||
static IOR_offset_t DAOS_GetFileSize(IOR_param_t *, MPI_Comm, char *);
|
static IOR_offset_t DAOS_GetFileSize(IOR_param_t *, MPI_Comm, char *);
|
||||||
|
static option_help * DAOS_options();
|
||||||
|
|
||||||
/************************** D E C L A R A T I O N S ***************************/
|
/************************** D E C L A R A T I O N S ***************************/
|
||||||
|
|
||||||
ior_aiori_t daos_aiori = {
|
ior_aiori_t daos_aiori = {
|
||||||
.name = "DAOS",
|
.name = "DAOS",
|
||||||
.create = DAOS_Create,
|
.create = DAOS_Create,
|
||||||
.open = DAOS_Open,
|
.open = DAOS_Open,
|
||||||
.xfer = DAOS_Xfer,
|
.xfer = DAOS_Xfer,
|
||||||
.close = DAOS_Close,
|
.close = DAOS_Close,
|
||||||
.delete = DAOS_Delete,
|
.delete = DAOS_Delete,
|
||||||
.get_version = DAOS_GetVersion,
|
.get_version = DAOS_GetVersion,
|
||||||
.fsync = DAOS_Fsync,
|
.fsync = DAOS_Fsync,
|
||||||
.get_file_size = DAOS_GetFileSize,
|
.get_file_size = DAOS_GetFileSize,
|
||||||
.initialize = DAOS_Init,
|
.initialize = DAOS_Init,
|
||||||
.finalize = DAOS_Fini,
|
.finalize = DAOS_Fini,
|
||||||
|
.get_options = DAOS_options,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum handleType {
|
enum handleType {
|
||||||
|
@ -536,13 +538,6 @@ static void ObjectClassParse(const char *string)
|
||||||
GERR("Invalid 'daosObjectClass' argument: '%s'", string);
|
GERR("Invalid 'daosObjectClass' argument: '%s'", string);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *GetGroup(IOR_param_t *param)
|
|
||||||
{
|
|
||||||
if (strlen(o.daosGroup) == 0)
|
|
||||||
return NULL;
|
|
||||||
return o.daosGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ParseService(IOR_param_t *param, int max, d_rank_list_t *ranks)
|
static void ParseService(IOR_param_t *param, int max, d_rank_list_t *ranks)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
@ -563,11 +558,15 @@ static void ParseService(IOR_param_t *param, int max, d_rank_list_t *ranks)
|
||||||
free(s);
|
free(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static option_help * DAOS_options(){
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
static void DAOS_Init(IOR_param_t *param)
|
static void DAOS_Init(IOR_param_t *param)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (strlen(o.daosObjectClass) != 0)
|
if (o.daosObjectClass)
|
||||||
ObjectClassParse(o.daosObjectClass);
|
ObjectClassParse(o.daosObjectClass);
|
||||||
|
|
||||||
if (param->filePerProc)
|
if (param->filePerProc)
|
||||||
|
@ -601,9 +600,9 @@ static void DAOS_Init(IOR_param_t *param)
|
||||||
d_rank_t rank[13];
|
d_rank_t rank[13];
|
||||||
d_rank_list_t ranks;
|
d_rank_list_t ranks;
|
||||||
|
|
||||||
if (strlen(o.daosPool) == 0)
|
if (o.daosPool == NULL)
|
||||||
GERR("'daosPool' must be specified");
|
GERR("'daosPool' must be specified");
|
||||||
if (strlen(o.daosPoolSvc) == 0)
|
if (o.daosPoolSvc == NULL)
|
||||||
GERR("'daosPoolSvc' must be specified");
|
GERR("'daosPoolSvc' must be specified");
|
||||||
|
|
||||||
INFO(VERBOSE_2, param, "Connecting to pool %s %s",
|
INFO(VERBOSE_2, param, "Connecting to pool %s %s",
|
||||||
|
@ -614,7 +613,7 @@ static void DAOS_Init(IOR_param_t *param)
|
||||||
ranks.rl_ranks = rank;
|
ranks.rl_ranks = rank;
|
||||||
ParseService(param, sizeof(rank) / sizeof(rank[0]), &ranks);
|
ParseService(param, sizeof(rank) / sizeof(rank[0]), &ranks);
|
||||||
|
|
||||||
rc = daos_pool_connect(uuid, GetGroup(param), &ranks,
|
rc = daos_pool_connect(uuid, o.daosGroup, &ranks,
|
||||||
DAOS_PC_RW, &pool, &poolInfo,
|
DAOS_PC_RW, &pool, &poolInfo,
|
||||||
NULL /* ev */);
|
NULL /* ev */);
|
||||||
DCHECK(rc, "Failed to connect to pool %s", o.daosPool);
|
DCHECK(rc, "Failed to connect to pool %s", o.daosPool);
|
||||||
|
@ -729,7 +728,7 @@ kill_daos_server(IOR_param_t *param)
|
||||||
rank, info.pi_ndisabled, info.pi_ntargets);
|
rank, info.pi_ndisabled, info.pi_ntargets);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
rc = daos_mgmt_svc_rip(GetGroup(param), rank, true, NULL);
|
rc = daos_mgmt_svc_rip(o.daosGroup, rank, true, NULL);
|
||||||
DCHECK(rc, "Error in killing server\n");
|
DCHECK(rc, "Error in killing server\n");
|
||||||
|
|
||||||
targets.rl_nr = 1;
|
targets.rl_nr = 1;
|
||||||
|
|
|
@ -1187,7 +1187,7 @@ static void TestIoSys(IOR_test_t *test)
|
||||||
backend = aiori_select(params->api);
|
backend = aiori_select(params->api);
|
||||||
|
|
||||||
if (backend->initialize)
|
if (backend->initialize)
|
||||||
backend->initialize(NULL);
|
backend->initialize(params);
|
||||||
|
|
||||||
/* show test setup */
|
/* show test setup */
|
||||||
if (rank == 0 && verbose >= VERBOSE_0)
|
if (rank == 0 && verbose >= VERBOSE_0)
|
||||||
|
|
Loading…
Reference in New Issue