summaryrefslogtreecommitdiffstats
path: root/src/H5PB.c
diff options
context:
space:
mode:
authormainzer <mainzer#hdfgroup.org>2017-03-16 17:42:10 (GMT)
committermainzer <mainzer#hdfgroup.org>2017-03-16 17:42:10 (GMT)
commit11ce930ae94bd21b1a8d4afdde7b982439f2800b (patch)
tree581a2a020c12b4714b6d00aee2b1ef1f12c3ba61 /src/H5PB.c
parentcee9624b0febcb60a7b2699262104e9eaf20313d (diff)
downloadhdf5-11ce930ae94bd21b1a8d4afdde7b982439f2800b.zip
hdf5-11ce930ae94bd21b1a8d4afdde7b982439f2800b.tar.gz
hdf5-11ce930ae94bd21b1a8d4afdde7b982439f2800b.tar.bz2
Checkin of additions to cache image parallel test code and
associated bug fixes. Also, modifications to H5PB_dest() to flush the page buffer before destroying the page buffer. This is necessary, as when persistant free space managers are enabled, the page buffer will typically contain dirty FSM data at page buffer destroy time. Tested serial/debug, serial/production, serial/check-vfd/debug, parallel/debug, parallel/production on Jelly.
Diffstat (limited to 'src/H5PB.c')
-rw-r--r--src/H5PB.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5PB.c b/src/H5PB.c
index c67ae59..ad61657 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -468,7 +468,7 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
/*-------------------------------------------------------------------------
* Function: H5PB_dest
*
- * Purpose: destroy the PB on the file.
+ * Purpose: Flush and destroy the PB on the file if it exists.
*
* Return: Non-negative on success/Negative on failure
*
@@ -477,7 +477,7 @@ H5PB__dest_cb(void *item, void H5_ATTR_UNUSED *key, void *_op_data)
*-------------------------------------------------------------------------
*/
herr_t
-H5PB_dest(H5F_t *f)
+H5PB_dest(H5F_t *f, const H5F_io_info2_t *fio_info)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -486,11 +486,14 @@ H5PB_dest(H5F_t *f)
/* Sanity checks */
HDassert(f);
- /* Destroy page buffer info, if there is any */
+ /* flush and destroy the page buffer, if it exists */
if(f->shared->page_buf) {
H5PB_t *page_buf = f->shared->page_buf;
H5PB_ud1_t op_data; /* Iteration context */
+ if(H5PB_flush(fio_info)<0)
+ HGOTO_ERROR(H5E_PAGEBUF, H5E_CANTFLUSH, FAIL, "can't flush page buffer")
+
/* Set up context info */
op_data.page_buf = page_buf;