summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-03-10 02:56:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-03-10 02:56:55 (GMT)
commitc956c2f03ba66056270413a82f78fbddd987b356 (patch)
treee635a02296485f18c4ad6252450a218f8adf5385 /src
parent0ff7a2d6e8ac0ddb691cef116027014b60db62f2 (diff)
downloadhdf5-c956c2f03ba66056270413a82f78fbddd987b356.zip
hdf5-c956c2f03ba66056270413a82f78fbddd987b356.tar.gz
hdf5-c956c2f03ba66056270413a82f78fbddd987b356.tar.bz2
[svn-r20219] Description:
Tell the VFL flush call that the file will be closing, allowing the VFDs to avoid sync'ing the file (particularly valuable in parallel). 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 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) 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, w/threadsafe, in production mode Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Diffstat (limited to 'src')
-rw-r--r--src/H5F.c10
-rw-r--r--src/H5Fmount.c2
-rw-r--r--src/H5Fpkg.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/H5F.c b/src/H5F.c
index f84dea2..21b9a19 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1006,7 +1006,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
* the caller requested a flush.
*/
if((f->shared->flags & H5F_ACC_RDWR) && flush)
- if(H5F_flush(f, dxpl_id) < 0)
+ if(H5F_flush(f, dxpl_id, TRUE) < 0)
HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
/* Release the external file cache */
@@ -1657,7 +1657,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope)
} /* end if */
else {
/* Call the flush routine, for this file */
- if(H5F_flush(f, H5AC_dxpl_id) < 0)
+ if(H5F_flush(f, H5AC_dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information")
} /* end else */
} /* end if */
@@ -1681,7 +1681,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_flush(H5F_t *f, hid_t dxpl_id)
+H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1716,7 +1716,7 @@ H5F_flush(H5F_t *f, hid_t dxpl_id)
HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush metadata accumulator")
/* Flush file buffers to disk. */
- if(H5FD_flush(f->shared->lf, dxpl_id, FALSE) < 0)
+ if(H5FD_flush(f->shared->lf, dxpl_id, closing) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed")
@@ -1990,7 +1990,7 @@ H5Fclose(hid_t file_id)
if((nref = H5I_get_ref(file_id, FALSE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get ID ref count")
if(nref == 1)
- if(H5F_flush(f, H5AC_dxpl_id) < 0)
+ if(H5F_flush(f, H5AC_dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
} /* end if */
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index 40be54c..d04e747 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -659,7 +659,7 @@ H5F_flush_mounts_recurse(H5F_t *f, hid_t dxpl_id)
nerrors++;
/* Call the "real" flush routine, for this file */
- if(H5F_flush(f, dxpl_id) < 0)
+ if(H5F_flush(f, dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information")
/* Check flush errors for children - errors are already on the stack */
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index f63fa98..837458e 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -297,7 +297,7 @@ H5_DLLVAR const H5AC_class_t H5AC_SUPERBLOCK[1];
/* General routines */
H5_DLL herr_t H5F_init(void);
H5_DLL haddr_t H5F_locate_signature(H5FD_t *file, hid_t dxpl_id);
-H5_DLL herr_t H5F_flush(H5F_t *f, hid_t dxpl_id);
+H5_DLL herr_t H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing);
/* File mount related routines */
H5_DLL herr_t H5F_close_mounts(H5F_t *f);