summaryrefslogtreecommitdiffstats
path: root/src/H5Gint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-06-13 17:49:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-06-13 17:49:39 (GMT)
commit7a9e13afdb134bafc070cf8bd2087a84fd0d2334 (patch)
treec16578adf13fb9312870afff86332ad190add859 /src/H5Gint.c
parent1db1d99883397d92dc6984841fecfc391c52676d (diff)
downloadhdf5-7a9e13afdb134bafc070cf8bd2087a84fd0d2334.zip
hdf5-7a9e13afdb134bafc070cf8bd2087a84fd0d2334.tar.gz
hdf5-7a9e13afdb134bafc070cf8bd2087a84fd0d2334.tar.bz2
[svn-r30068] Description:
Bring metadata cache corking to trunk. Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production (h5committest forthcoming)
Diffstat (limited to 'src/H5Gint.c')
-rw-r--r--src/H5Gint.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5Gint.c b/src/H5Gint.c
index c78c87c..f5bccc3 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -472,6 +472,7 @@ done:
herr_t
H5G_close(H5G_t *grp)
{
+ hbool_t corked; /* Whether the group is corked or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -485,6 +486,13 @@ H5G_close(H5G_t *grp)
if(0 == grp->shared->fo_count) {
HDassert(grp != H5G_rootof(H5G_fileof(grp)));
+ /* Uncork cache entries with object address tag */
+ if(H5AC_cork(grp->oloc.file, grp->oloc.addr, H5AC__GET_CORKED, &corked) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status")
+ if(corked)
+ if(H5AC_cork(grp->oloc.file, grp->oloc.addr, H5AC__UNCORK, NULL) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTUNCORK, FAIL, "unable to uncork an object")
+
/* Remove the group from the list of opened objects in the file */
if(H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")