summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-10-14 13:16:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-10-14 13:16:25 (GMT)
commit22cd1b61cc33d61a705b369f81649b7180ec27a5 (patch)
treea3146c86c11cd99e13e3855e8157fdbeb62fa3d6 /src/H5F.c
parentc9d37a8e3f4fe142f6beee0a1117d9904659456d (diff)
downloadhdf5-22cd1b61cc33d61a705b369f81649b7180ec27a5.zip
hdf5-22cd1b61cc33d61a705b369f81649b7180ec27a5.tar.gz
hdf5-22cd1b61cc33d61a705b369f81649b7180ec27a5.tar.bz2
[svn-r15861] Description:
Various bug fixes & cleanups with VFDs and file free space changes, along with cleaning up compiler warnings. Enable more VFDs (for 'make check-vfd' testing) for many tests. Tested on: Mac OS X/32 10.5.5 (amazon) in debug mode Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode 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
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/H5F.c b/src/H5F.c
index f7c0022..327f934 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1139,8 +1139,6 @@ H5F_dest(H5F_t *f, hid_t dxpl_id)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_dest() */
-
-
/*-------------------------------------------------------------------------
* Function: H5F_open
@@ -1796,13 +1794,6 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file free space info")
} /* end if */
- /* flush (and invalidate, if requested) the entire metadata cache */
- H5AC_flags = 0;
- if((flags & H5F_FLUSH_INVALIDATE) != 0 )
- H5AC_flags |= H5AC__FLUSH_INVALIDATE_FLAG;
- if(H5AC_flush(f, dxpl_id, H5AC_flags) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache")
-
/* Truncate the file to the current allocated size */
/* (needs to happen before superblock write, since the 'eoa' value is
* written in superblock -QAK)
@@ -1811,9 +1802,19 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level truncate failed")
/* Write the superblock to disk */
- if(H5F_super_write(f, dxpl_id) != SUCCEED)
+ /* (needs to happen before metadata flush (H5AC_flush), since the information
+ * in the superblock extension may be updated - 2008/10/14, QAK)
+ */
+ if(H5F_super_write(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_WRITEERROR, FAIL, "unable to write superblock to file")
+ /* Flush (and invalidate, if requested) the entire metadata cache */
+ H5AC_flags = 0;
+ if((flags & H5F_FLUSH_INVALIDATE) != 0 )
+ H5AC_flags |= H5AC__FLUSH_INVALIDATE_FLAG;
+ if(H5AC_flush(f, dxpl_id, H5AC_flags) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache")
+
/* Flush out the metadata accumulator */
if(H5F_accum_flush(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush metadata accumulator")