summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2005-01-20 22:40:37 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2005-01-20 22:40:37 (GMT)
commit3b90c189cad3762670f2228b87d1c533767bcbe1 (patch)
tree02fd78bfec2361cc05eac941e4b9f16edd618725 /src/H5AC.c
parent3d83546b364c38c29ee80613010047af7a168c4c (diff)
downloadhdf5-3b90c189cad3762670f2228b87d1c533767bcbe1.zip
hdf5-3b90c189cad3762670f2228b87d1c533767bcbe1.tar.gz
hdf5-3b90c189cad3762670f2228b87d1c533767bcbe1.tar.bz2
[svn-r9850] Purpose:
1) Provide facilities in cache to allow us to avoid a potential cache consistency bug in the parallel case. 2) Clean up a off by one sanity checking bug. 3) Turn off execution of long running tests in debug mode. Description: 1) In the parallel case, all writes to metadata must be collective, but reads may not be. In pricipal, this allows us to different contents in different caches. This isn't a problem as long as the correct data is always on disk, but unless we can force certain writes immediately, that need not be the case. 2) & 3) should need no further explanation. Solution: 1) Add code allowing us to mark cache entries, and then force these entries to be flushed at a later time. Note that to actually avoid the bug, we will have to modify existing code to use these new features. 2) & 3) should need no further explanation. Platforms tested: heping (serial debug and production) committest (copper, sol, and heping). test failed on heping in the c++ portion of the build, but at Quincey's siggestion, I am proceeding with the checkin. Misc. update:
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 125aaf0..0d75536 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -623,10 +623,18 @@ done:
* in H5C.c, and then re-wrote the function as a wrapper for
* H5C_insert_entry().
*
+ * JRM - 1/6/05
+ * Added the flags parameter. At present, this parameter is
+ * only used to set the new flush_marker field on the new
+ * entry. Since this doesn't apply to the SAP code, no change
+ * is needed there. Thus the only change to the body of the
+ * code is to pass the flags parameter through to
+ * H5C_insert_entry().
+ *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing)
+H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned int flags)
{
herr_t result;
H5AC_info_t *info;
@@ -727,7 +735,8 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *
cache,
type,
addr,
- thing);
+ thing,
+ flags);
if ( result < 0 ) {
@@ -1085,14 +1094,21 @@ done:
* Abstracted the guts of the function to H5C_unprotect()
* in H5C.c, and then re-wrote the function as a wrapper for
* H5C_unprotect().
+ *
+ * JRM - 1/6/05
+ * Replaced the deleted parameter with the new flags parameter.
+ * Since the deleted parameter is not used by the FPHDF5 code,
+ * the only change in the body is to replace the deleted
+ * parameter with the flags parameter in the call to
+ * H5C_unprotect().
*
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, hbool_t deleted)
+H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned int flags)
{
herr_t result;
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_unprotect, FAIL)
@@ -1133,6 +1149,15 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
* (deleted == TRUE), we need to send a request to the SAP
* telling it to remove that bit of metadata from its cache.
*/
+ /* the deleted parameter has been replaced with the flags
+ * parameter. The actual value of deleted is still passed
+ * in as a bit in flags. If it is needed, it can be extracted
+ * as follows:
+ *
+ * deleted = ( (flags & H5C__DELETED_FLAG) != 0 );
+ *
+ * JRM -- 1/6/05
+ */
if ( H5FP_request_release_lock(H5FD_fphdf5_file_id(lf), addr,
TRUE, &req_id, &status) < 0 )
HGOTO_ERROR(H5E_FPHDF5, H5E_CANTUNLOCK, FAIL, \
@@ -1173,7 +1198,7 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
type,
addr,
thing,
- deleted);
+ flags);
if ( result < 0 ) {