diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-14 13:39:36 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-14 13:39:36 (GMT) |
commit | 2f910f3fc770cfe9463bbdaa5a5c857e82acf324 (patch) | |
tree | 42cdaeded703853c3a94f0901d8ebdcf5fb96fcf /src/H5F.c | |
parent | 8a6d7d14f6f947dd4eacdfff6c86a23d8cb7be95 (diff) | |
download | hdf5-2f910f3fc770cfe9463bbdaa5a5c857e82acf324.zip hdf5-2f910f3fc770cfe9463bbdaa5a5c857e82acf324.tar.gz hdf5-2f910f3fc770cfe9463bbdaa5a5c857e82acf324.tar.bz2 |
[svn-r15863] Description:
Bring r15861 back from trunk to 1.8 release branch.
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.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -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") |