summaryrefslogtreecommitdiffstats
path: root/src/H5Gint.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-06-26 03:41:48 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-06-26 03:41:48 (GMT)
commit88c8c78763dcfc0e42906a1b07b117896f6f3dac (patch)
tree71a2a0c95f3f56ae5e1826ad0d411bca4682676c /src/H5Gint.c
parent35f8a064c505e46c438caae8aca01ab85974bca8 (diff)
downloadhdf5-88c8c78763dcfc0e42906a1b07b117896f6f3dac.zip
hdf5-88c8c78763dcfc0e42906a1b07b117896f6f3dac.tar.gz
hdf5-88c8c78763dcfc0e42906a1b07b117896f6f3dac.tar.bz2
[svn-r30108] Moved group flush and evict code to H5G_close from H5Gclose.
Diffstat (limited to 'src/H5Gint.c')
-rw-r--r--src/H5Gint.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/H5Gint.c b/src/H5Gint.c
index f5bccc3..ff92ecc 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -486,7 +486,7 @@ 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 */
+ /* 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)
@@ -500,6 +500,23 @@ H5G_close(H5G_t *grp)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't remove group from list of open objects")
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)) {
+// printf("EVICTING GROUP (TAG: 0x%3llx)\n", grp->oloc.addr);
+// printf("DUMPING CACHE - BEFORE FLUSH\n");
+// H5AC_dump_cache(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")
+// printf("DUMPING CACHE - BETWEEN FLUSH AND EVICT\n");
+// H5AC_dump_cache(grp->oloc.file);
+ 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")
+// printf("DUMPING CACHE - AFTER EVICT\n");
+// H5AC_dump_cache(grp->oloc.file);
+ } /* end if */
+
+ /* Free memory */
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
} else {
/* Decrement the ref. count for this object in the top file */