Skip to content

Commit e1c75d2

Browse files
committed
fixup - bugfix and more margo resource release
1 parent bca5f2a commit e1c75d2

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

server/src/unifyfs_client_rpc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,6 @@ void process_client_fsync_rpc(client_rpc_req_t* creq)
512512

513513
/* send rpc response and cleanup request state */
514514
sync_respond_client(creq, rpc_name);
515-
516515
}
517516
// else, some other thread will update the extent metadata
518517
// and respond when the sync has completed
@@ -952,7 +951,7 @@ static void unifyfs_fsync_rpc(hg_handle_t handle)
952951
sizeof(unifyfs_fsync_in_t),
953952
sizeof(unifyfs_fsync_out_t));
954953
if (NULL == creq) {
955-
unifyfs_filesize_out_t out;
954+
unifyfs_fsync_out_t out;
956955
out.ret = (int32_t) ENOMEM;
957956
hg_return_t hret = margo_respond(handle, &out);
958957
if (hret != HG_SUCCESS) {

server/src/unifyfs_inode.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ int unifyfs_inode_add_pending_extents(int gfid,
401401
LOGINFO("added %d pending extents to inode (gfid=%d)",
402402
num_extents, gfid);
403403

404-
405404
return ret;
406405
}
407406

server/src/unifyfs_service_manager.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,17 +1315,12 @@ static int process_pending_sync(server_rpc_req_t* req)
13151315
pending_extents_item* pei = (pending_extents_item*) item;
13161316
client_rpc_req_t* creq = pei->client_req;
13171317

1318-
/* send rpc response to requesting client */
1319-
unifyfs_fsync_out_t out;
1320-
out.ret = (int32_t) ret;
1321-
hg_return_t hret = margo_respond(creq->req_state->handle, &out);
1322-
if (hret != HG_SUCCESS) {
1323-
LOGERR("margo_respond() failed");
1324-
}
1318+
unifyfs_fsync_out_t* out = creq->req_state->outputs;
1319+
out->ret = (int32_t) ret;
13251320

1326-
/* cleanup req */
1327-
margo_destroy(creq->req_state->handle);
1328-
free(creq);
1321+
/* send rpc response to requesting client and cleanup */
1322+
const char* rpc_name = "unifyfs_fsync";
1323+
sync_respond_client(creq, rpc_name);
13291324
}
13301325
}
13311326

0 commit comments

Comments
 (0)