summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2014-04-25 19:54:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2014-04-25 19:54:57 (GMT)
commit4257a32de13576155efc6df64aa0282bdf074ff1 (patch)
tree4da2d29685eb8c88e804d6daed0b59830cdbbffa /src/H5F.c
parentb018ba48ced579975e60362e3acfb6afb1f1d384 (diff)
downloadhdf5-4257a32de13576155efc6df64aa0282bdf074ff1.zip
hdf5-4257a32de13576155efc6df64aa0282bdf074ff1.tar.gz
hdf5-4257a32de13576155efc6df64aa0282bdf074ff1.tar.bz2
[svn-r25109] Description:
Bring r25084, 25088, 25092, 25097 from trunk to 1.8 branch: r25084: Begin process of migrating from using property list IDs internally to the library to using the internal generic property list data structure. r25088: Introduce "file I/O info" struct, to hold file & dxpl pointers, and start propagating up through library. r25092: More migration to using H5F_io_info_t pointers and away from using property list IDs internally. Also, clean up some compiler warnings in the cache code. r25097: Make progress toward moving from DXPL IDs to property list structures within the library. Also move the signature location code from the H5F package to the H5FD package, where it's a better fit. Also, clean up some more compiler warnings along the way. Tested: Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & parallel (h5committested on trunk)
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 2413c73..e45882d 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -349,7 +349,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")
@@ -861,7 +861,7 @@ H5Fis_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);
@@ -1076,6 +1076,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.
@@ -1133,8 +1135,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)
@@ -1744,6 +1751,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)
@@ -1771,8 +1779,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")
@@ -2760,7 +2773,7 @@ H5Fget_file_image(hid_t file_id, 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 */