summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index c8cb425..c6f68cb 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -130,7 +130,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
HDassert(f);
/* Make a copy of the default file access property list */
- if(NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_g)))
+ if(NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
if((ret_value = H5P_copy_plist(old_plist, app_ref)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list")
@@ -606,7 +606,7 @@ H5F_is_hdf5(const char *name)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file")
/* The file is an hdf5 file if the hdf5 file signature can be found */
- if(H5F_locate_signature(file, H5AC_ind_dxpl_id, &sig_addr) < 0)
+ if(H5FD_locate_signature(file, H5AC_ind_dxpl_g, &sig_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature")
ret_value = (HADDR_UNDEF != sig_addr);
@@ -825,6 +825,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.
@@ -894,8 +896,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)
@@ -1211,6 +1218,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)
@@ -1238,8 +1246,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")
@@ -1932,7 +1945,6 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len)
if(HDstrcmp(fd_ptr->cls->name, "family") == 0)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "Not supported for family file driver.")
-
/* Go get the actual file size */
if(HADDR_UNDEF == (eoa = H5FD_get_eoa(file->shared->lf, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
@@ -1952,7 +1964,7 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len)
/* read in the file image */
/* (Note compensation for base address addition in internal routine) */
- if(H5FD_read(fd_ptr, H5AC_ind_dxpl_id, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
+ if(H5FD_read(fd_ptr, H5AC_ind_dxpl_g, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, FAIL, "file image read request failed")
} /* end if */