1
1

correctly free some buffers, and ensure that lustre_stripe_size and stripe_count are always read from the file system.

Этот коммит содержится в:
Edgar Gabriel 2016-01-14 13:16:23 -06:00
родитель 4bbb22bd0b
Коммит 2bdd6ba17a
2 изменённых файлов: 19 добавлений и 18 удалений

Просмотреть файл

@ -530,7 +530,14 @@ exit :
}
free(displs);
free(decoded_iov);
free(broken_counts);
free(broken_iov_counts);
free(broken_decoded_iovs); // decoded_iov arrays[i] were freed as aggr_data[i]->decoded_iov;
for (i=0; i<dynamic_gen2_num_io_procs; i++ ) {
free(broken_iov_arrays[i]);
}
free(broken_iov_arrays);
return OMPI_SUCCESS;
}

Просмотреть файл

@ -139,27 +139,21 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm,
return OMPI_ERROR;
}
if (fs_lustre_stripe_size > 0 && fs_lustre_stripe_width>0) {
fh->f_stripe_size = fs_lustre_stripe_size;
fh->f_stripe_count = fs_lustre_stripe_width;
}
else {
lump = alloc_lum();
if (NULL == lump ){
lump = alloc_lum();
if (NULL == lump ){
fprintf(stderr,"Cannot allocate memory for extracting stripe size\n");
return OMPI_ERROR;
}
rc = llapi_file_get_stripe(filename, lump);
if (rc != 0) {
opal_output(1, "get_stripe failed: %d (%s)\n", errno, strerror(errno));
return OMPI_ERROR;
}
fh->f_stripe_size = lump->lmm_stripe_size;
fh->f_stripe_count = lump->lmm_stripe_count;
}
rc = llapi_file_get_stripe(filename, lump);
if (rc != 0) {
opal_output(1, "get_stripe failed: %d (%s)\n", errno, strerror(errno));
return OMPI_ERROR;
}
fh->f_stripe_size = lump->lmm_stripe_size;
fh->f_stripe_count = lump->lmm_stripe_count;
// if ( NULL != lump ) {
// free ( lump );
// }
}
return OMPI_SUCCESS;
}