summaryrefslogtreecommitdiffstats
path: root/src/H5G.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/H5G.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/H5G.c')
-rw-r--r--src/H5G.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/H5G.c b/src/H5G.c
index e4313fe..1955c33 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -715,29 +715,15 @@ done:
herr_t
H5Gclose(hid_t group_id)
{
- H5G_t *grp = NULL; /* Group */
- H5F_t *file = NULL; /* File */
- hbool_t evict = FALSE; /* Evict metadata on close? */
- haddr_t tag = HADDR_UNDEF; /* Metadata tag for evictions */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", group_id);
/* Check args */
- if(NULL == (grp = (H5G_t *)H5I_object_verify(group_id,H5I_GROUP)))
+ if(NULL == H5I_object_verify(group_id,H5I_GROUP))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
- /* Check if this is the last object reference and we'll be evicting
- * on close. We need to cache this info since it will be gone after the
- * decrement call frees the struct.
- */
- file = grp->oloc.file;
- if(1 == grp->shared->fo_count && H5F_EVICT_ON_CLOSE(file)) {
- evict = TRUE;
- tag = grp->oloc.addr;
- } /* end if */
-
/*
* Decrement the counter on the group atom. It will be freed if the count
* reaches zero.
@@ -745,20 +731,6 @@ H5Gclose(hid_t group_id)
if(H5I_dec_app_ref(group_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to close group")
- /* Clean up metadata in the metadata cache if evicting on close */
- if(evict && H5F_SHARED(file)) {
-// printf("DUMPING CACHE - BEFORE FLUSH\n");
-// H5AC_dump_cache(file);
- if(H5AC_flush_tagged_metadata(file, tag, 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(file);
- if(H5AC_evict_tagged_metadata(file, tag, 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(file);
- } /* end if */
-
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gclose() */