Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opal/pmix: Bring dstore fixes for rc3 testing #3130

Merged
merged 3 commits into from
Mar 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion opal/mca/pmix/pmix112/README
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ Additional copyrights may follow
$HEADER$

===========================================================================
This internal component includes PMIx v1.2.1 plus these two commits
This internal component includes PMIx v1.2.1 plus following commits
cherry-picked from the PMIx v1.2 branch (which will be included in the
eventual PMIx v1.2.2 release). Newer patches at top.

* https://github.com/pmix/pmix/commit/1b86a6e7ee99fc5969a0789a9905a4a2159a6dc0
* https://github.com/pmix/pmix/commit/14f865c4b631827fb99779d42eaf0567f117a76f
* https://github.com/pmix/pmix/commit/4269e8484bd883523ae485bf2e1b7bbc0719c494
* https://github.com/pmix/pmix/commit/a2d431cbec162b01e15920cc75df1af9ad244f06
* https://github.com/pmix/pmix/commit/8587f278a17301633ccf6f0d7cb086e3be8f4793
26 changes: 20 additions & 6 deletions opal/mca/pmix/pmix112/pmix/src/sm/pmix_mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,38 @@ int _mmap_segment_create(pmix_sm_seg_t *sm_seg, const char *file_name, size_t si
}
/* size backing file - note the use of real_size here */
#ifdef HAVE_POSIX_FALLOCATE
if (0 != posix_fallocate(sm_seg->seg_id, 0, size)) {
if (0 != (rc = posix_fallocate(sm_seg->seg_id, 0, size))) {
pmix_output_verbose(2, pmix_globals.debug_output,
"sys call posix_fallocate(2) fail\n");
if (ENOSPC == errno) {
if (ENOSPC == rc) {
rc = PMIX_ERR_OUT_OF_RESOURCE;
} else {
goto out;
} else if ((ENOTSUP != rc)
#ifdef EOPNOTSUPP
&& (EOPNOTSUPP != rc)
#endif
){
rc = PMIX_ERROR;
goto out;
}
goto out;
/* else:
* Not supported by OS and/or filesystem.
* Must fall-back to ftruncate().
*/
} else {
goto map_memory;
}
#else
#endif
if (0 != ftruncate(sm_seg->seg_id, size)) {
pmix_output_verbose(2, pmix_globals.debug_output,
"sys call ftruncate(2) fail\n");
rc = PMIX_ERROR;
goto out;
} else {
rc = PMIX_SUCCESS;
}
#endif

map_memory:
if (MAP_FAILED == (seg_addr = mmap(NULL, size,
PROT_READ | PROT_WRITE, MAP_SHARED,
sm_seg->seg_id, 0))) {
Expand Down