summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Ctag.c5
-rw-r--r--src/H5Fprivate.h3
-rw-r--r--src/H5Fquery.c28
-rw-r--r--src/H5Gint.c2
4 files changed, 34 insertions, 4 deletions
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index fb7ef53..33f7c22 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -465,11 +465,12 @@ H5C__evict_tagged_entries_cb(H5C_cache_entry_t *entry, void *_ctx)
entry and we'll loop back around again (as evicting other
entries will hopefully unpin this entry) */
ctx->pinned_entries_need_evicted = TRUE;
- else
+ else {
/* Evict the Entry */
if(H5C__flush_single_entry(ctx->f, ctx->dxpl_id, entry, H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, H5_ITER_ERROR, "Entry eviction failed.")
- ctx->evicted_entries_last_pass = TRUE;
+ ctx->evicted_entries_last_pass = TRUE;
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 2aac18f..ee8a845 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -305,6 +305,7 @@
#define H5F_FCPL(F) ((F)->shared->fcpl_id)
#define H5F_GET_FC_DEGREE(F) ((F)->shared->fc_degree)
#define H5F_EVICT_ON_CLOSE(F) ((F)->shared->evict_on_close)
+#define H5F_CLOSING(F) ((F)->closing)
#define H5F_RDCC_NSLOTS(F) ((F)->shared->rdcc_nslots)
#define H5F_RDCC_NBYTES(F) ((F)->shared->rdcc_nbytes)
#define H5F_RDCC_W0(F) ((F)->shared->rdcc_w0)
@@ -355,6 +356,7 @@
#define H5F_FCPL(F) (H5F_get_fcpl(F))
#define H5F_GET_FC_DEGREE(F) (H5F_get_fc_degree(F))
#define H5F_EVICT_ON_CLOSE(F) (H5F_get_evict_on_close(F))
+#define H5F_CLOSING(F) (H5F_get_closing(F))
#define H5F_RDCC_NSLOTS(F) (H5F_rdcc_nslots(F))
#define H5F_RDCC_NBYTES(F) (H5F_rdcc_nbytes(F))
#define H5F_RDCC_W0(F) (H5F_rdcc_w0(F))
@@ -684,6 +686,7 @@ H5_DLL herr_t H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes);
H5_DLL hid_t H5F_get_fcpl(const H5F_t *f);
H5_DLL H5F_close_degree_t H5F_get_fc_degree(const H5F_t *f);
H5_DLL hbool_t H5F_get_evict_on_close(const H5F_t *f);
+H5_DLL hbool_t H5F_get_closing(const H5F_t *f);
H5_DLL size_t H5F_rdcc_nbytes(const H5F_t *f);
H5_DLL size_t H5F_rdcc_nslots(const H5F_t *f);
H5_DLL double H5F_rdcc_w0(const H5F_t *f);
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index 7fcd0f1..2ffe766 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -860,7 +860,8 @@ H5F_get_fc_degree(const H5F_t *f)
/*-------------------------------------------------------------------------
* Function: H5F_get_evict_on_close
*
- * Purpose: Retrieve the 'file close degree' for the file.
+ * Purpose: Checks if evict-on-close is desired for objects in the
+ * file.
*
* Return: Success: Flag indicating whether the evict-on-close
* property was set for the file.
@@ -885,6 +886,31 @@ H5F_get_evict_on_close(const H5F_t *f)
/*-------------------------------------------------------------------------
+ * Function: H5F_get_closing
+ *
+ * Purpose: Checks if the file is in the process of being closed.
+ *
+ * Return: Success: Flag indicating whether the file is closing.
+ * Failure: (can't happen)
+ *
+ * Programmer: Dana Robinson
+ * Fall 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+hbool_t
+H5F_get_closing(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ HDassert(f);
+
+ FUNC_LEAVE_NOAPI(f->closing)
+} /* end H5F_get_closing() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_store_msg_crt_idx
*
* Purpose: Retrieve the 'store message creation index' flag for the file.
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 90c011a..95682d9 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -502,7 +502,7 @@ H5G_close(H5G_t *grp)
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(!H5F_CLOSING(grp->oloc.file) && 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)