You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit 75543ec removed the commented out code from unifycr_get_chunk_list() shown below. This left a function stub behind that should be fully implemented or removed if it's not needed.
/* get a list of chunks for a given file (useful for RDMA, etc.) */chunk_list_t*unifycr_get_chunk_list(char*path)
{
#if0if (unifycr_intercept_path(path)) {
inti=0;
chunk_list_t*chunk_list=NULL;
chunk_list_t*chunk_list_elem;
/* get the file id for this file descriptor *//* Rag: We decided to use the path instead.. Can add flexibility to support both *///int fid = unifycr_get_fid_from_fd(fd);intfid=unifycr_get_fid_from_path(path);
if (fid<0) {
errno=EACCES;
returnNULL;
}
/* get meta data for this file */unifycr_filemeta_t*meta=unifycr_get_meta_from_fid(fid);
if (meta) {
while (i<meta->chunks) {
chunk_list_elem= (chunk_list_t*)malloc(sizeof(chunk_list_t));
/* get the chunk id for the i-th chunk and * add it to the chunk_list */unifycr_chunkmeta_t*chunk_meta=&(meta->chunk_meta[i]);
chunk_list_elem->chunk_id=chunk_meta->id;
chunk_list_elem->location=chunk_meta->location;
if (chunk_meta->location==CHUNK_LOCATION_MEMFS) {
/* update the list_elem with the memory address of this chunk */chunk_list_elem->chunk_offset=unifycr_compute_chunk_buf(meta, chunk_meta->id,
0);
chunk_list_elem->spillover_offset=0;
} elseif (chunk_meta->location==CHUNK_LOCATION_SPILLOVER) {
/* update the list_elem with the offset of this chunk in the spillover file*/chunk_list_elem->spillover_offset=unifycr_compute_spill_offset(meta,
chunk_meta->id, 0);
chunk_list_elem->chunk_offset=NULL;
} else {
/*TODO: Handle the container case.*/
}
/* currently using macros from utlist.h to * handle link-list operations */LL_APPEND(chunk_list, chunk_list_elem);
i++;
}
returnchunk_list;
} else {
returnNULL;
}
} else {
/* file not managed by UNIFYCR */errno=EACCES;
returnNULL;
}
#endifreturnNULL;
}
The text was updated successfully, but these errors were encountered:
Commit 75543ec removed the commented out code from unifycr_get_chunk_list() shown below. This left a function stub behind that should be fully implemented or removed if it's not needed.
The text was updated successfully, but these errors were encountered: