summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-08-24 00:50:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-08-24 00:50:39 (GMT)
commitfef512498112dfb76a6f22f643e9588fdb47b31e (patch)
tree1b71c8f7f6b3eabfcf94a630a521cf3ec1f9287b /src/H5F.c
parent02775c23496a72bb16f11bc3630de3b7649e14f6 (diff)
downloadhdf5-fef512498112dfb76a6f22f643e9588fdb47b31e.zip
hdf5-fef512498112dfb76a6f22f643e9588fdb47b31e.tar.gz
hdf5-fef512498112dfb76a6f22f643e9588fdb47b31e.tar.bz2
[svn-r17411] Description:
Make H5AC_flush just flush the cache and make H5AC_dest perform the proper parallel synchronization before destroying the cache. Also, further discriminate between 'closing' and 'non-closing' actions in H5F_flush. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.8 (amazon) in debug mode Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 352f97c..0d163f6 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1032,6 +1032,11 @@ H5F_dest(H5F_t *f, hid_t dxpl_id)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
+ /* Shutdown the metadata cache */
+ if(H5AC_dest(f, dxpl_id))
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
+
/*
* Do not close the root group since we didn't count it, but free
* the memory associated with it.
@@ -1050,9 +1055,6 @@ H5F_dest(H5F_t *f, hid_t dxpl_id)
} /* end if */
/* Destroy other components of the file */
- if(H5AC_dest(f, dxpl_id))
- /* Push error, but keep going*/
- HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
if(H5F_accum_reset(f) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
@@ -1672,7 +1674,6 @@ done:
herr_t
H5F_flush_real(H5F_t *f, hid_t dxpl_id, hbool_t closing)
{
- unsigned H5AC_flags = H5AC__NO_FLAGS_SET; /* Flags for H5AC_flush() */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_flush_real, FAIL)
@@ -1709,18 +1710,17 @@ H5F_flush_real(H5F_t *f, hid_t dxpl_id, hbool_t closing)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file space")
} /* end else */
- /* Flush (and invalidate, if requested) the entire metadata cache */
if(closing) {
- H5AC_flags |= H5AC__FLUSH_INVALIDATE_FLAG;
-
/* Unpin the superblock, since we're about to destroy the cache */
if(H5AC_unpin_entry(f, f->shared->sblock) < 0)
- /* Push error, but keep going*/
- HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock")
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin superblock")
f->shared->sblock = NULL;
} /* end if */
- if(H5AC_flush(f, dxpl_id, H5AC_flags) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache")
+ else {
+ /* Flush the entire metadata cache */
+ if(H5AC_flush(f, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache")
+ } /* end else */
/* If we will be closing the file, we don't need to flush the accumulator info */
if(!closing) {