From 29090df2833f5653748b902a3dc4edeb916eda90 Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Fri, 8 Feb 2019 18:00:33 +0000 Subject: [PATCH] update DAOS and DFS drivers with new DAOS API changes. Signed-off-by: Mohamad Chaarawi --- src/aiori-DAOS.c | 18 ++++++++++-------- src/aiori-DFS.c | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/aiori-DAOS.c b/src/aiori-DAOS.c index 4b35881..9035600 100644 --- a/src/aiori-DAOS.c +++ b/src/aiori-DAOS.c @@ -244,7 +244,7 @@ static void ContainerOpen(char *testFileName, IOR_param_t *param, param->useExistingTestFile == FALSE) { INFO(VERBOSE_2, "Creating container %s", testFileName); - rc = daos_cont_create(pool, uuid, NULL /* ev */); + rc = daos_cont_create(pool, uuid, NULL, NULL); DCHECK(rc, "Failed to create container %s", testFileName); } @@ -594,12 +594,14 @@ kill_daos_server(IOR_param_t *param) { daos_pool_info_t info; d_rank_t d_rank, svc_ranks[13]; - d_rank_list_t svc, targets; + d_rank_list_t svc; + struct d_tgt_list targets; + int tgt_idx = -1; uuid_t uuid; char *s; int rc; - rc = daos_pool_query(pool, NULL, &info, NULL); + rc = daos_pool_query(pool, NULL, &info, NULL, NULL); DCHECK(rc, "Error in querying pool\n"); if (info.pi_ntargets - info.pi_ndisabled <= 1) @@ -618,16 +620,16 @@ kill_daos_server(IOR_param_t *param) rc = daos_mgmt_svc_rip(o.daosGroup, d_rank, true, NULL); DCHECK(rc, "Error in killing server\n"); - targets.rl_nr = 1; - targets.rl_ranks = &d_rank; - + targets.tl_nr = 1; + targets.tl_ranks = &d_rank; + targets.tl_tgts = &tgt_idx; svc.rl_ranks = svc_ranks; ParseService(sizeof(svc_ranks)/ sizeof(svc_ranks[0]), &svc); - rc = daos_pool_exclude(uuid, NULL, &svc, &targets, NULL); + rc = daos_pool_tgt_exclude(uuid, NULL, &svc, &targets, NULL); DCHECK(rc, "Error in excluding pool from poolmap\n"); - rc = daos_pool_query(pool, NULL, &info, NULL); + rc = daos_pool_query(pool, NULL, &info, NULL, NULL); DCHECK(rc, "Error in querying pool\n"); printf("%d targets succesfully disabled\n", diff --git a/src/aiori-DFS.c b/src/aiori-DFS.c index e51d045..9b8f60f 100755 --- a/src/aiori-DFS.c +++ b/src/aiori-DFS.c @@ -261,7 +261,7 @@ DFS_Init() { if (rc == -DER_NONEXIST) { if (verbose >= VERBOSE_1) printf("Creating DFS Container ...\n"); - rc = daos_cont_create(poh, co_uuid, NULL); + rc = daos_cont_create(poh, co_uuid, NULL, NULL); if (rc == 0) { cont_created = true; rc = daos_cont_open(poh, co_uuid, DAOS_COO_RW, &coh,