diff options
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -1069,6 +1069,8 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush) HDassert(f->shared); if(1 == f->shared->nrefs) { + H5F_io_info_t fio_info; /* I/O info for operation */ + /* Flush at this point since the file will be closed. * Only try to flush the file if it was opened with write access, and if * the caller requested a flush. @@ -1138,8 +1140,13 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush) f->shared->root_grp = NULL; } /* end if */ + /* Set up I/O info for operation */ + fio_info.f = f; + if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + /* Destroy other components of the file */ - if(H5F_accum_reset(f, dxpl_id, TRUE) < 0) + if(H5F__accum_reset(&fio_info, TRUE) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file") if(H5FO_dest(f) < 0) @@ -1749,6 +1756,7 @@ done: herr_t H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing) { + H5F_io_info_t fio_info; /* I/O info for operation */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1776,8 +1784,13 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing) /* Push error, but keep going*/ HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache") + /* Set up I/O info for operation */ + fio_info.f = f; + if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HDONE_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + /* Flush out the metadata accumulator */ - if(H5F_accum_flush(f, dxpl_id) < 0) + if(H5F__accum_flush(&fio_info) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush metadata accumulator") |