summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-10-28 19:58:18 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-10-28 19:58:18 (GMT)
commitde3abdf5d741393527e6ff1d0597a478250fab70 (patch)
tree3e9f5e560e39c902a9ae990bcb2d61f13b4e72b2 /src
parent04b99c0c66ede0ac5b3e22f38e9277f9a916d010 (diff)
downloadhdf5-de3abdf5d741393527e6ff1d0597a478250fab70.zip
hdf5-de3abdf5d741393527e6ff1d0597a478250fab70.tar.gz
hdf5-de3abdf5d741393527e6ff1d0597a478250fab70.tar.bz2
Evict-on-close now works with groups.
test/evict_on_close.c has been updated to generate groups but does not yet check EoC works correctly.
Diffstat (limited to 'src')
-rw-r--r--src/H5Gint.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5Gint.c b/src/H5Gint.c
index a0e06f3..90c011a 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -501,6 +501,14 @@ H5G_close(H5G_t *grp)
if(H5O_close(&(grp->oloc)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
+ /* Evict group metadata if evicting on close */
+ if(H5F_SHARED(grp->oloc.file) && H5F_EVICT_ON_CLOSE(grp->oloc.file)) {
+ if(H5AC_flush_tagged_metadata(grp->oloc.file, grp->oloc.addr, H5AC_ind_read_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata")
+ if(H5AC_evict_tagged_metadata(grp->oloc.file, grp->oloc.addr, FALSE, H5AC_ind_read_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict tagged metadata")
+ } /* end if */
+
/* Free memory */
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
} else {