summaryrefslogtreecommitdiffstats
path: root/src/H5B2test.c
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2005-06-24 06:30:29 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2005-06-24 06:30:29 (GMT)
commit7f8e3460261851cdad1e344d8929d2817e3149ad (patch)
tree760d0e8dd581c4d4245a7e8acf51254f0c29d1ad /src/H5B2test.c
parent2ab6b12b552e9260e2e76640a788b5a3744c6a9f (diff)
downloadhdf5-7f8e3460261851cdad1e344d8929d2817e3149ad.zip
hdf5-7f8e3460261851cdad1e344d8929d2817e3149ad.tar.gz
hdf5-7f8e3460261851cdad1e344d8929d2817e3149ad.tar.bz2
[svn-r10978] Purpose:
Interim checkin of code changes moving management of the is_dirty flag into the cache code. Description: Prior to this checkin, management of the is_dirty flag was handled above the level of the metadata cache. This can no longer be allowed, as it introduces a race condition in the proposed fix for a cache coherency bug in PHDF5. Solution: Move management fo the is_dirty flag to the cache code proper. Entries are now marked as dirty via a flag on the unprotect call. Platforms tested: h5committested Misc. update:
Diffstat (limited to 'src/H5B2test.c')
-rw-r--r--src/H5B2test.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/H5B2test.c b/src/H5B2test.c
index cac5e30..5469e5d 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -228,12 +228,18 @@ H5B2_test_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dxpl_id, int i
*
* Modifications:
*
+ * John Mainzer, 6/17/05
+ * Modified the function to use the new dirtied parameter of
+ * of H5AC_unprotect() instead of modifying the is_dirty
+ * field of the cache info.
+ *
*-------------------------------------------------------------------------
*/
herr_t
H5B2_get_root_addr(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
haddr_t addr, haddr_t *root_addr)
{
+ hbool_t bt2_dirtied = FALSE;
H5B2_t *bt2=NULL; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED;
@@ -254,7 +260,7 @@ H5B2_get_root_addr(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type,
done:
/* Release B-tree header node */
- if (bt2 && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, bt2, H5AC__NO_FLAGS_SET) < 0)
+ if (bt2 && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, bt2, bt2_dirtied, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree header info")
FUNC_LEAVE_NOAPI(ret_value)