Skip to content

Commit bca5f2a

Browse files
committed
fixup - remove test code
1 parent 6d3ccb2 commit bca5f2a

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed

server/src/unifyfs_p2p_rpc.c

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,30 +1119,23 @@ static void process_get_extents_rpc(server_rpc_req_t* sreq)
11191119
assert(mid != MARGO_INSTANCE_NULL);
11201120

11211121
hg_size_t buf_sz = num_extents * sizeof(extent_metadata);
1122-
void* buf = (void*) extents;
1123-
// MJB TESTING: make a copy to avoid reuse of cache as bulk
1124-
// across concurrent bcasts
1125-
//void* buf = malloc((size_t)buf_sz);
1126-
//if (NULL != buf) {
1127-
//memcpy(buf, (void*)extents, (size_t)buf_sz);
1128-
hg_bulk_t bulk_handle = HG_BULK_NULL;
1129-
hg_return_t hret = margo_bulk_create(mid, 1, &buf, &buf_sz,
1130-
HG_BULK_READ_ONLY,
1131-
&bulk_handle);
1132-
if (hret != HG_SUCCESS) {
1133-
LOGERR("margo_bulk_create() failed - %s",
1134-
HG_Error_to_string(hret));
1135-
ret = UNIFYFS_ERROR_MARGO;
1136-
//free(buf);
1137-
} else {
1138-
/* set request output bulk for auto-free at cleanup */
1139-
sreq->req_state->bulk = bulk_handle;
1140-
sreq->req_state->bulk_buf = buf;
1141-
bulk_resp_handle = bulk_handle;
1142-
LOGDBG("returning %zu extents for gfid=%d to rank=%d",
1143-
num_extents, gfid, sender);
1144-
}
1145-
//}
1122+
void* buf = (void*) extents;
1123+
hg_bulk_t bulk_handle = HG_BULK_NULL;
1124+
hg_return_t hret = margo_bulk_create(mid, 1, &buf, &buf_sz,
1125+
HG_BULK_READ_ONLY,
1126+
&bulk_handle);
1127+
if (hret != HG_SUCCESS) {
1128+
LOGERR("margo_bulk_create() failed - %s",
1129+
HG_Error_to_string(hret));
1130+
ret = UNIFYFS_ERROR_MARGO;
1131+
} else {
1132+
/* set request output bulk for auto-free at cleanup */
1133+
sreq->req_state->bulk = bulk_handle;
1134+
sreq->req_state->bulk_buf = buf;
1135+
bulk_resp_handle = bulk_handle;
1136+
LOGDBG("returning %zu extents for gfid=%d to rank=%d",
1137+
num_extents, gfid, sender);
1138+
}
11461139
}
11471140
}
11481141
} else {

0 commit comments

Comments
 (0)