summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-01-06 15:51:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-01-06 15:51:40 (GMT)
commit7568dcaf151bfaa7d529ec69c57a814682bf69c1 (patch)
tree8eb57a504162d9105265e9c608ac9321c46d3320 /src
parent0f9c6ce80e0567ec6419fb434589531cda3442cc (diff)
downloadhdf5-7568dcaf151bfaa7d529ec69c57a814682bf69c1.zip
hdf5-7568dcaf151bfaa7d529ec69c57a814682bf69c1.tar.gz
hdf5-7568dcaf151bfaa7d529ec69c57a814682bf69c1.tar.bz2
Add "image up to date" flag / parameter to metadata cache entry status calls.
Diffstat (limited to 'src')
-rw-r--r--src/H5AC.c5
-rw-r--r--src/H5ACmpio.c2
-rw-r--r--src/H5ACprivate.h1
-rw-r--r--src/H5Cprivate.h3
-rw-r--r--src/H5Cquery.c5
5 files changed, 12 insertions, 4 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 6449584..2b7c871 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -834,6 +834,7 @@ H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status)
hbool_t is_corked;
hbool_t is_flush_dep_child; /* Entry @ addr is in the cache and is a flush dependency child */
hbool_t is_flush_dep_parent; /* Entry @ addr is in the cache and is a flush dependency parent */
+ hbool_t image_is_up_to_date; /* Entry @ addr is in the cache and has an up to date image */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -842,7 +843,7 @@ H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry.")
if(H5C_get_entry_status(f, addr, NULL, &in_cache, &is_dirty,
- &is_protected, &is_pinned, &is_corked, &is_flush_dep_parent, &is_flush_dep_child) < 0)
+ &is_protected, &is_pinned, &is_corked, &is_flush_dep_parent, &is_flush_dep_child, &image_is_up_to_date) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_status() failed.")
if(in_cache) {
@@ -859,6 +860,8 @@ H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned *status)
*status |= H5AC_ES__IS_FLUSH_DEP_PARENT;
if(is_flush_dep_child)
*status |= H5AC_ES__IS_FLUSH_DEP_CHILD;
+ if(image_is_up_to_date)
+ *status |= H5AC_ES__IMAGE_IS_UP_TO_DATE;
} /* end if */
else
*status = 0;
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index 570783a..44ffd9d 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -1071,7 +1071,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
/* get entry status, size, etc here */
if(H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache,
- &entry_dirty, NULL, NULL, NULL, NULL, NULL) < 0)
+ &entry_dirty, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get entry status.")
if(!entry_in_cache)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "entry not in cache.")
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 96f23cb..fa7407a 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -354,6 +354,7 @@ H5_DLLVAR hid_t H5AC_rawdata_dxpl_id;
#define H5AC_ES__IS_FLUSH_DEP_PARENT 0x0010
#define H5AC_ES__IS_FLUSH_DEP_CHILD 0x0020
#define H5AC_ES__IS_CORKED 0x0040
+#define H5AC_ES__IMAGE_IS_UP_TO_DATE 0x0080
/* external function declarations: */
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 3b9634f..9d8f0d4 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -1761,7 +1761,8 @@ H5_DLL herr_t H5C_get_cache_hit_rate(H5C_t *cache_ptr, double *hit_rate_ptr);
H5_DLL herr_t H5C_get_entry_status(const H5F_t *f, haddr_t addr,
size_t *size_ptr, hbool_t *in_cache_ptr, hbool_t *is_dirty_ptr,
hbool_t *is_protected_ptr, hbool_t *is_pinned_ptr, hbool_t *is_corked_ptr,
- hbool_t *is_flush_dep_parent_ptr, hbool_t *is_flush_dep_child_ptr);
+ hbool_t *is_flush_dep_parent_ptr, hbool_t *is_flush_dep_child_ptr,
+ hbool_t *image_up_to_date_ptr);
H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t *cache_ptr, hbool_t *evictions_enabled_ptr);
H5_DLL void * H5C_get_aux_ptr(const H5C_t *cache_ptr);
H5_DLL FILE *H5C_get_trace_file_ptr(const H5C_t *cache_ptr);
diff --git a/src/H5Cquery.c b/src/H5Cquery.c
index be0d4fa..f5409f7 100644
--- a/src/H5Cquery.c
+++ b/src/H5Cquery.c
@@ -231,7 +231,8 @@ H5C_get_entry_status(const H5F_t *f,
hbool_t * is_pinned_ptr,
hbool_t * is_corked_ptr,
hbool_t * is_flush_dep_parent_ptr,
- hbool_t * is_flush_dep_child_ptr)
+ hbool_t * is_flush_dep_child_ptr,
+ hbool_t * image_up_to_date_ptr)
{
H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = NULL;
@@ -280,6 +281,8 @@ H5C_get_entry_status(const H5F_t *f,
*is_flush_dep_parent_ptr = (entry_ptr->flush_dep_nchildren > 0);
if(is_flush_dep_child_ptr != NULL)
*is_flush_dep_child_ptr = (entry_ptr->flush_dep_nparents > 0);
+ if(image_up_to_date_ptr != NULL )
+ *image_up_to_date_ptr = entry_ptr->image_up_to_date;
} /* end else */
done: