Commit 07394f2d authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Fix bug in PIO posixfpguard mode.

* This allowed one process to close a file and open the next with the
  same ID, thus beginning writes to the file at large offsets when then
  querying for the shared file pointer.
parent 6f7dc3c5
......@@ -409,7 +409,7 @@ size_t fwPOSIXFPGUARDSENDRECV( int fileID, int tsID, const void *buffer, size_t
xmpi ( MPI_Barrier ( commInqCommColl ()));
}
filled = dbuffer_push ( afd->db, ( unsigned char * ) buffer, len );
filled = dbuffer_push(afd->db, ( unsigned char * ) buffer, len);
xdebug ( "fileID = %d, tsID = %d, pushed data on buffer, filled = %d",
fileID, tsID, filled );
......@@ -449,7 +449,8 @@ int fcPOSIXFPGUARDSENDRECV ( int id )
/* remove file element */
iret = listSetRemove(bibAFiledataPF, fileIDTestA, (void *)(intptr_t)id);
/* make sure the file is closed on all collectors before proceeding */
xmpi(MPI_Barrier(commInqCommColl()));
return iret;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment