summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-01-26 15:15:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-01-26 15:15:36 (GMT)
commit24e0562529d9436f29b2b79f303f03c031f7490a (patch)
treee9182a7e067f8562d25b17262a5028466e77ad0c
parentd546d568964e085cec3add0e9a990a19f9f84f1e (diff)
downloadhdf5-24e0562529d9436f29b2b79f303f03c031f7490a.zip
hdf5-24e0562529d9436f29b2b79f303f03c031f7490a.tar.gz
hdf5-24e0562529d9436f29b2b79f303f03c031f7490a.tar.bz2
[svn-r18169] Description:
Converge changes on metadata_journaling branch and trunk: - Remove H5F_t* parameter from H5HL_unprotect() - Remove H5F_t* parameter from H5HL_dirty() - Remove H5F_t* parameter from H5O_unprotect() - Bring changes to metadata caching routines back: - H5AC_pin_protected_entry() - H5AC_resize_pinned_entry() - H5AC_unpin_entry() - H5AC_mark_pinned_entry_dirty() - H5AC_mark_pinned_or_protected_entry_dirty() - Revise internal H5C routines to drop H5F_t* and/or H5C_t* as parameter where possible - Revise tests to follow internal routine changes Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
-rw-r--r--src/H5AC.c491
-rw-r--r--src/H5ACprivate.h24
-rw-r--r--src/H5C.c382
-rw-r--r--src/H5Cprivate.h40
-rw-r--r--src/H5Dint.c12
-rw-r--r--src/H5FS.c8
-rw-r--r--src/H5FScache.c4
-rw-r--r--src/H5FSsection.c22
-rw-r--r--src/H5Gnode.c4
-rw-r--r--src/H5Gobj.c4
-rw-r--r--src/H5Gstab.c20
-rw-r--r--src/H5HFhdr.c6
-rw-r--r--src/H5HFiblock.c6
-rw-r--r--src/H5HL.c32
-rw-r--r--src/H5HLcache.c14
-rw-r--r--src/H5HLdbg.c2
-rw-r--r--src/H5HLint.c4
-rw-r--r--src/H5HLpkg.h2
-rw-r--r--src/H5HLprivate.h2
-rw-r--r--src/H5O.c11
-rw-r--r--src/H5Oalloc.c2
-rw-r--r--src/H5Oefl.c6
-rw-r--r--src/H5Omessage.c4
-rw-r--r--src/H5Oprivate.h2
-rw-r--r--test/cache.c2296
-rw-r--r--test/cache_api.c15
-rw-r--r--test/cache_common.c793
-rw-r--r--test/cache_common.h63
-rw-r--r--test/lheap.c4
-rw-r--r--testpar/t_cache.c83
30 files changed, 2217 insertions, 2141 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 2046822..d25fd66 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -154,8 +154,7 @@ static herr_t H5AC_log_deleted_entry(H5AC_t * cache_ptr,
haddr_t addr,
unsigned int flags);
-static herr_t H5AC_log_dirtied_entry(H5AC_t * cache_ptr,
- H5C_cache_entry_t * entry_ptr,
+static herr_t H5AC_log_dirtied_entry(const H5C_cache_entry_t *entry_ptr,
haddr_t addr,
hbool_t size_changed,
size_t new_size);
@@ -190,7 +189,7 @@ static herr_t H5AC_receive_and_apply_clean_list(H5F_t * f,
hid_t secondary_dxpl_id,
H5AC_t * cache_ptr);
-static herr_t H5AC_log_renamed_entry(H5AC_t * cache_ptr,
+static herr_t H5AC_log_renamed_entry(const H5F_t * f,
haddr_t old_addr,
haddr_t new_addr);
#endif /* H5_HAVE_PARALLEL */
@@ -733,25 +732,6 @@ done:
* matzke@llnl.gov
* Jul 9 1997
*
- * Modifications:
- *
- * Complete re-design and re-write to support the re-designed
- * metadata cache.
- * JRM - 5/12/04
- *
- * Abstracted the guts of the function to H5C_dest() in H5C.c,
- * and then re-wrote the function as a wrapper for H5C_dest().
- *
- * JRM - 6/7/04
- *
- * Added code to free the auxiliary structure and its
- * associated slist if present.
- * JRM - 6/28/05
- *
- * Added code to close the trace file if it is present.
- *
- * JRM - 6/8/06
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -785,7 +765,7 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
}
#endif /* H5AC__TRACE_FILE_ENABLED */
- if ( H5C_dest(f, dxpl_id, H5AC_noblock_dxpl_id, cache) < 0 ) {
+ if ( H5C_dest(f, dxpl_id, H5AC_noblock_dxpl_id) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't destroy cache")
}
@@ -844,7 +824,6 @@ H5AC_expunge_entry(H5F_t *f,
{
herr_t result;
herr_t ret_value=SUCCEED; /* Return value */
- H5AC_t * cache_ptr = NULL;
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
@@ -860,9 +839,11 @@ H5AC_expunge_entry(H5F_t *f,
HDassert(type->dest);
HDassert(H5F_addr_defined(addr));
- cache_ptr = f->shared->cache;
-
#if H5AC__TRACE_FILE_ENABLED
+{
+ H5AC_t * cache_ptr = f->shared->cache;
+
+
/* For the expunge entry call, only the addr, and type id are really
* necessary in the trace file. Write the return value to catch occult
* errors.
@@ -875,12 +856,12 @@ H5AC_expunge_entry(H5F_t *f,
(unsigned long)addr,
(int)(type->id));
}
+}
#endif /* H5AC__TRACE_FILE_ENABLED */
result = H5C_expunge_entry(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- cache_ptr,
type,
addr);
@@ -1059,7 +1040,6 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id, unsigned flags)
status = H5C_flush_cache(f,
H5AC_noblock_dxpl_id,
H5AC_noblock_dxpl_id,
- f->shared->cache,
init_flush_flags);
aux_ptr->write_permitted = FALSE;
@@ -1086,7 +1066,6 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id, unsigned flags)
status = H5C_flush_cache(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- f->shared->cache,
flags);
if ( status < 0 ) {
@@ -1133,14 +1112,12 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
-H5AC_get_entry_status(H5F_t * f,
+H5AC_get_entry_status(const H5F_t *f,
haddr_t addr,
unsigned * status_ptr)
{
H5C_t *cache_ptr = f->shared->cache;
- herr_t ret_value = SUCCEED; /* Return value */
herr_t result;
hbool_t in_cache;
hbool_t is_dirty;
@@ -1148,6 +1125,7 @@ H5AC_get_entry_status(H5F_t * f,
hbool_t is_pinned;
size_t entry_size;
unsigned status = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_get_entry_status, FAIL)
@@ -1159,7 +1137,7 @@ H5AC_get_entry_status(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry.")
}
- result = H5C_get_entry_status(cache_ptr, addr, &entry_size, &in_cache,
+ result = H5C_get_entry_status(f, addr, &entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -1260,7 +1238,6 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *
{
herr_t result;
H5AC_info_t *info;
- H5AC_t *cache;
herr_t ret_value=SUCCEED; /* Return value */
#ifdef H5_HAVE_PARALLEL
H5AC_aux_t * aux_ptr = NULL;
@@ -1303,7 +1280,6 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *
#endif /* H5AC__TRACE_FILE_ENABLED */
/* Get local copy of this information */
- cache = f->shared->cache;
info = (H5AC_info_t *)thing;
info->addr = addr;
@@ -1330,7 +1306,6 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *
result = H5C_insert_entry(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- cache,
type,
addr,
thing,
@@ -1395,109 +1370,66 @@ done:
* Programmer: John Mainzer
* 4/11/06
*
- * Modifications:
- *
- * Added trace file support. JRM -- 6/6/06
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_mark_pinned_entry_dirty(H5F_t * f,
- void * thing,
- hbool_t size_changed,
- size_t new_size)
+H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
{
- H5C_t *cache_ptr = f->shared->cache;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_mark_pinned_entry_dirty, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__TRACE_FILE_ENABLED
/* For the mark pinned entry dirty call, only the addr, size_changed,
* and new_size are really necessary in the trace file. Write the result
* to catch occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_mark_pinned_entry_dirty 0x%lx %d %d",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s 0x%lx %d %d", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr),
(int)size_changed,
(int)new_size);
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
+{
+ H5AC_info_t *entry_ptr = (H5AC_info_t *)thing;
+ H5C_t *cache_ptr = entry_ptr->cache_ptr;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- if ( ( ((H5AC_info_t *)thing)->is_dirty == FALSE ) &&
- ( NULL != cache_ptr->aux_ptr) ) {
-
- H5AC_info_t * entry_ptr;
-
- HDassert( ( size_changed == TRUE ) || ( size_changed == FALSE ) );
-
- entry_ptr = (H5AC_info_t *)thing;
-
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "Entry isn't pinned??")
- }
-
- if ( entry_ptr->is_protected ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "Entry is protected??")
- }
-
- result = H5AC_log_dirtied_entry(cache_ptr,
- entry_ptr,
- entry_ptr->addr,
- size_changed,
- new_size);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( result < 0 ) {
+ if((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) {
+ /* Check for usage errors */
+ if(!entry_ptr->is_pinned)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry isn't pinned??")
+ if(entry_ptr->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is protected??")
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5AC_log_dirtied_entry() failed.")
- }
- }
+ if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, size_changed, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
+ } /* end if */
+}
#endif /* H5_HAVE_PARALLEL */
- result = H5C_mark_pinned_entry_dirty(cache_ptr,
- thing,
- size_changed,
- new_size);
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5C_mark_pinned_entry_dirty() failed.")
-
- }
+ if(H5C_mark_pinned_entry_dirty(thing, size_changed, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned entry dirty")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ if(trace_file_ptr)
HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_mark_pinned_entry_dirty() */
@@ -1515,92 +1447,59 @@ done:
* Programmer: John Mainzer
* 5/16/06
*
- * Modifications:
- *
- * Added trace file support. JRM -- 6/6/06
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_mark_pinned_or_protected_entry_dirty(H5F_t * f,
- void * thing)
+H5AC_mark_pinned_or_protected_entry_dirty(void *thing)
{
- H5C_t * cache_ptr = f->shared->cache;
-#ifdef H5_HAVE_PARALLEL
- H5AC_info_t * info_ptr;
-#endif /* H5_HAVE_PARALLEL */
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_mark_pinned_or_protected_entry_dirty, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__TRACE_FILE_ENABLED
/* For the mark pinned or protected entry dirty call, only the addr
* is really necessary in the trace file. Write the result to catch
* occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_mark_pinned_or_protected_entry_dirty %lx",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s %lx", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
+{
+ H5AC_info_t *entry_ptr = (H5AC_info_t *)thing;
+ H5C_t *cache_ptr = entry_ptr->cache_ptr;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- info_ptr = (H5AC_info_t *)thing;
-
- if ( ( info_ptr->is_dirty == FALSE ) &&
- ( ! ( info_ptr->is_protected ) ) &&
- ( info_ptr->is_pinned ) &&
- ( NULL != cache_ptr->aux_ptr) ) {
-
- result = H5AC_log_dirtied_entry(cache_ptr,
- info_ptr,
- info_ptr->addr,
- FALSE,
- 0);
-
- if ( result < 0 ) {
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5AC_log_dirtied_entry() failed.")
- }
- }
+ if((!entry_ptr->is_dirty) && (!entry_ptr->is_protected) &&
+ (entry_ptr->is_pinned) && (NULL != cache_ptr->aux_ptr)) {
+ if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, FALSE, 0) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
+ } /* end if */
+}
#endif /* H5_HAVE_PARALLEL */
- result = H5C_mark_pinned_or_protected_entry_dirty(cache_ptr, thing);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5C_mark_pinned_entry_dirty() failed.")
-
- }
+ if(H5C_mark_pinned_or_protected_entry_dirty(thing) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned or protected entry dirty")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ if(trace_file_ptr)
HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_mark_pinned_entry_dirty() */
@@ -1691,16 +1590,8 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_ad
#ifdef H5_HAVE_PARALLEL
if ( NULL != (aux_ptr = f->shared->cache->aux_ptr) ) {
-
- result = H5AC_log_renamed_entry(f->shared->cache,
- old_addr,
- new_addr);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5AC_log_renamed_entry() failed.")
- }
+ if(H5AC_log_renamed_entry(f, old_addr, new_addr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log renamed entry")
}
#endif /* H5_HAVE_PARALLEL */
@@ -1756,60 +1647,42 @@ done:
* Programmer: John Mainzer
* 4/27/06
*
- * Modifications:
- *
- * Added trace file support. 6/6/06
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_pin_protected_entry(H5F_t * f,
- void * thing)
+H5AC_pin_protected_entry(void *thing)
{
- H5C_t *cache_ptr = f->shared->cache;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_pin_protected_entry, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__TRACE_FILE_ENABLED
/* For the pin protected entry call, only the addr is really necessary
* in the trace file. Also write the result to catch occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_pin_protected_entry %lx",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s %lx", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
- result = H5C_pin_protected_entry(cache_ptr, thing);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, \
- "H5C_pin_protected_entry() failed.")
- }
+ if(H5C_pin_protected_entry(thing) < 0 )
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "can't pin entry")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ if(trace_file_ptr)
HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_pin_protected_entry() */
@@ -1959,7 +1832,6 @@ H5AC_protect(H5F_t *f,
thing = H5C_protect(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- f->shared->cache,
type,
addr,
udata1,
@@ -2009,104 +1881,65 @@ done:
* Programmer: John Mainzer
* 7/5/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_resize_pinned_entry(H5F_t * f,
- void * thing,
- size_t new_size)
+H5AC_resize_pinned_entry(void *thing, size_t new_size)
{
- H5C_t *cache_ptr = f->shared->cache;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_resize_pinned_entry, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__TRACE_FILE_ENABLED
/* For the resize pinned entry call, only the addr, and new_size are
* really necessary in the trace file. Write the result to catch
* occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_resize_pinned_entry 0x%lx %d",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s 0x%lx %d", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr),
(int)new_size);
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
+{
+ H5AC_info_t * entry_ptr = (H5AC_info_t *)thing;
+ H5C_t *cache_ptr = entry_ptr->cache_ptr;
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- if ( ( ((H5AC_info_t *)thing)->is_dirty == FALSE ) &&
- ( NULL != cache_ptr->aux_ptr) ) {
-
- H5AC_info_t * entry_ptr;
-
- entry_ptr = (H5AC_info_t *)thing;
-
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "Entry isn't pinned??")
- }
-
- if ( entry_ptr->is_protected ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "Entry is protected??")
- }
-
- result = H5AC_log_dirtied_entry(cache_ptr,
- entry_ptr,
- entry_ptr->addr,
- TRUE,
- new_size);
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( result < 0 ) {
+ if((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) {
+ /* Check for usage errors */
+ if(!entry_ptr->is_pinned)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry isn't pinned??")
+ if(entry_ptr->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry is protected??")
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "H5AC_log_dirtied_entry() failed.")
- }
- }
+ if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, TRUE, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
+ } /* end if */
+}
#endif /* H5_HAVE_PARALLEL */
- result = H5C_resize_pinned_entry(cache_ptr,
- thing,
- new_size);
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "H5C_resize_pinned_entry() failed.")
-
- }
+ if(H5C_resize_pinned_entry(thing, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "can't resize entry")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ if(trace_file_ptr)
HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_resize_pinned_entry() */
@@ -2121,59 +1954,42 @@ done:
* Programmer: John Mainzer
* 4/11/06
*
- * Modifications:
- *
- * Added code supporting the trace file. JRM -- 6/7/06
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_unpin_entry(H5F_t * f,
- void * thing)
+H5AC_unpin_entry(void * thing)
{
- H5C_t *cache_ptr = f->shared->cache;
- herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_unpin_entry, FAIL)
+ /* Sanity check */
+ HDassert(thing);
+
#if H5AC__TRACE_FILE_ENABLED
/* For the unpin entry call, only the addr is really necessary
* in the trace file. Also write the result to catch occult errors.
*/
- if ( ( f != NULL ) &&
- ( f->shared != NULL ) &&
- ( f->shared->cache != NULL ) &&
- ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
- ( trace_file_ptr != NULL ) ) {
-
- sprintf(trace, "H5AC_unpin_entry %lx",
+ if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
+ (NULL != trace_file_ptr))
+ sprintf(trace, "%s %lx", FUNC,
(unsigned long)(((H5C_cache_entry_t *)thing)->addr));
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
- result = H5C_unpin_entry(cache_ptr, thing);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "H5C_unpin_entry() failed.")
- }
+ if(H5C_unpin_entry(thing) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "can't unpin entry")
done:
-
#if H5AC__TRACE_FILE_ENABLED
- if ( trace_file_ptr != NULL ) {
-
+ if(trace_file_ptr)
HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
- }
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5AC_unpin_entry() */
@@ -2345,18 +2161,8 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
#ifdef H5_HAVE_PARALLEL
if ( ( dirtied ) && ( ((H5AC_info_t *)thing)->is_dirty == FALSE ) &&
( NULL != (aux_ptr = f->shared->cache->aux_ptr) ) ) {
-
- result = H5AC_log_dirtied_entry(f->shared->cache,
- (H5AC_info_t *)thing,
- addr,
- size_changed,
- new_size);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5AC_log_dirtied_entry() failed.")
- }
+ if(H5AC_log_dirtied_entry((H5AC_info_t *)thing, addr, size_changed, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log dirtied entry")
}
if ( ( (flags & H5C__DELETED_FLAG) != 0 ) &&
@@ -2379,7 +2185,6 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
result = H5C_unprotect(f,
dxpl_id,
H5AC_noblock_dxpl_id,
- f->shared->cache,
type,
addr,
thing,
@@ -2555,7 +2360,7 @@ done:
*/
herr_t
-H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
+H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
H5AC_cache_config_t *config_ptr)
{
herr_t result;
@@ -2587,7 +2392,7 @@ H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
}
- result = H5C_get_cache_auto_resize_config((H5C_t *)cache_ptr,
+ result = H5C_get_cache_auto_resize_config((const H5C_t *)cache_ptr,
&internal_config);
if ( result < 0 ) {
@@ -2596,7 +2401,7 @@ H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
"H5C_get_cache_auto_resize_config() failed.")
}
- result = H5C_get_evictions_enabled((H5C_t *)cache_ptr, &evictions_enabled);
+ result = H5C_get_evictions_enabled((const H5C_t *)cache_ptr, &evictions_enabled);
if ( result < 0 ) {
@@ -2832,10 +2637,9 @@ done:
*/
herr_t
-H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
+H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
H5AC_cache_config_t *config_ptr)
{
- /* const char * fcn_name = "H5AC_set_cache_auto_resize_config"; */
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
H5C_auto_size_ctl_t internal_config;
@@ -2846,6 +2650,8 @@ H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
FUNC_ENTER_NOAPI(H5AC_set_cache_auto_resize_config, FAIL)
+ HDassert( cache_ptr );
+
#if H5AC__TRACE_FILE_ENABLED
/* Make note of the new configuration. Don't look up the trace file
* pointer, as that may change before we use it.
@@ -2936,30 +2742,14 @@ H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
}
}
- if ( H5AC_ext_config_2_int_config(config_ptr, &internal_config) !=
- SUCCEED ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC_ext_config_2_int_config() failed.")
- }
-
- result = H5C_set_cache_auto_resize_config((H5C_t *)cache_ptr,
- &internal_config);
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_set_cache_auto_resize_config() failed.")
- }
-
+ if(H5AC_ext_config_2_int_config(config_ptr, &internal_config) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_ext_config_2_int_config() failed.")
- result = H5C_set_evictions_enabled((H5C_t *)cache_ptr,
- config_ptr->evictions_enabled);
-
- if ( result < 0 ) {
+ if(H5C_set_cache_auto_resize_config(cache_ptr, &internal_config) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_cache_auto_resize_config() failed.")
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5C_set_evictions_enabled() failed.")
- }
+ if(H5C_set_evictions_enabled(cache_ptr, config_ptr->evictions_enabled) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_set_evictions_enabled() failed.")
#ifdef H5_HAVE_PARALLEL
if ( cache_ptr->aux_ptr != NULL ) {
@@ -3830,26 +3620,28 @@ done:
*
* Programmer: John Mainzer, 6/29/05
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_dirtied_entry(H5AC_t * cache_ptr,
- H5AC_info_t * entry_ptr,
+H5AC_log_dirtied_entry(const H5AC_info_t * entry_ptr,
haddr_t addr,
hbool_t size_changed,
size_t new_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
size_t entry_size;
- H5AC_aux_t * aux_ptr = NULL;
- H5AC_slist_entry_t * slist_entry_ptr = NULL;
+ H5AC_t * cache_ptr;
+ H5AC_aux_t * aux_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_log_dirtied_entry, FAIL)
+ HDassert( entry_ptr != NULL );
+ HDassert( entry_ptr->addr == addr );
+ HDassert( entry_ptr->is_dirty == FALSE );
+
+ cache_ptr = entry_ptr->cache_ptr;
+
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
@@ -3858,10 +3650,6 @@ H5AC_log_dirtied_entry(H5AC_t * cache_ptr,
HDassert( aux_ptr != NULL );
HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
- HDassert( entry_ptr != NULL );
- HDassert( entry_ptr->addr == addr );
- HDassert( entry_ptr->is_dirty == FALSE );
-
if ( size_changed ) {
entry_size = new_size;
@@ -3872,6 +3660,7 @@ H5AC_log_dirtied_entry(H5AC_t * cache_ptr,
}
if ( aux_ptr->mpi_rank == 0 ) {
+ H5AC_slist_entry_t * slist_entry_ptr;
HDassert( aux_ptr->d_slist_ptr != NULL );
HDassert( aux_ptr->c_slist_ptr != NULL );
@@ -4279,10 +4068,11 @@ done:
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_renamed_entry(H5AC_t * cache_ptr,
+H5AC_log_renamed_entry(const H5F_t *f,
haddr_t old_addr,
haddr_t new_addr)
{
+ H5AC_t * cache_ptr;
herr_t ret_value = SUCCEED; /* Return value */
hbool_t entry_in_cache;
hbool_t entry_dirty;
@@ -4292,7 +4082,12 @@ H5AC_log_renamed_entry(H5AC_t * cache_ptr,
FUNC_ENTER_NOAPI(H5AC_log_renamed_entry, FAIL)
- HDassert( cache_ptr != NULL );
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = (H5AC_t *)f->shared->cache;
+
+ HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
aux_ptr = cache_ptr->aux_ptr;
@@ -4301,7 +4096,7 @@ H5AC_log_renamed_entry(H5AC_t * cache_ptr,
HDassert( aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC );
/* get entry status, size, etc here */
- if ( H5C_get_entry_status(cache_ptr, old_addr, &entry_size, &entry_in_cache,
+ if ( H5C_get_entry_status(f, old_addr, &entry_size, &entry_in_cache,
&entry_dirty, NULL, NULL) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get entry status.")
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index aa1df87..4f6e4e1 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -266,29 +266,23 @@ extern hid_t H5AC_ind_dxpl_id;
H5_DLL herr_t H5AC_init(void);
H5_DLL herr_t H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr);
-H5_DLL herr_t H5AC_get_entry_status(H5F_t * f, haddr_t addr,
+H5_DLL herr_t H5AC_get_entry_status(const H5F_t * f, haddr_t addr,
unsigned * status_ptr);
H5_DLL herr_t H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
haddr_t addr, void *thing, unsigned int flags);
-H5_DLL herr_t H5AC_pin_protected_entry(H5F_t * f, void * thing);
+H5_DLL herr_t H5AC_pin_protected_entry(void *thing);
H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
haddr_t addr, const void *udata1, void *udata2,
H5AC_protect_t rw);
-H5_DLL herr_t H5AC_resize_pinned_entry(H5F_t * f,
- void * thing,
- size_t new_size);
-H5_DLL herr_t H5AC_unpin_entry(H5F_t * f,
- void * thing);
+H5_DLL herr_t H5AC_resize_pinned_entry(void *thing, size_t new_size);
+H5_DLL herr_t H5AC_unpin_entry(void *thing);
H5_DLL herr_t H5AC_unprotect(H5F_t *f, hid_t dxpl_id,
const H5AC_class_t *type, haddr_t addr,
void *thing, unsigned flags);
H5_DLL herr_t H5AC_flush(H5F_t *f, hid_t dxpl_id, unsigned flags);
-H5_DLL herr_t H5AC_mark_pinned_entry_dirty(H5F_t * f,
- void * thing,
- hbool_t size_changed,
- size_t new_size);
-H5_DLL herr_t H5AC_mark_pinned_or_protected_entry_dirty(H5F_t * f,
- void * thing);
+H5_DLL herr_t H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed,
+ size_t new_size);
+H5_DLL herr_t H5AC_mark_pinned_or_protected_entry_dirty(void *thing);
H5_DLL herr_t H5AC_rename(H5F_t *f, const H5AC_class_t *type,
haddr_t old_addr, haddr_t new_addr);
@@ -301,7 +295,7 @@ H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr,
void (* write_done)(void));
H5_DLL herr_t H5AC_stats(const H5F_t *f);
-H5_DLL herr_t H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
+H5_DLL herr_t H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_get_cache_size(H5AC_t * cache_ptr,
@@ -315,7 +309,7 @@ H5_DLL herr_t H5AC_get_cache_hit_rate(H5AC_t * cache_ptr,
H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t * cache_ptr);
-H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
+H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_validate_config(H5AC_cache_config_t * config_ptr);
diff --git a/src/H5C.c b/src/H5C.c
index 8af690a..dd4e30a 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -3298,9 +3298,9 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
herr_t
H5C_dest(H5F_t * f,
hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- H5C_t * cache_ptr)
+ hid_t secondary_dxpl_id)
{
+ H5C_t * cache_ptr = f->shared->cache;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_dest, FAIL)
@@ -3310,7 +3310,7 @@ H5C_dest(H5F_t * f,
HDassert( cache_ptr->skip_file_checks || f );
if ( H5C_flush_cache(f, primary_dxpl_id, secondary_dxpl_id,
- cache_ptr, H5C__FLUSH_INVALIDATE_FLAG) < 0 ) {
+ H5C__FLUSH_INVALIDATE_FLAG) < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache")
}
@@ -3323,7 +3323,7 @@ H5C_dest(H5F_t * f,
cache_ptr->magic = 0;
- H5FL_FREE(H5C_t, cache_ptr);
+ cache_ptr = H5FL_FREE(H5C_t, cache_ptr);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3405,15 +3405,14 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5C_expunge_entry(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr)
{
+ H5C_t * cache_ptr;
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
hbool_t first_flush = TRUE;
@@ -3421,12 +3420,17 @@ H5C_expunge_entry(H5F_t * f,
FUNC_ENTER_NOAPI(H5C_expunge_entry, FAIL)
- HDassert( H5F_addr_defined(addr) );
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = f->shared->cache;
+
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( type );
HDassert( type->clear );
HDassert( type->dest );
+ HDassert( H5F_addr_defined(addr) );
#if H5C_DO_EXTREME_SANITY_CHECKS
if ( H5C_validate_lru_list(cache_ptr) < 0 ) {
@@ -3597,9 +3601,9 @@ herr_t
H5C_flush_cache(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
unsigned flags)
{
+ H5C_t * cache_ptr = f->shared->cache;
herr_t status;
herr_t ret_value = SUCCEED;
hbool_t destroy;
@@ -4133,8 +4137,7 @@ H5C_flush_to_min_clean(H5F_t * f,
/* Flush the marked entries */
result = H5C_flush_cache(f, primary_dxpl_id, secondary_dxpl_id,
- cache_ptr, H5C__FLUSH_MARKED_ENTRIES_FLAG |
- H5C__FLUSH_IGNORE_PROTECTED_FLAG);
+ H5C__FLUSH_MARKED_ENTRIES_FLAG | H5C__FLUSH_IGNORE_PROTECTED_FLAG);
if ( result < 0 ) {
@@ -4190,7 +4193,7 @@ done:
*/
herr_t
-H5C_get_cache_auto_resize_config(H5C_t * cache_ptr,
+H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
H5C_auto_size_ctl_t *config_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -4372,7 +4375,7 @@ done:
*/
herr_t
-H5C_get_entry_status(H5C_t * cache_ptr,
+H5C_get_entry_status(const H5F_t *f,
haddr_t addr,
size_t * size_ptr,
hbool_t * in_cache_ptr,
@@ -4380,11 +4383,17 @@ H5C_get_entry_status(H5C_t * cache_ptr,
hbool_t * is_protected_ptr,
hbool_t * is_pinned_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_get_entry_status, FAIL)
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = f->shared->cache;
+
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( H5F_addr_defined(addr) );
@@ -4458,7 +4467,7 @@ done:
*/
herr_t
-H5C_get_evictions_enabled(H5C_t * cache_ptr,
+H5C_get_evictions_enabled(const H5C_t * cache_ptr,
hbool_t * evictions_enabled_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -4499,38 +4508,55 @@ done:
* Programmer: John Mainzer
* 1/20/06
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-
herr_t
-H5C_get_trace_file_ptr(H5C_t * cache_ptr,
- FILE ** trace_file_ptr_ptr)
+H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ FUNC_ENTER_NOAPI_NOFUNC(H5C_get_trace_file_ptr)
- FUNC_ENTER_NOAPI(H5C_get_trace_file_ptr, FAIL)
+ /* Sanity checks */
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(trace_file_ptr_ptr);
- /* This would normally be an assert, but we need to use an HGOTO_ERROR
- * call to shut up the compiler.
- */
- if ( ( ! cache_ptr ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
+ *trace_file_ptr_ptr = cache_ptr->trace_file_ptr;
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr")
- }
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5C_get_trace_file_ptr() */
- if ( trace_file_ptr_ptr == NULL ) {
+
+/*-------------------------------------------------------------------------
+ * Function: H5C_get_trace_file_ptr_from_entry
+ *
+ * Purpose: Get the trace_file_ptr field from the cache, via an entry.
+ *
+ * This field will either be NULL (which indicates that trace
+ * file logging is turned off), or contain a pointer to the
+ * open file to which trace file data is to be written.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * 6/9/08
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
+ FILE **trace_file_ptr_ptr)
+{
+ FUNC_ENTER_NOAPI_NOFUNC(H5C_get_trace_file_ptr_from_entry)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL trace_file_ptr_ptr")
- }
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(entry_ptr->cache_ptr);
- *trace_file_ptr_ptr = cache_ptr->trace_file_ptr;
+ /* Go get the trace file pointer for the cache */
+ H5C_get_trace_file_ptr(entry_ptr->cache_ptr, trace_file_ptr_ptr);
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5C_get_trace_file_ptr() */
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5C_get_trace_file_ptr_from_entry() */
/*-------------------------------------------------------------------------
@@ -4618,13 +4644,13 @@ herr_t
H5C_insert_entry(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
void * thing,
unsigned int flags)
{
/* const char * fcn_name = "H5C_insert_entry()"; */
+ H5C_t * cache_ptr;
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
hbool_t first_flush = TRUE;
@@ -4636,6 +4662,11 @@ H5C_insert_entry(H5F_t * f,
FUNC_ENTER_NOAPI(H5C_insert_entry, FAIL)
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = f->shared->cache;
+
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->skip_file_checks || f );
@@ -4667,6 +4698,7 @@ H5C_insert_entry(H5F_t * f,
#ifndef NDEBUG
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
#endif /* NDEBUG */
+ entry_ptr->cache_ptr = cache_ptr;
entry_ptr->addr = addr;
entry_ptr->type = type;
@@ -5189,45 +5221,30 @@ done:
* Programmer: John Mainzer
* 3/22/06
*
- * Modifications:
- *
- * Added code to do a flash cache size increase if
- * appropriate.
- * JRM -- 1/11/08
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5C_mark_pinned_entry_dirty(H5C_t * cache_ptr,
- void * thing,
- hbool_t size_changed,
- size_t new_size)
+H5C_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
{
- herr_t ret_value = SUCCEED; /* Return value */
- herr_t result;
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
size_t size_increase;
- H5C_cache_entry_t * entry_ptr;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_mark_pinned_entry_dirty, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
- HDassert( ( size_changed == TRUE ) || ( size_changed == FALSE ) );
-
- entry_ptr = (H5C_cache_entry_t *)thing;
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "Entry isn't pinned??")
- }
-
- if ( entry_ptr->is_protected ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, \
- "Entry is protected??")
- }
+ /* Check for usage errors */
+ if(!entry_ptr->is_pinned)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry isn't pinned??")
+ if(entry_ptr->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is protected??")
/* mark the entry as dirty if it isn't already */
entry_ptr->is_dirty = TRUE;
@@ -5243,17 +5260,9 @@ H5C_mark_pinned_entry_dirty(H5C_t * cache_ptr,
size_increase = new_size - entry_ptr->size;
if ( size_increase >=
- cache_ptr->flash_size_increase_threshold ) {
-
- result = H5C__flash_increase_cache_size(cache_ptr,
- entry_ptr->size,
- new_size);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5C__flash_increase_cache_size failed.")
- }
+ cache_ptr->flash_size_increase_threshold ) {
+ if(H5C__flash_increase_cache_size(cache_ptr, entry_ptr->size, new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "flash cache increase failed")
}
}
}
@@ -5290,9 +5299,7 @@ H5C_mark_pinned_entry_dirty(H5C_t * cache_ptr,
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_mark_pinned_entry_dirty() */
@@ -5317,32 +5324,23 @@ done:
* Programmer: John Mainzer
* 5/15/06
*
- * Modifications:
- *
- * JRM -- 3/29/07
- * Added sanity check to verify that the pinned entry
- * is not protected read only.
- *
- * This sanity check is commented out for now -- uncomment
- * it once we deal with the problem of entries being protected
- * read only, and then dirtied.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5C_mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- void * thing)
+H5C_mark_pinned_or_protected_entry_dirty(void *thing)
{
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
herr_t ret_value = SUCCEED; /* Return value */
- H5C_cache_entry_t * entry_ptr;
FUNC_ENTER_NOAPI(H5C_mark_pinned_or_protected_entry_dirty, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- entry_ptr = (H5C_cache_entry_t *)thing;
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if ( entry_ptr->is_protected ) {
#if 0 /* JRM - uncomment this when possible */
@@ -5371,9 +5369,7 @@ H5C_mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
}
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_mark_pinned_or_protected_entry_dirty() */
@@ -5588,50 +5584,32 @@ done:
* Programmer: John Mainzer
* 7/5/06
*
- * Modifications:
- *
- * Added code to apply a flash cache size increment if
- * appropriate.
- * JRM -- 1/11/08
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5C_resize_pinned_entry(H5C_t * cache_ptr,
- void * thing,
- size_t new_size)
+H5C_resize_pinned_entry(void *thing, size_t new_size)
{
- /* const char * fcn_name = "H5C_resize_pinned_entry()"; */
- herr_t ret_value = SUCCEED; /* Return value */
- herr_t result;
- H5C_cache_entry_t * entry_ptr;
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
size_t size_increase;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_resize_pinned_entry, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- entry_ptr = (H5C_cache_entry_t *)thing;
-
- if ( new_size <= 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "New size is non-positive.")
- }
-
- if ( ! ( entry_ptr->is_pinned ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "Entry isn't pinned??")
- }
-
- if ( entry_ptr->is_protected ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, \
- "Entry is protected??")
- }
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+
+ /* Check for usage errors */
+ if(new_size <= 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "New size is non-positive.")
+ if(!entry_ptr->is_pinned)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry isn't pinned??")
+ if(entry_ptr->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTRESIZE, FAIL, "Entry is protected??")
/* resizing dirties entries -- mark the entry as dirty if it
* isn't already
@@ -5651,15 +5629,11 @@ H5C_resize_pinned_entry(H5C_t * cache_ptr,
if ( size_increase >=
cache_ptr->flash_size_increase_threshold ) {
- result = H5C__flash_increase_cache_size(cache_ptr,
- entry_ptr->size,
- new_size);
-
- if ( result < 0 ) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, \
- "H5C__flash_increase_cache_size failed.")
- }
+ if(H5C__flash_increase_cache_size(cache_ptr,
+ entry_ptr->size,
+ new_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "flash cache increase failed")
}
}
}
@@ -5696,9 +5670,7 @@ H5C_resize_pinned_entry(H5C_t * cache_ptr,
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_resize_pinned_entry() */
@@ -5713,64 +5685,38 @@ done:
* Programmer: John Mainzer
* 4/26/06
*
- * Modifications:
- *
- * JRM -- 4/26/06
- * Modified routine to allow it to operate on protected
- * entries.
- *
- * JRM -- 2/16/07
- * Added conditional compile to avoid unused parameter
- * warning in production compile.
- *
- * JRM -- 4/4/07
- * Fixed typo -- canged macro call to
- * H5C__UPDATE_STATS_FOR_UNPIN to call to
- * H5C__UPDATE_STATS_FOR_PIN.
- *
*-------------------------------------------------------------------------
*/
-#ifndef NDEBUG
-herr_t
-H5C_pin_protected_entry(H5C_t * cache_ptr,
- void * thing)
-#else
herr_t
-H5C_pin_protected_entry(H5C_t UNUSED * cache_ptr,
- void * thing)
-#endif
+H5C_pin_protected_entry(void *thing)
{
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
herr_t ret_value = SUCCEED; /* Return value */
- H5C_cache_entry_t * entry_ptr;
FUNC_ENTER_NOAPI(H5C_pin_protected_entry, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- entry_ptr = (H5C_cache_entry_t *)thing;
-
- HDassert( H5F_addr_defined(entry_ptr->addr) );
-
- if ( ! ( entry_ptr->is_protected ) ) {
+ /* Sanity checks */
+ HDassert(entry_ptr);
+ HDassert(H5F_addr_defined(entry_ptr->addr));
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ /* Check for usage errors */
+ if(!entry_ptr->is_protected)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry isn't protected")
- }
-
- if ( entry_ptr->is_pinned ) {
-
+ if(entry_ptr->is_pinned)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Entry is already pinned")
- }
+ /* Pin entry */
entry_ptr->is_pinned = TRUE;
+ /* Update statistics for entry */
H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_pin_protected_entry() */
@@ -5865,7 +5811,6 @@ void *
H5C_protect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
const void * udata1,
@@ -5873,6 +5818,7 @@ H5C_protect(H5F_t * f,
unsigned flags)
{
/* const char * fcn_name = "H5C_protect()"; */
+ H5C_t * cache_ptr;
hbool_t hit;
hbool_t first_flush;
hbool_t have_write_permitted = FALSE;
@@ -5886,6 +5832,9 @@ H5C_protect(H5F_t * f,
FUNC_ENTER_NOAPI(H5C_protect, NULL)
/* check args */
+ HDassert( f );
+ HDassert( f->shared );
+ cache_ptr = f->shared->cache;
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->skip_file_checks || f );
@@ -6256,14 +6205,13 @@ done:
*/
herr_t
-H5C_set_cache_auto_resize_config(H5C_t * cache_ptr,
+H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
H5C_auto_size_ctl_t *config_ptr)
{
- /* const char *fcn_name = "H5C_set_cache_auto_resize_config()"; */
- herr_t ret_value = SUCCEED; /* Return value */
herr_t result;
size_t new_max_cache_size;
size_t new_min_clean_size;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_set_cache_auto_resize_config, FAIL)
@@ -6539,7 +6487,7 @@ done:
*/
herr_t
-H5C_set_evictions_enabled(H5C_t * cache_ptr,
+H5C_set_evictions_enabled(H5C_t *cache_ptr,
hbool_t evictions_enabled)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -7276,47 +7224,39 @@ H5C_stats__reset(H5C_t UNUSED * cache_ptr)
* Programmer: John Mainzer
* 3/22/06
*
- * Modifications:
- *
- * JRM -- 4/26/06
- * Modified routine to allow it to operate on protected
- * entries.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5C_unpin_entry(H5C_t * cache_ptr,
- void * thing)
+H5C_unpin_entry(void *thing)
{
+ H5C_t *cache_ptr;
+ H5C_cache_entry_t *entry_ptr = (H5C_cache_entry_t *)thing;
herr_t ret_value = SUCCEED; /* Return value */
- H5C_cache_entry_t * entry_ptr;
FUNC_ENTER_NOAPI(H5C_unpin_entry, FAIL)
- HDassert( cache_ptr );
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( thing );
-
- entry_ptr = (H5C_cache_entry_t *)thing;
-
- if ( ! ( entry_ptr->is_pinned ) ) {
+ /* Sanity check */
+ HDassert(entry_ptr);
+ cache_ptr = entry_ptr->cache_ptr;
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ /* Error checking */
+ if(!entry_ptr->is_pinned)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Entry isn't pinned")
- }
-
- if ( ! ( entry_ptr->is_protected ) ) {
+ /* Update unprotected entry */
+ if(!entry_ptr->is_protected)
H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, FAIL)
- }
+ /* Mark entry unpinned */
entry_ptr->is_pinned = FALSE;
+ /* Update statistics for unpin operation */
H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_unpin_entry() */
@@ -7421,7 +7361,6 @@ herr_t
H5C_unprotect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
void * thing,
@@ -7429,6 +7368,7 @@ H5C_unprotect(H5F_t * f,
size_t new_size)
{
/* const char * fcn_name = "H5C_unprotect()"; */
+ H5C_t * cache_ptr;
hbool_t deleted;
hbool_t dirtied;
hbool_t set_flush_marker;
@@ -7459,6 +7399,11 @@ H5C_unprotect(H5F_t * f,
dirtied |= size_changed;
+ HDassert( f );
+ HDassert( f->shared );
+
+ cache_ptr = f->shared->cache;
+
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->skip_file_checks || f );
@@ -10296,8 +10241,8 @@ H5C_flush_single_entry(H5F_t * f,
/* Clear the dirty flag only, if requested */
if ( clear_only ) {
-#ifndef NDEBUG
if ( destroy ) {
+#ifndef NDEBUG
/* we are about to call the clear callback with the
* destroy flag set -- this will result in *entry_ptr
* being freed. Set the magic field to bad magic
@@ -10305,8 +10250,9 @@ H5C_flush_single_entry(H5F_t * f,
* one.
*/
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
- }
#endif /* NDEBUG */
+ entry_ptr->cache_ptr = NULL;
+ }
/* Call the callback routine to clear all dirty flags for object */
if ( (entry_ptr->type->clear)(f, entry_ptr, destroy) < 0 ) {
@@ -10324,8 +10270,8 @@ H5C_flush_single_entry(H5F_t * f,
}
#endif /* H5C_DO_SANITY_CHECKS */
-#ifndef NDEBUG
if ( destroy ) {
+#ifndef NDEBUG
/* we are about to call the flush callback with the
* destroy flag set -- this will result in *entry_ptr
* being freed. Set the magic field to bad magic
@@ -10333,8 +10279,9 @@ H5C_flush_single_entry(H5F_t * f,
* one.
*/
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC;
- }
#endif /* NDEBUG */
+ entry_ptr->cache_ptr = NULL;
+ }
/* Only block for all the processes on the first piece of metadata
*/
@@ -10597,6 +10544,7 @@ H5C_load_entry(H5F_t * f,
#ifndef NDEBUG
entry_ptr->magic = H5C__H5C_CACHE_ENTRY_T_MAGIC;
#endif /* NDEBUG */
+ entry_ptr->cache_ptr = f->shared->cache;
entry_ptr->addr = addr;
entry_ptr->type = type;
entry_ptr->is_protected = FALSE;
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 53dcf0d..54233d8 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -473,6 +473,7 @@ typedef struct H5C_cache_entry_t
#ifndef NDEBUG
uint32_t magic;
#endif /* NDEBUG */
+ H5C_t * cache_ptr;
haddr_t addr;
size_t size;
const H5C_class_t * type;
@@ -944,22 +945,19 @@ H5_DLL void H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
H5_DLL herr_t H5C_dest(H5F_t * f,
hid_t primary_dxpl_id,
- hid_t secondary_dxpl_id,
- H5C_t * cache_ptr);
+ hid_t secondary_dxpl_id);
H5_DLL herr_t H5C_dest_empty(H5C_t * cache_ptr);
H5_DLL herr_t H5C_expunge_entry(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr);
H5_DLL herr_t H5C_flush_cache(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
unsigned flags);
H5_DLL herr_t H5C_flush_to_min_clean(H5F_t * f,
@@ -967,7 +965,7 @@ H5_DLL herr_t H5C_flush_to_min_clean(H5F_t * f,
hid_t secondary_dxpl_id,
H5C_t * cache_ptr);
-H5_DLL herr_t H5C_get_cache_auto_resize_config(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_get_cache_auto_resize_config(const H5C_t * cache_ptr,
H5C_auto_size_ctl_t *config_ptr);
H5_DLL herr_t H5C_get_cache_size(H5C_t * cache_ptr,
@@ -979,7 +977,7 @@ H5_DLL herr_t H5C_get_cache_size(H5C_t * cache_ptr,
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(H5C_t * cache_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,
@@ -987,16 +985,17 @@ H5_DLL herr_t H5C_get_entry_status(H5C_t * cache_ptr,
hbool_t * is_protected_ptr,
hbool_t * is_pinned_ptr);
-H5_DLL herr_t H5C_get_evictions_enabled(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t * cache_ptr,
hbool_t * evictions_enabled_ptr);
-H5_DLL herr_t H5C_get_trace_file_ptr(H5C_t * cache_ptr,
- FILE ** trace_file_ptr_ptr);
+H5_DLL herr_t H5C_get_trace_file_ptr(const H5C_t *cache_ptr,
+ FILE **trace_file_ptr_ptr);
+H5_DLL herr_t H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
+ FILE **trace_file_ptr_ptr);
H5_DLL herr_t H5C_insert_entry(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
void * thing,
@@ -1009,26 +1008,22 @@ H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t * f,
int32_t ce_array_len,
haddr_t * ce_array_ptr);
-H5_DLL herr_t H5C_mark_pinned_entry_dirty(H5C_t * cache_ptr,
- void * thing,
+H5_DLL herr_t H5C_mark_pinned_entry_dirty(void * thing,
hbool_t size_changed,
size_t new_size);
-H5_DLL herr_t H5C_mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- void * thing);
+H5_DLL herr_t H5C_mark_pinned_or_protected_entry_dirty(void *thing);
H5_DLL herr_t H5C_rename_entry(H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t old_addr,
haddr_t new_addr);
-H5_DLL herr_t H5C_pin_protected_entry(H5C_t * cache_ptr,
- void * thing);
+H5_DLL herr_t H5C_pin_protected_entry(void *thing);
H5_DLL void * H5C_protect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
const void * udata1,
@@ -1037,14 +1032,12 @@ H5_DLL void * H5C_protect(H5F_t * f,
H5_DLL herr_t H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr);
-H5_DLL herr_t H5C_resize_pinned_entry(H5C_t * cache_ptr,
- void * thing,
- size_t new_size);
+H5_DLL herr_t H5C_resize_pinned_entry(void *thing, size_t new_size);
-H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
H5C_auto_size_ctl_t *config_ptr);
-H5_DLL herr_t H5C_set_evictions_enabled(H5C_t * cache_ptr,
+H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr,
hbool_t evictions_enabled);
H5_DLL herr_t H5C_set_prefix(H5C_t * cache_ptr, char * prefix);
@@ -1062,12 +1055,11 @@ H5_DLL herr_t H5C_stats(H5C_t * cache_ptr,
H5_DLL void H5C_stats__reset(H5C_t * cache_ptr);
-H5_DLL herr_t H5C_unpin_entry(H5C_t * cache_ptr, void * thing);
+H5_DLL herr_t H5C_unpin_entry(void *thing);
H5_DLL herr_t H5C_unprotect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
- H5C_t * cache_ptr,
const H5C_class_t * type,
haddr_t addr,
void * thing,
diff --git a/src/H5Dint.c b/src/H5Dint.c
index c00c374..12ee37c 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -907,7 +907,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
/* Insert "empty" name first */
if((size_t)(-1) == H5HL_insert(file, dxpl_id, heap, (size_t)1, "")) {
- H5HL_unprotect(file, heap);
+ H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap")
} /* end if */
@@ -917,7 +917,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
/* Insert file name into heap */
if((size_t)(-1) == (offset = H5HL_insert(file, dxpl_id, heap,
HDstrlen(efl->slot[u].name) + 1, efl->slot[u].name))) {
- H5HL_unprotect(file, heap);
+ H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap")
} /* end if */
@@ -927,7 +927,7 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
} /* end for */
/* Release the heap */
- if(H5HL_unprotect(file, heap) < 0)
+ if(H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect EFL file name heap")
heap = NULL;
@@ -972,8 +972,8 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
done:
/* Release pointer to object header itself */
- if(oloc != NULL && oh != NULL)
- if(H5O_unprotect(oloc, oh) < 0)
+ if(oh != NULL)
+ if(H5O_unprotect(oh) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect dataset object header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -2499,7 +2499,7 @@ H5D_flush_real(H5D_t *dataset, hid_t dxpl_id, unsigned flags)
done:
/* Release pointer to object header */
if(oh != NULL)
- if(H5O_unprotect(&(dataset->oloc), oh) < 0)
+ if(H5O_unprotect(oh) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTUNPROTECT, FAIL, "unable to unprotect dataset object header")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5FS.c b/src/H5FS.c
index 2dd2833..3c8f81b 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -201,7 +201,7 @@ HDfprintf(stderr, "%s: fspace->sinfo = %p\n", FUNC, fspace->sinfo);
/* (could still be pinned from it's section info still hanging around in the cache) */
if(!(fspace_status & H5AC_ES__IS_PINNED)) {
/* Pin free space header in the cache */
- if(H5AC_pin_protected_entry(f, fspace) < 0)
+ if(H5AC_pin_protected_entry(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, NULL, "unable to pin free space header")
} /* end if */
@@ -342,7 +342,7 @@ HDfprintf(stderr, "%s: Entering, fspace = %p, fspace->sinfo = %p\n", FUNC, fspac
HDassert(H5F_addr_defined(fspace->sect_addr));
/* Unpin the free space section info in the cache */
- if(H5AC_unpin_entry(f, fspace->sinfo) < 0)
+ if(H5AC_unpin_entry(fspace->sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space section info")
/* If there aren't any sections being managed, free the space for the sections */
@@ -365,7 +365,7 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_c
fspace->alloc_sect_size = fspace->sect_size = 0;
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
/* Evict the section info from the metadata cache */
@@ -387,7 +387,7 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", FUNC, fspace->tot_sect_c
if(!(sect_status & H5AC_ES__IN_CACHE)) {
/* Unpin the free space header in the cache */
/* (the section info destructor would unpin it if the section info existed) */
- if(H5AC_unpin_entry(f, fspace) < 0)
+ if(H5AC_unpin_entry(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space header")
} /* end if */
} /* end else */
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 7d0aad1..b32ae11 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -954,7 +954,7 @@ H5FS_sinfo_free_node_cb(void *item, void UNUSED *key, void *op_data)
*/
/* ARGSUSED */
herr_t
-H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo)
+H5FS_cache_sinfo_dest(H5F_t UNUSED *f, H5FS_sinfo_t *sinfo)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -987,7 +987,7 @@ H5FS_cache_sinfo_dest(H5F_t *f, H5FS_sinfo_t *sinfo)
/* (make certain this is last action with section info, to allow for header
* disappearing immediately)
*/
- if(H5AC_unpin_entry(f, sinfo->fspace) < 0)
+ if(H5AC_unpin_entry(sinfo->fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space header")
/* Release free space section info */
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index de2fbc5..92444ab 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -225,7 +225,7 @@ HDfprintf(stderr, "%s: New section info, addr = %a, size = %Hu\n", FUNC, fspace-
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't add free space sections to cache")
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, NULL, "unable to mark free space header as dirty")
} /* end if */
else {
@@ -237,7 +237,7 @@ HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %a\n",
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, NULL, "unable to load free space sections")
/* Pin them in the cache */
- if(H5AC_pin_protected_entry(f, sinfo) < 0)
+ if(H5AC_pin_protected_entry(sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, NULL, "unable to pin free space sections")
/* Unlock free space sections, now pinned */
@@ -318,7 +318,7 @@ HDfprintf(stderr, "%s: cls->serial_size = %Zu\n", FUNC, cls->serial_size);
} /* end else */
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
done:
@@ -381,7 +381,7 @@ HDfprintf(stderr, "%s: cls->serial_size = %Zu\n", FUNC, cls->serial_size);
} /* end else */
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
done:
@@ -586,7 +586,7 @@ HDfprintf(stderr, "%s: fspace->tot_space = %Hu\n", FUNC, fspace->tot_space);
fspace->tot_space -= sect->size;
/* Mark free space sections as changed */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace->sinfo) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace->sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space sections as dirty")
done:
@@ -1097,7 +1097,7 @@ HDfprintf(stderr, "%s: fspace->hdr->tot_space = %Hu\n", FUNC, fspace->hdr->tot_s
/* Mark free space sections as changed */
/* (if adding sections while deserializing sections, don't set the flag) */
if(!(flags & H5FS_ADD_DESERIALIZING)) {
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace->sinfo) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace->sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space sections as dirty")
} /* end if */
@@ -1369,12 +1369,12 @@ HDfprintf(stderr, "%s: old_addr = %a, fspace->sect_addr = %a\n", FUNC, old_addr,
} /* end if */
else {
/* Mark free space section as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace->sinfo) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace->sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space section info as dirty")
} /* end else */
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
} /* end if */
else {
@@ -1426,12 +1426,12 @@ HDfprintf(stderr, "%s: Allocating space for smaller serialized sections, new_siz
} /* end if */
else {
/* Mark free space section as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace->sinfo) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace->sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space section info as dirty")
} /* end else */
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
} /* end if */
} /* end else */
@@ -1770,7 +1770,7 @@ HDfprintf(stderr, "%s: removing object from merge list, sect->type = %u\n", FUNC
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCOMPUTE, FAIL, "can't adjust free space section size on disk")
/* Mark free space sections as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, fspace->sinfo) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(fspace->sinfo) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space sections as dirty")
done:
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index f3092c1..4d96389 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -1725,7 +1725,7 @@ H5G_node_copy(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
} /* end of for (i=0; i<sn->nsyms; i++) */
done:
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5_ITER_ERROR, "unable to unprotect symbol name")
if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
@@ -1924,7 +1924,7 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
done:
if(sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to release symbol table node")
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 467a471..38d5087 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -907,7 +907,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
for(u = 0; u < linfo->nlinks; u++)
if(H5O_msg_append_oh(oloc->file, dxpl_id, oh, H5O_LINK_ID, 0, H5O_UPDATE_TIME, &(ltable.lnks[u])) < 0) {
/* Release object header */
- if(H5O_unprotect(oloc, oh) < 0)
+ if(H5O_unprotect(oh) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to unprotect group object header")
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
@@ -919,7 +919,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
} /* end if */
/* Release object header */
- if(H5O_unprotect(oloc, oh) < 0)
+ if(H5O_unprotect(oh) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to unprotect group object header")
/* Free link table information */
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 604eead..2b1476d 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -136,7 +136,7 @@ H5G_stab_create_components(H5F_t *f, H5O_stab_t *stab, size_t size_hint, hid_t d
done:
/* Release resources */
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -250,7 +250,7 @@ H5G_stab_insert_real(H5F_t *f, H5O_stab_t *stab, const char *name,
done:
/* Release resources */
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -343,7 +343,7 @@ H5G_stab_remove(H5O_loc_t *loc, hid_t dxpl_id, H5RS_str_t *grp_full_path_r,
done:
/* Release resources */
- if(heap && H5HL_unprotect(loc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -401,7 +401,7 @@ H5G_stab_remove_by_idx(H5O_loc_t *grp_oloc, hid_t dxpl_id, H5RS_str_t *grp_full_
done:
/* Release resources */
- if(heap && H5HL_unprotect(grp_oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
/* Reset the link information, if we have a copy */
@@ -453,7 +453,7 @@ H5G_stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table B-tree")
/* Release resources */
- if(H5HL_unprotect(f, heap) < 0)
+ if(H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
heap = NULL;
@@ -463,7 +463,7 @@ H5G_stab_delete(H5F_t *f, hid_t dxpl_id, const H5O_stab_t *stab)
done:
/* Release resources */
- if(heap && H5HL_unprotect(f, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -553,7 +553,7 @@ H5G_stab_iterate(const H5O_loc_t *oloc, hid_t dxpl_id, H5_iter_order_t order,
done:
/* Release resources */
- if(heap && H5HL_unprotect(oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
if(ltable.lnks && H5G_link_release_table(&ltable) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table")
@@ -760,7 +760,7 @@ H5G_stab_get_name_by_idx(H5O_loc_t *oloc, H5_iter_order_t order, hsize_t n,
done:
/* Release resources */
- if(heap && H5HL_unprotect(oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
/* Free the duplicated name */
@@ -859,7 +859,7 @@ H5G_stab_lookup(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
done:
/* Release resources */
- if(heap && H5HL_unprotect(grp_oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
@@ -973,7 +973,7 @@ H5G_stab_lookup_by_idx(H5O_loc_t *grp_oloc, H5_iter_order_t order, hsize_t n,
done:
/* Release resources */
- if(heap && H5HL_unprotect(grp_oloc->file, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol table heap")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index f8a0bb0..5bf297b 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -529,7 +529,7 @@ H5HF_hdr_incr(H5HF_hdr_t *hdr)
/* Mark header as un-evictable when a block is depending on it */
if(hdr->rc == 0)
- if(H5AC_pin_protected_entry(hdr->f, hdr) < 0)
+ if(H5AC_pin_protected_entry(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap header")
/* Increment reference count on shared header */
@@ -570,7 +570,7 @@ H5HF_hdr_decr(H5HF_hdr_t *hdr)
/* Mark header as evictable again when no child blocks depend on it */
if(hdr->rc == 0) {
HDassert(hdr->file_rc == 0);
- if(H5AC_unpin_entry(hdr->f, hdr) < 0)
+ if(H5AC_unpin_entry(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header")
} /* end if */
@@ -660,7 +660,7 @@ H5HF_hdr_dirty(H5HF_hdr_t *hdr)
HDassert(hdr);
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr->f, hdr) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap header as dirty")
/* Set the dirty flags for the heap header */
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 9733a0f..bc06924 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -115,7 +115,7 @@ H5HF_iblock_pin(H5HF_indirect_t *iblock)
HDassert(iblock);
/* Mark block as un-evictable */
- if(H5AC_pin_protected_entry(iblock->hdr->f, iblock) < 0)
+ if(H5AC_pin_protected_entry(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin fractal heap indirect block")
/* If this indirect block has a parent, update it's child iblock pointer */
@@ -199,7 +199,7 @@ H5HF_iblock_unpin(H5HF_indirect_t *iblock)
} /* end if */
/* Mark block as evictable again */
- if(H5AC_unpin_entry(iblock->hdr->f, iblock) < 0)
+ if(H5AC_unpin_entry(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap indirect block")
done:
@@ -335,7 +335,7 @@ H5HF_iblock_dirty(H5HF_indirect_t *iblock)
HDassert(iblock);
/* Mark indirect block as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(iblock->hdr->f, iblock) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap indirect block as dirty")
done:
diff --git a/src/H5HL.c b/src/H5HL.c
index b19aef9..f876a5f 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -238,7 +238,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
HDassert(heap->prfx);
/* Resize the heap prefix in the cache */
- if(H5AC_resize_pinned_entry(f, heap->prfx, (size_t)(heap->prfx_size + new_heap_size)) < 0)
+ if(H5AC_resize_pinned_entry(heap->prfx, (size_t)(heap->prfx_size + new_heap_size)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap in cache")
} /* end if */
else {
@@ -247,7 +247,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
HDassert(heap->dblk);
/* Resize the heap data block in the cache */
- if(H5AC_resize_pinned_entry(f, heap->dblk, (size_t)new_heap_size) < 0)
+ if(H5AC_resize_pinned_entry(heap->dblk, (size_t)new_heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap in cache")
} /* end else */
} /* end if */
@@ -260,7 +260,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
/* Resize current heap prefix */
heap->prfx_size = H5HL_SIZEOF_HDR(f);
- if(H5AC_resize_pinned_entry(f, heap->prfx, (size_t)heap->prfx_size) < 0)
+ if(H5AC_resize_pinned_entry(heap->prfx, (size_t)heap->prfx_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap prefix in cache")
/* Insert data block into cache (pinned) */
@@ -276,7 +276,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
/* (ignore [unlikely] case where heap data block ends up
* contiguous w/heap prefix again.
*/
- if(H5AC_resize_pinned_entry(f, heap->dblk, (size_t)new_heap_size) < 0)
+ if(H5AC_resize_pinned_entry(heap->dblk, (size_t)new_heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap data block in cache")
/* Relocate the heap data block in the cache */
@@ -557,14 +557,13 @@ H5HL_offset_into(const H5HL_t *heap, size_t offset)
*-------------------------------------------------------------------------
*/
herr_t
-H5HL_unprotect(H5F_t *f, H5HL_t *heap)
+H5HL_unprotect(H5HL_t *heap)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(H5HL_unprotect, FAIL)
/* check arguments */
- HDassert(f);
HDassert(heap);
/* Decrement # of times heap is protected */
@@ -575,7 +574,7 @@ H5HL_unprotect(H5F_t *f, H5HL_t *heap)
/* Check for separate heap data block */
if(heap->single_cache_obj) {
/* Mark local heap prefix as evictable again */
- if(H5AC_unpin_entry(f, heap->prfx) < 0)
+ if(H5AC_unpin_entry(heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin local heap data block")
} /* end if */
else {
@@ -584,7 +583,7 @@ H5HL_unprotect(H5F_t *f, H5HL_t *heap)
/* Mark local heap data block as evictable again */
/* (data block still pins prefix) */
- if(H5AC_unpin_entry(f, heap->dblk) < 0)
+ if(H5AC_unpin_entry(heap->dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin local heap data block")
} /* end else */
} /* end if */
@@ -640,14 +639,13 @@ H5HL_remove_free(H5HL_t *heap, H5HL_free_t *fl)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_dirty(H5F_t *f, H5HL_t *heap)
+H5HL_dirty(H5HL_t *heap)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5HL_dirty)
/* check arguments */
- HDassert(f);
HDassert(heap);
HDassert(heap->prfx);
@@ -656,12 +654,12 @@ H5HL_dirty(H5F_t *f, H5HL_t *heap)
/* Sanity check */
HDassert(heap->dblk);
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, heap->dblk) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(heap->dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap data block as dirty")
} /* end if */
/* Mark heap prefix as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, heap->prfx) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap prefix as dirty")
done:
@@ -706,7 +704,7 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
* so we just accept that an extra flush of the heap info could occur
* if an error occurs -QAK)
*/
- if(H5HL_dirty(f, heap) < 0)
+ if(H5HL_dirty(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, UFAIL, "unable to mark heap as dirty")
/*
@@ -789,12 +787,12 @@ H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t buf_size, const void *
/* Check for prefix & data block contiguous */
if(heap->single_cache_obj) {
/* Resize prefix+data block */
- if(H5AC_resize_pinned_entry(f, heap->prfx, (size_t)(heap->prfx_size + new_dblk_size)) < 0)
+ if(H5AC_resize_pinned_entry(heap->prfx, (size_t)(heap->prfx_size + new_dblk_size)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, UFAIL, "unable to resize heap prefix in cache")
} /* end if */
else {
/* Resize 'standalone' data block */
- if(H5AC_resize_pinned_entry(f, heap->dblk, (size_t)new_dblk_size) < 0)
+ if(H5AC_resize_pinned_entry(heap->dblk, (size_t)new_dblk_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, UFAIL, "unable to resize heap data block in cache")
} /* end else */
@@ -931,7 +929,7 @@ H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset, size_t size)
* so we just accept that an extra flush of the heap info could occur
* if an error occurs -QAK)
*/
- if(H5HL_dirty(f, heap) < 0)
+ if(H5HL_dirty(heap) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap as dirty")
/*
@@ -1099,7 +1097,7 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
/* Pin the prefix, if the data block was loaded from file */
if(dblk_udata.loaded) {
- if(H5AC_pin_protected_entry(f, prfx) < 0)
+ if(H5AC_pin_protected_entry(prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTPIN, FAIL, "unable to pin local heap prefix")
} /* end if */
} /* end if */
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 34bad8a..ca4b431 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -637,7 +637,7 @@ H5HL_datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *udata1,
done:
/* Release the [possibly partially initialized] local heap on errors */
if(!ret_value && dblk)
- if(H5HL_dblk_dest(f, dblk) < 0)
+ if(H5HL_dblk_dest(dblk) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTRELEASE, NULL, "unable to destroy local heap data block")
FUNC_LEAVE_NOAPI(ret_value)
@@ -689,7 +689,7 @@ H5HL_datablock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
/* Should we destroy the memory version? */
if(destroy)
- if(H5HL_dblk_dest(f, dblk) < 0)
+ if(H5HL_dblk_dest(dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block")
done:
@@ -711,7 +711,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_datablock_dest(H5F_t *f, void *_thing)
+H5HL_datablock_dest(H5F_t UNUSED *f, void *_thing)
{
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
@@ -719,14 +719,13 @@ H5HL_datablock_dest(H5F_t *f, void *_thing)
FUNC_ENTER_NOAPI_NOINIT(H5HL_datablock_dest)
/* check arguments */
- HDassert(f);
HDassert(dblk);
/* Verify that entry is clean */
HDassert(dblk->cache_info.is_dirty == FALSE);
/* Destroy local heap data block */
- if(H5HL_dblk_dest(f, dblk) < 0)
+ if(H5HL_dblk_dest(dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't destroy local heap data block")
done:
@@ -748,7 +747,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5HL_datablock_clear(H5F_t *f, void *_thing, hbool_t destroy)
+H5HL_datablock_clear(H5F_t UNUSED *f, void *_thing, hbool_t destroy)
{
H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */
herr_t ret_value = SUCCEED; /* Return value */
@@ -756,14 +755,13 @@ H5HL_datablock_clear(H5F_t *f, void *_thing, hbool_t destroy)
FUNC_ENTER_NOAPI_NOINIT(H5HL_datablock_clear)
/* check arguments */
- HDassert(f);
HDassert(dblk);
/* Mark local heap data block as clean */
dblk->cache_info.is_dirty = FALSE;
if(destroy)
- if(H5HL_dblk_dest(f, dblk) < 0)
+ if(H5HL_dblk_dest(dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTFREE, FAIL, "unable to destroy local heap data block")
done:
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 8107164..b8a8d35 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -125,7 +125,7 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
done:
- if(h && H5HL_unprotect(f, h) < 0)
+ if(h && H5HL_unprotect(h) < 0)
HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
H5MM_xfree(marker);
diff --git a/src/H5HLint.c b/src/H5HLint.c
index 23ffe00..c6d6839 100644
--- a/src/H5HLint.c
+++ b/src/H5HLint.c
@@ -382,7 +382,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5HL_dblk_dest(H5F_t *f, H5HL_dblk_t *dblk)
+H5HL_dblk_dest(H5HL_dblk_t *dblk)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -397,7 +397,7 @@ H5HL_dblk_dest(H5F_t *f, H5HL_dblk_t *dblk)
dblk->heap->dblk = NULL;
/* Unpin the local heap prefix */
- if(H5AC_unpin_entry(f, dblk->heap->prfx) < 0)
+ if(H5AC_unpin_entry(dblk->heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "can't unpin local heap prefix")
/* Decrement ref. count on heap data structure */
diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h
index 42a2b06..e8a8d68 100644
--- a/src/H5HLpkg.h
+++ b/src/H5HLpkg.h
@@ -155,7 +155,7 @@ H5_DLL herr_t H5HL_prfx_dest(H5HL_prfx_t *prfx);
/* Heap data block routines */
H5_DLL H5HL_dblk_t *H5HL_dblk_new(H5HL_t *heap);
-H5_DLL herr_t H5HL_dblk_dest(H5F_t *f, H5HL_dblk_t *dblk);
+H5_DLL herr_t H5HL_dblk_dest(H5HL_dblk_t *dblk);
#endif /* _H5HLpkg_H */
diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h
index b9d7f7e..6233545 100644
--- a/src/H5HLprivate.h
+++ b/src/H5HLprivate.h
@@ -68,7 +68,7 @@ H5_DLL H5HL_t *H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_
H5_DLL void *H5HL_offset_into(const H5HL_t *heap, size_t offset);
H5_DLL herr_t H5HL_remove(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t offset,
size_t size);
-H5_DLL herr_t H5HL_unprotect(H5F_t *f, H5HL_t *heap);
+H5_DLL herr_t H5HL_unprotect(H5HL_t *heap);
H5_DLL size_t H5HL_insert(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t size,
const void *buf);
H5_DLL herr_t H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr);
diff --git a/src/H5O.c b/src/H5O.c
index debf294..d700797 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1555,7 +1555,7 @@ H5O_protect(H5O_loc_t *loc, hid_t dxpl_id)
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, NULL, "unable to load object header")
/* Mark object header as un-evictable */
- if(H5AC_pin_protected_entry(loc->file, ret_value) < 0) {
+ if(H5AC_pin_protected_entry(ret_value) < 0) {
if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, ret_value, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_PROTECT, NULL, "unable to release object header")
@@ -1587,20 +1587,17 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_unprotect(H5O_loc_t *loc, H5O_t *oh)
+H5O_unprotect(H5O_t *oh)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_unprotect, FAIL)
/* check args */
- HDassert(loc);
- HDassert(loc->file);
- HDassert(H5F_addr_defined(loc->addr));
HDassert(oh);
/* Mark object header as evictable again */
- if(H5AC_unpin_entry(loc->file, oh) < 0)
+ if(H5AC_unpin_entry(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
done:
@@ -1682,7 +1679,7 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
} /* end else */
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index ec93d9b..b50e96a 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -1018,7 +1018,7 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, UFAIL, "can't split null message")
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, UFAIL, "unable to mark object header as dirty")
/* Set return value */
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 56af565..d6e6ede 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -129,7 +129,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, unsigned UNUSED mesg_flags,
HDassert(s && !*s);
- if(H5HL_unprotect(f, heap) < 0)
+ if(H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read unprotect link value")
heap = NULL;
#endif
@@ -158,7 +158,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, unsigned UNUSED mesg_flags,
HDassert(mesg->slot[u].size > 0);
} /* end for */
- if(H5HL_unprotect(f, heap) < 0)
+ if(H5HL_unprotect(heap) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "unable to read unprotect link value")
heap = NULL;
@@ -481,7 +481,7 @@ H5O_efl_copy_file(H5F_t UNUSED *file_src, void *mesg_src, H5F_t *file_dst,
done:
/* Release resources */
- if(heap && H5HL_unprotect(file_dst, heap) < 0)
+ if(heap && H5HL_unprotect(heap) < 0)
HDONE_ERROR(H5E_EFL, H5E_PROTECT, NULL, "unable to unprotect EFL file name heap")
if(!ret_value)
if(efl_dst)
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 6c6dfb1..5dcba69 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -1336,7 +1336,7 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
@@ -1993,7 +1993,7 @@ H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
HGOTO_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f, oh) < 0)
+ if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
done:
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index fa779bf..e7cb10f 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -547,7 +547,7 @@ H5_DLL herr_t H5O_open(H5O_loc_t *loc);
H5_DLL herr_t H5O_close(H5O_loc_t *loc);
H5_DLL int H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id);
H5_DLL H5O_t *H5O_protect(H5O_loc_t *loc, hid_t dxpl_id);
-H5_DLL herr_t H5O_unprotect(H5O_loc_t *loc, H5O_t *oh);
+H5_DLL herr_t H5O_unprotect(H5O_t *oh);
H5_DLL herr_t H5O_touch(const H5O_loc_t *loc, hbool_t force, hid_t dxpl_id);
H5_DLL herr_t H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
hbool_t force);
diff --git a/test/cache.c b/test/cache.c
index 6ea92ef..a9865a8 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -39,20 +39,20 @@ static void smoke_check_10(void);
static void write_permitted_check(void);
static void check_insert_entry(void);
static void check_flush_cache(void);
-static void check_flush_cache__empty_cache(H5C_t * cache_ptr);
-static void check_flush_cache__multi_entry(H5C_t * cache_ptr);
-static void check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
+static void check_flush_cache__empty_cache(H5F_t * file_ptr);
+static void check_flush_cache__multi_entry(H5F_t * file_ptr);
+static void check_flush_cache__multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
struct flush_cache_test_spec spec[]);
-static void check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
+static void check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
struct pe_flush_cache_test_spec spec[]);
-static void check_flush_cache__single_entry(H5C_t * cache_ptr);
-static void check_flush_cache__single_entry_test(H5C_t * cache_ptr,
+static void check_flush_cache__single_entry(H5F_t * file_ptr);
+static void check_flush_cache__single_entry_test(H5F_t * file_ptr,
int test_num,
int entry_type,
int entry_idx,
@@ -64,7 +64,7 @@ static void check_flush_cache__single_entry_test(H5C_t * cache_ptr,
hbool_t expected_cleared,
hbool_t expected_flushed,
hbool_t expected_destroyed);
-static void check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
+static void check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
int test_num,
int entry_type,
int entry_idx,
@@ -78,8 +78,8 @@ static void check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
hbool_t expected_cleared,
hbool_t expected_flushed,
hbool_t expected_destroyed);
-static void check_flush_cache__flush_ops(H5C_t * cache_ptr);
-static void check_flush_cache__flush_op_test(H5C_t * cache_ptr,
+static void check_flush_cache__flush_ops(H5F_t * file_ptr);
+static void check_flush_cache__flush_op_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
@@ -90,13 +90,13 @@ static void check_flush_cache__flush_op_test(H5C_t * cache_ptr,
size_t expected_index_size,
int check_size,
struct fo_flush_entry_check check[]);
-static void check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr);
+static void check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr);
static void check_flush_protected_err(void);
static void check_get_entry_status(void);
static void check_expunge_entry(void);
static void check_multiple_read_protect(void);
static void check_rename_entry(void);
-static void check_rename_entry__run_test(H5C_t * cache_ptr, int test_num,
+static void check_rename_entry__run_test(H5F_t * file_ptr, int test_num,
struct rename_entry_test_spec * spec_ptr);
static void check_pin_protected_entry(void);
static void check_resize_entry(void);
@@ -161,7 +161,7 @@ smoke_check_1(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache");
@@ -186,14 +186,14 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -212,7 +212,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -231,7 +231,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -252,7 +252,7 @@ smoke_check_1(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -261,7 +261,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -277,7 +277,7 @@ smoke_check_1(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -286,7 +286,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -300,7 +300,7 @@ smoke_check_1(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -355,7 +355,7 @@ smoke_check_2(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache");
@@ -380,14 +380,14 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -406,7 +406,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -425,7 +425,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -446,7 +446,7 @@ smoke_check_2(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -455,7 +455,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -471,7 +471,7 @@ smoke_check_2(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -480,7 +480,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -494,7 +494,7 @@ smoke_check_2(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -548,7 +548,7 @@ smoke_check_3(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache");
@@ -573,14 +573,14 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -599,7 +599,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -618,7 +618,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -639,7 +639,7 @@ smoke_check_3(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -648,7 +648,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -664,7 +664,7 @@ smoke_check_3(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -673,7 +673,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -687,7 +687,7 @@ smoke_check_3(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -742,7 +742,7 @@ smoke_check_4(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache");
@@ -767,14 +767,14 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -793,7 +793,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -812,7 +812,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -833,7 +833,7 @@ smoke_check_4(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -842,7 +842,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -858,7 +858,7 @@ smoke_check_4(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -867,7 +867,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -881,7 +881,7 @@ smoke_check_4(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -936,6 +936,7 @@ smoke_check_5(void)
hbool_t display_stats = FALSE;
int32_t max_index = 1024;
int mile_stone = 1;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -1014,8 +1015,9 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( pass ) {
@@ -1032,7 +1034,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1045,7 +1047,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1058,7 +1060,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1073,7 +1075,7 @@ smoke_check_5(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1082,7 +1084,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1098,7 +1100,7 @@ smoke_check_5(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1107,7 +1109,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1121,7 +1123,7 @@ smoke_check_5(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -1176,6 +1178,7 @@ smoke_check_6(void)
hbool_t display_stats = FALSE;
int mile_stone = 1;
int32_t max_index = 1024;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -1254,8 +1257,9 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( pass ) {
@@ -1272,7 +1276,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1285,7 +1289,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1298,7 +1302,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1313,7 +1317,7 @@ smoke_check_6(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1322,7 +1326,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1338,7 +1342,7 @@ smoke_check_6(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1347,7 +1351,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1361,7 +1365,7 @@ smoke_check_6(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -1416,6 +1420,7 @@ smoke_check_7(void)
hbool_t display_stats = FALSE;
int mile_stone = 1;
int32_t max_index = 1024;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -1495,8 +1500,9 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( pass ) {
@@ -1513,7 +1519,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1526,7 +1532,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1539,7 +1545,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1554,7 +1560,7 @@ smoke_check_7(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1563,7 +1569,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1579,7 +1585,7 @@ smoke_check_7(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1588,7 +1594,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1602,7 +1608,7 @@ smoke_check_7(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -1657,6 +1663,7 @@ smoke_check_8(void)
hbool_t display_stats = FALSE;
int mile_stone = 1;
int32_t max_index = 1024;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -1736,8 +1743,9 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( pass ) {
@@ -1754,7 +1762,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1767,7 +1775,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1780,7 +1788,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_row_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1795,7 +1803,7 @@ smoke_check_8(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1804,7 +1812,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_forward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1820,7 +1828,7 @@ smoke_check_8(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -1829,7 +1837,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- hl_col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ hl_col_major_scan_backward(/* file_ptr */ file_ptr,
/* max_index */ max_index,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1843,7 +1851,7 @@ smoke_check_8(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 11 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -1901,6 +1909,7 @@ smoke_check_9(void)
hbool_t display_detailed_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked");
@@ -1926,8 +1935,9 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
+ cache_ptr = file_ptr->shared->cache;
/* disable evictions */
@@ -1950,7 +1960,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -1986,7 +1996,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2020,7 +2030,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled \n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2056,7 +2066,7 @@ smoke_check_9(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2080,7 +2090,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2096,7 +2106,7 @@ smoke_check_9(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2120,7 +2130,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2150,7 +2160,7 @@ smoke_check_9(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 18 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -2208,6 +2218,7 @@ smoke_check_10(void)
hbool_t display_detailed_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked");
@@ -2233,14 +2244,15 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(4 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(4 * 1024 * 1024),
(size_t)(2 * 1024 * 1024));
+ cache_ptr = file_ptr->shared->cache;
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2274,7 +2286,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2308,7 +2320,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2344,7 +2356,7 @@ smoke_check_10(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2368,7 +2380,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2399,7 +2411,7 @@ smoke_check_10(void)
/* flush all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ FALSE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2423,7 +2435,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2452,7 +2464,7 @@ smoke_check_10(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 18 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -2504,7 +2516,7 @@ write_permitted_check(void)
hbool_t display_stats = FALSE;
int32_t lag = 10;
int mile_stone = 1;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -2524,14 +2536,14 @@ write_permitted_check(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- cache_ptr = setup_cache((size_t)(1 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(1 * 1024 * 1024),
(size_t)(0));
if ( show_progress ) /* 3 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2552,7 +2564,7 @@ write_permitted_check(void)
write_permitted = FALSE;
- row_major_scan_backward(/* cache_ptr */ cache_ptr,
+ row_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2573,7 +2585,7 @@ write_permitted_check(void)
write_permitted = TRUE;
- row_major_scan_forward(/* cache_ptr */ cache_ptr,
+ row_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2594,7 +2606,7 @@ write_permitted_check(void)
/* flush and destroy all entries in the cache: */
- flush_cache(/* cache_ptr */ cache_ptr,
+ flush_cache(/* file_ptr */ file_ptr,
/* destroy_entries */ TRUE,
/* dump_stats */ FALSE,
/* dump_detailed_stats */ FALSE);
@@ -2603,7 +2615,7 @@ write_permitted_check(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- col_major_scan_forward(/* cache_ptr */ cache_ptr,
+ col_major_scan_forward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2619,7 +2631,7 @@ write_permitted_check(void)
write_permitted = FALSE;
- col_major_scan_backward(/* cache_ptr */ cache_ptr,
+ col_major_scan_backward(/* file_ptr */ file_ptr,
/* lag */ lag,
/* verbose */ FALSE,
/* reset_stats */ TRUE,
@@ -2635,7 +2647,7 @@ write_permitted_check(void)
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
fcn_name, mile_stone++, (int)pass);
- takedown_cache(cache_ptr, display_stats, TRUE);
+ takedown_cache(file_ptr, display_stats, TRUE);
if ( show_progress ) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -2698,6 +2710,7 @@ check_insert_entry(void)
hbool_t is_protected;
hbool_t is_pinned;
size_t entry_size;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -2722,18 +2735,17 @@ check_insert_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
- insert_entry(cache_ptr, entry_type, 0, TRUE, H5C__NO_FLAGS_SET);
- insert_entry(cache_ptr, entry_type, 1, TRUE,
- H5C__SET_FLUSH_MARKER_FLAG);
- insert_entry(cache_ptr, entry_type, 2, TRUE, H5C__PIN_ENTRY_FLAG);
- insert_entry(cache_ptr, entry_type, 3, TRUE,
- (H5C__SET_FLUSH_MARKER_FLAG | H5C__PIN_ENTRY_FLAG));
+ insert_entry(file_ptr, entry_type, 0, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, entry_type, 1, TRUE, H5C__SET_FLUSH_MARKER_FLAG);
+ insert_entry(file_ptr, entry_type, 2, TRUE, H5C__PIN_ENTRY_FLAG);
+ insert_entry(file_ptr, entry_type, 3, TRUE, (H5C__SET_FLUSH_MARKER_FLAG | H5C__PIN_ENTRY_FLAG));
}
@@ -2747,7 +2759,7 @@ check_insert_entry(void)
/* Start by checking everything we can via H5C_get_entry_status() */
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned);
@@ -2945,13 +2957,13 @@ check_insert_entry(void)
if ( pass ) {
- unpin_entry(cache_ptr, entry_type, 2);
- unpin_entry(cache_ptr, entry_type, 3);
+ unpin_entry(entry_type, 2);
+ unpin_entry(entry_type, 3);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -2987,7 +2999,7 @@ static void
check_flush_cache(void)
{
const char * fcn_name = "check_flush_cache";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("H5C_flush_cache() functionality");
@@ -3002,7 +3014,7 @@ check_flush_cache(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
}
@@ -3012,7 +3024,7 @@ check_flush_cache(void)
if ( pass ) {
- check_flush_cache__empty_cache(cache_ptr);
+ check_flush_cache__empty_cache(file_ptr);
}
/* now do a series of similar tests with a cache with a single entry.
@@ -3021,22 +3033,22 @@ check_flush_cache(void)
if ( pass ) {
- check_flush_cache__single_entry(cache_ptr);
+ check_flush_cache__single_entry(file_ptr);
}
if ( pass ) {
- check_flush_cache__multi_entry(cache_ptr);
+ check_flush_cache__multi_entry(file_ptr);
}
if ( pass ) {
- check_flush_cache__flush_ops(cache_ptr);
+ check_flush_cache__flush_ops(file_ptr);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -3069,9 +3081,10 @@ check_flush_cache(void)
*/
static void
-check_flush_cache__empty_cache(H5C_t * cache_ptr)
+check_flush_cache__empty_cache(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__empty_cache"; */
+ H5C_t * cache_ptr = file_ptr->shared->cache;
herr_t result;
if ( cache_ptr == NULL ) {
@@ -3093,7 +3106,8 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ H5C__NO_FLAGS_SET);
if ( result < 0 ) {
@@ -3104,7 +3118,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -3116,7 +3130,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_CLEAR_ONLY_FLAG);
if ( result < 0 ) {
@@ -3129,7 +3143,7 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_MARKED_ENTRIES_FLAG);
if ( result < 0 ) {
@@ -3162,9 +3176,10 @@ check_flush_cache__empty_cache(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__multi_entry(H5C_t * cache_ptr)
+check_flush_cache__multi_entry(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__multi_entry"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
if ( cache_ptr == NULL ) {
@@ -3283,7 +3298,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3393,7 +3408,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3503,7 +3518,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3613,7 +3628,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3724,7 +3739,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3835,7 +3850,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -3946,7 +3961,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4058,7 +4073,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4172,7 +4187,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4339,7 +4354,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4485,7 +4500,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4622,7 +4637,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4768,7 +4783,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4911,7 +4926,7 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
}
};
- check_flush_cache__pe_multi_entry_test(cache_ptr, test_num,
+ check_flush_cache__pe_multi_entry_test(file_ptr, test_num,
flush_flags, spec_size, spec);
}
@@ -4936,13 +4951,14 @@ check_flush_cache__multi_entry(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
+check_flush_cache__multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
struct flush_cache_test_spec spec[])
{
/* const char * fcn_name = "check_flush_cache__multi_entry_test"; */
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
int i;
@@ -5007,14 +5023,14 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
{
if ( spec[i].insert_flag ) {
- insert_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].dirty_flag, spec[i].flags);
} else {
- protect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index);
+ protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
- unprotect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
(int)(spec[i].dirty_flag), spec[i].flags);
}
@@ -5025,7 +5041,7 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, flush_flags);
if ( result < 0 ) {
@@ -5102,7 +5118,7 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -5160,13 +5176,14 @@ check_flush_cache__multi_entry_test(H5C_t * cache_ptr,
*/
static void
-check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
+check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
struct pe_flush_cache_test_spec spec[])
{
/* const char * fcn_name = "check_flush_cache__pe_multi_entry_test"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
int i;
@@ -5234,14 +5251,14 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
{
if ( spec[i].insert_flag ) {
- insert_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].dirty_flag, spec[i].flags);
} else {
- protect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index);
+ protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
- unprotect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ unprotect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
(int)(spec[i].dirty_flag), spec[i].flags);
}
@@ -5249,7 +5266,7 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
for ( j = 0; j < spec[i].num_pins; j++ )
{
- create_pinned_entry_dependency(cache_ptr,
+ create_pinned_entry_dependency(file_ptr,
spec[i].entry_type,
spec[i].entry_index,
spec[i].pin_type[j],
@@ -5261,7 +5278,8 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ flush_flags);
if ( result < 0 ) {
@@ -5338,7 +5356,7 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -5402,9 +5420,10 @@ check_flush_cache__pe_multi_entry_test(H5C_t * cache_ptr,
*/
static void
-check_flush_cache__flush_ops(H5C_t * cache_ptr)
+check_flush_cache__flush_ops(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__flush_ops"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
if ( cache_ptr == NULL ) {
@@ -5510,7 +5529,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5618,7 +5637,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5695,7 +5714,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5774,7 +5793,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5854,7 +5873,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5882,7 +5901,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
spec[0].flush_ops[0].flag = TRUE;
test_num = 6;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5966,7 +5985,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -5999,7 +6018,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
spec[0].flush_ops[0].flag = TRUE;
spec[0].expected_destroyed = TRUE;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6080,7 +6099,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6108,7 +6127,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
spec[0].flush_ops[0].flag = TRUE;
test_num = 10;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6192,7 +6211,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6225,7 +6244,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
spec[0].expected_destroyed = TRUE;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6322,7 +6341,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6420,7 +6439,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6517,7 +6536,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6614,7 +6633,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6711,7 +6730,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6739,7 +6758,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
checks[0].at_main_addr = TRUE;
checks[1].at_main_addr = TRUE;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6840,7 +6859,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -6876,7 +6895,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
checks[1].in_cache = FALSE;
checks[1].expected_destroyed = TRUE;
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7095,7 +7114,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7366,7 +7385,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7636,7 +7655,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7773,7 +7792,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -7907,7 +7926,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -8338,7 +8357,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -8775,7 +8794,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -8966,7 +8985,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -9159,7 +9178,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
};
- check_flush_cache__flush_op_test(cache_ptr,
+ check_flush_cache__flush_op_test(file_ptr,
test_num,
flush_flags,
spec_size,
@@ -9175,7 +9194,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
}
/* finally finish up with the flush ops eviction test */
- check_flush_cache__flush_op_eviction_test(cache_ptr);
+ check_flush_cache__flush_op_eviction_test(file_ptr);
return;
@@ -9199,7 +9218,7 @@ check_flush_cache__flush_ops(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__flush_op_test(H5C_t * cache_ptr,
+check_flush_cache__flush_op_test(H5F_t * file_ptr,
int test_num,
unsigned int flush_flags,
int spec_size,
@@ -9212,6 +9231,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
struct fo_flush_entry_check check[])
{
/* const char * fcn_name = "check_flush_cache__flush_op_test"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
int i;
@@ -9315,21 +9335,21 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
{
if ( spec[i].insert_flag ) {
- insert_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index,
+ insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
TRUE, spec[i].flags);
} else {
- protect_entry(cache_ptr, spec[i].entry_type, spec[i].entry_index);
+ protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
- unprotect_entry_with_size_change(cache_ptr, spec[i].entry_type,
+ unprotect_entry_with_size_change(file_ptr, spec[i].entry_type,
spec[i].entry_index,
spec[i].flags, spec[i].new_size);
}
for ( j = 0; j < spec[i].num_pins; j++ )
{
- create_pinned_entry_dependency(cache_ptr,
+ create_pinned_entry_dependency(file_ptr,
spec[i].entry_type,
spec[i].entry_index,
spec[i].pin_type[j],
@@ -9365,7 +9385,8 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ flush_flags);
if ( result < 0 ) {
@@ -9563,7 +9584,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -9642,7 +9663,7 @@ check_flush_cache__flush_op_test(H5C_t * cache_ptr,
*/
static void
-check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
+check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__flush_op_eviction_test"; */
int i;
@@ -9650,6 +9671,7 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
int num_monster_entries = 31;
int num_large_entries = 0;
herr_t result;
+ H5C_t * cache_ptr = file_ptr->shared->cache;
test_entry_t * entry_ptr;
test_entry_t * base_addr;
struct expected_entry_status expected[8 + 31 + 14] =
@@ -9764,40 +9786,40 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
* Start by just loading the entries.
*/
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 0);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 0,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 0);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 0,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 1);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 1,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 1);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 1,
H5C__NO_FLAGS_SET, (size_t)0);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 2);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 2,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 2);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 2,
H5C__NO_FLAGS_SET, (size_t)0);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 3);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 3,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 3);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 3,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 4);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 4,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 4);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 4,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 5);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 5,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 5);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 5,
H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG,
(VARIABLE_ENTRY_SIZE / 2));
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 6);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 6,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 6);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 6,
H5C__NO_FLAGS_SET, (size_t)0);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 7);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 7,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 7);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 7,
H5C__NO_FLAGS_SET, (size_t)0);
if ( ( cache_ptr->index_len != 8 ) ||
@@ -9816,15 +9838,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
* Briefly, (VET, 0) is pinned by (VET, 1), (VET, 2), and (VET, 3)
* (VET, 7) is pinned by (VET, 3), and (VET, 5)
*/
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 1,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 1,
VARIABLE_ENTRY_TYPE, 0);
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 2,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 2,
VARIABLE_ENTRY_TYPE, 0);
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 3,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 3,
VARIABLE_ENTRY_TYPE, 0);
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 3,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 3,
VARIABLE_ENTRY_TYPE, 7);
- create_pinned_entry_dependency(cache_ptr, VARIABLE_ENTRY_TYPE, 5,
+ create_pinned_entry_dependency(file_ptr, VARIABLE_ENTRY_TYPE, 5,
VARIABLE_ENTRY_TYPE, 7);
/* Next, set up the flush operations:
@@ -9899,15 +9921,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
/* Now fill up the cache with other, unrelated entries */
for ( i = 0; i < 31; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 1; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -9974,8 +9996,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
num_large_entries = 2;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 1,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 1,
H5C__DIRTIED_FLAG, (size_t)0);
if ( ( cache_ptr->index_len != 40 ) ||
@@ -10040,8 +10062,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
num_large_entries = 3;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 2,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 2,
H5C__DIRTIED_FLAG, (size_t)0);
if ( ( cache_ptr->index_len != 40 ) ||
@@ -10113,12 +10135,12 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
num_large_entries = 5;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 3,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 3,
H5C__DIRTIED_FLAG, (size_t)0);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 4);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, 4,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 4);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, 4,
H5C__DIRTIED_FLAG, (size_t)0);
/* verify cache size */
@@ -10154,15 +10176,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
*/
for ( i = 0; i < 31; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 5; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10221,8 +10243,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 5; i < 8; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10283,8 +10305,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 8; i < 9; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10349,8 +10371,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 9; i < 10; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10385,15 +10407,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
*/
for ( i = 0; i < 31; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < 10; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10496,8 +10518,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 10; i < 12; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10529,15 +10551,15 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
*/
for ( i = 0; i < num_monster_entries; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, MONSTER_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
for ( i = 0; i < num_large_entries; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10623,8 +10645,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
for ( i = 12; i < 14; i++ )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
- unprotect_entry_with_size_change(cache_ptr, LARGE_ENTRY_TYPE, i,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
+ unprotect_entry_with_size_change(file_ptr, LARGE_ENTRY_TYPE, i,
H5C__DIRTIED_FLAG, (size_t)0);
}
@@ -10654,8 +10676,8 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
- H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -10791,9 +10813,10 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__single_entry(H5C_t * cache_ptr)
+check_flush_cache__single_entry(H5F_t * file_ptr)
{
/* const char * fcn_name = "check_flush_cache__single_entry"; */
+ H5C_t * cache_ptr = file_ptr->shared->cache;
if ( cache_ptr == NULL ) {
@@ -10811,7 +10834,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 1,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10830,7 +10853,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 2,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10849,7 +10872,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 3,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10868,7 +10891,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 4,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10887,7 +10910,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 5,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10906,7 +10929,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 6,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10925,7 +10948,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 7,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10944,7 +10967,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 8,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10963,7 +10986,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 9,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -10983,7 +11006,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 10,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11003,7 +11026,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 11,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11023,7 +11046,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 12,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11043,7 +11066,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 13,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11063,7 +11086,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 14,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11083,7 +11106,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 15,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11104,7 +11127,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 16,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11125,7 +11148,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 17,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11144,7 +11167,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 18,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11163,7 +11186,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 19,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11182,7 +11205,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 20,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11201,7 +11224,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 21,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11220,7 +11243,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 22,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11239,7 +11262,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 23,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11258,7 +11281,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 24,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11277,7 +11300,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 25,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11297,7 +11320,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 26,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11317,7 +11340,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 27,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11337,7 +11360,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 28,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11357,7 +11380,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 29,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11377,7 +11400,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 30,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11397,7 +11420,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 31,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11418,7 +11441,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 32,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11439,7 +11462,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 33,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11458,7 +11481,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 34,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11477,7 +11500,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 35,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11496,7 +11519,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 36,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11515,7 +11538,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 37,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11534,7 +11557,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 38,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11553,7 +11576,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 39,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11572,7 +11595,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 40,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11591,7 +11614,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 41,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11611,7 +11634,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 42,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11631,7 +11654,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 43,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11651,7 +11674,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 44,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11671,7 +11694,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 45,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11691,7 +11714,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 46,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11711,7 +11734,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 47,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11732,7 +11755,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 48,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11753,7 +11776,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 49,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11772,7 +11795,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 50,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11791,7 +11814,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 51,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11810,7 +11833,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 52,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11829,7 +11852,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 53,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11848,7 +11871,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 54,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11867,7 +11890,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 55,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11886,7 +11909,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 56,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11905,7 +11928,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 57,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11925,7 +11948,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 58,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11945,7 +11968,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 59,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11965,7 +11988,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 60,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -11985,7 +12008,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 61,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12005,7 +12028,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 62,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12025,7 +12048,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 63,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12046,7 +12069,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
check_flush_cache__single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ 64,
/* entry_type */ PICO_ENTRY_TYPE,
/* entry_idx */ 0,
@@ -12411,7 +12434,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
{
check_flush_cache__pinned_single_entry_test
(
- /* cache_ptr */ cache_ptr,
+ /* file_ptr */ file_ptr,
/* test_num */ spec[i].test_num,
/* entry_type */ spec[i].entry_type,
/* entry_idx */ spec[i].entry_idx,
@@ -12451,7 +12474,7 @@ check_flush_cache__single_entry(H5C_t * cache_ptr)
*/
static void
-check_flush_cache__single_entry_test(H5C_t * cache_ptr,
+check_flush_cache__single_entry_test(H5F_t * file_ptr,
int test_num,
int entry_type,
int entry_idx,
@@ -12465,6 +12488,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
hbool_t expected_destroyed)
{
/* const char * fcn_name = "check_flush_cache__single_entry_test"; */
+ H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
herr_t result;
test_entry_t * base_addr;
@@ -12504,20 +12528,20 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
if ( insert_flag ) {
- insert_entry(cache_ptr, entry_type, entry_idx, dirty_flag, flags);
+ insert_entry(file_ptr, entry_type, entry_idx, dirty_flag, flags);
} else {
- protect_entry(cache_ptr, entry_type, entry_idx);
+ protect_entry(file_ptr, entry_type, entry_idx);
- unprotect_entry(cache_ptr, entry_type, entry_idx,
+ unprotect_entry(file_ptr, entry_type, entry_idx,
(int)dirty_flag, flags);
}
}
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT, flush_flags);
if ( result < 0 ) {
@@ -12580,7 +12604,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -12638,7 +12662,7 @@ check_flush_cache__single_entry_test(H5C_t * cache_ptr,
*/
static void
-check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
+check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
int test_num,
int entry_type,
int entry_idx,
@@ -12654,6 +12678,7 @@ check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
hbool_t expected_destroyed)
{
/* const char *fcn_name = "check_flush_cache__pinned_single_entry_test"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
hbool_t expected_loaded = TRUE;
herr_t result;
@@ -12692,35 +12717,33 @@ check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
base_addr = entries[entry_type];
entry_ptr = &(base_addr[entry_idx]);
- protect_entry(cache_ptr, entry_type, entry_idx);
+ protect_entry(file_ptr, entry_type, entry_idx);
if ( pop_mark_dirty_prot ) {
- mark_pinned_or_protected_entry_dirty(cache_ptr,
- entry_type,
+ mark_pinned_or_protected_entry_dirty(entry_type,
entry_idx);
}
- unprotect_entry(cache_ptr, entry_type, entry_idx,
+ unprotect_entry(file_ptr, entry_type, entry_idx,
(int)dirty_flag, (flags | H5C__PIN_ENTRY_FLAG));
if ( mark_dirty ) {
- mark_pinned_entry_dirty(cache_ptr, entry_type, entry_idx,
- FALSE, (size_t)0);
+ mark_pinned_entry_dirty(entry_type, entry_idx, FALSE, (size_t)0);
}
if ( pop_mark_dirty_pinned ) {
- mark_pinned_or_protected_entry_dirty(cache_ptr,
- entry_type,
+ mark_pinned_or_protected_entry_dirty(entry_type,
entry_idx);
}
}
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ flush_flags);
if ( result < 0 ) {
@@ -12783,21 +12806,21 @@ check_flush_cache__pinned_single_entry_test(H5C_t * cache_ptr,
if ( unprotect_unpin ) {
- protect_entry(cache_ptr, entry_type, entry_idx);
+ protect_entry(file_ptr, entry_type, entry_idx);
- unprotect_entry(cache_ptr, entry_type, entry_idx,
+ unprotect_entry(file_ptr, entry_type, entry_idx,
(int)dirty_flag, H5C__UNPIN_ENTRY_FLAG);
} else {
- unpin_entry(cache_ptr, entry_type, entry_idx);
+ unpin_entry(entry_type, entry_idx);
}
}
if ( pass ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -12857,7 +12880,7 @@ check_get_entry_status(void)
hbool_t is_protected;
hbool_t is_pinned;
size_t entry_size;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -12869,7 +12892,7 @@ check_get_entry_status(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
base_addr = entries[0];
@@ -12882,7 +12905,7 @@ check_get_entry_status(void)
* the call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -12900,13 +12923,13 @@ check_get_entry_status(void)
}
}
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -12924,11 +12947,11 @@ check_get_entry_status(void)
}
}
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -12946,11 +12969,11 @@ check_get_entry_status(void)
}
}
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -12968,11 +12991,11 @@ check_get_entry_status(void)
}
}
- mark_pinned_entry_dirty(cache_ptr, 0, 0, FALSE, (size_t)0);
+ mark_pinned_entry_dirty(0, 0, FALSE, (size_t)0);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -12990,11 +13013,11 @@ check_get_entry_status(void)
}
}
- unpin_entry(cache_ptr, 0, 0);
+ unpin_entry(0, 0);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -13014,7 +13037,7 @@ check_get_entry_status(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -13058,7 +13081,7 @@ check_expunge_entry(void)
hbool_t is_protected;
hbool_t is_pinned;
size_t entry_size;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -13070,7 +13093,7 @@ check_expunge_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
base_addr = entries[0];
@@ -13083,7 +13106,7 @@ check_expunge_entry(void)
* the status call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned);
@@ -13116,13 +13139,13 @@ check_expunge_entry(void)
* it without marking it dirty.
*/
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -13154,7 +13177,7 @@ check_expunge_entry(void)
* Also verify that the entry was loaded, cleared, and destroyed, but
* not flushed.
*/
- expunge_entry(cache_ptr, 0, 0);
+ expunge_entry(file_ptr, 0, 0);
if ( pass ) {
@@ -13162,7 +13185,7 @@ check_expunge_entry(void)
* by the status call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned);
if ( result < 0 ) {
@@ -13203,7 +13226,7 @@ check_expunge_entry(void)
* the status call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned);
@@ -13236,13 +13259,13 @@ check_expunge_entry(void)
* it with the dirty flag set.
*/
- protect_entry(cache_ptr, 0, 1);
+ protect_entry(file_ptr, 0, 1);
- unprotect_entry(cache_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned);
@@ -13275,7 +13298,7 @@ check_expunge_entry(void)
* Also verify that the entry was loaded, cleared and destroyed, but not
* flushed.
*/
- expunge_entry(cache_ptr, 0, 1);
+ expunge_entry(file_ptr, 0, 1);
if ( pass ) {
@@ -13283,7 +13306,7 @@ check_expunge_entry(void)
* by the status call. Thus, only check that boolean.
*/
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned);
@@ -13314,7 +13337,7 @@ check_expunge_entry(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -13347,12 +13370,11 @@ check_expunge_entry(void)
*
*-------------------------------------------------------------------------
*/
-
-
static void
check_multiple_read_protect(void)
{
const char * fcn_name = "check_multiple_read_protect()";
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * entry_ptr;
@@ -13385,8 +13407,9 @@ check_multiple_read_protect(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
entry_ptr = &((entries[0])[0]);
@@ -13411,7 +13434,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -13434,7 +13457,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -13457,7 +13480,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -13480,7 +13503,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -13503,7 +13526,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -13526,7 +13549,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -13549,7 +13572,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( ! ( entry_ptr->header.is_read_only ) ) ||
@@ -13572,7 +13595,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( entry_ptr->header.is_protected ) ||
( entry_ptr->header.is_read_only ) ||
@@ -13600,7 +13623,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
if ( ( ! ( entry_ptr->header.is_protected ) ) ||
( entry_ptr->header.is_read_only ) ||
@@ -13623,7 +13646,7 @@ check_multiple_read_protect(void)
if ( pass )
{
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
if ( ( entry_ptr->header.is_protected ) ||
( entry_ptr->header.is_read_only ) ||
@@ -13655,36 +13678,36 @@ check_multiple_read_protect(void)
if ( pass ) {
- protect_entry(cache_ptr, 0, 2); /* (0,2) write */
- protect_entry_ro(cache_ptr, 0, 4); /* (0,4) read only (1) */
- protect_entry(cache_ptr, 0, 6); /* (0,6) write */
+ protect_entry(file_ptr, 0, 2); /* (0,2) write */
+ protect_entry_ro(file_ptr, 0, 4); /* (0,4) read only (1) */
+ protect_entry(file_ptr, 0, 6); /* (0,6) write */
- unprotect_entry(cache_ptr, 0, 2, FALSE, /* (0,2) unprotect */
+ unprotect_entry(file_ptr, 0, 2, FALSE, /* (0,2) unprotect */
H5C__NO_FLAGS_SET);
- protect_entry_ro(cache_ptr, 0, 2); /* (0,2) read only (1) */
- protect_entry(cache_ptr, 0, 1); /* (0,1) write */
- protect_entry_ro(cache_ptr, 0, 4); /* (0,4) read only (2) */
- protect_entry(cache_ptr, 0, 0); /* (0,0) write */
- protect_entry_ro(cache_ptr, 0, 2); /* (0,2) read only (2) */
+ protect_entry_ro(file_ptr, 0, 2); /* (0,2) read only (1) */
+ protect_entry(file_ptr, 0, 1); /* (0,1) write */
+ protect_entry_ro(file_ptr, 0, 4); /* (0,4) read only (2) */
+ protect_entry(file_ptr, 0, 0); /* (0,0) write */
+ protect_entry_ro(file_ptr, 0, 2); /* (0,2) read only (2) */
- unprotect_entry(cache_ptr, 0, 2, FALSE, /* (0,2) read only (1) pin */
+ unprotect_entry(file_ptr, 0, 2, FALSE, /* (0,2) read only (1) pin */
H5C__PIN_ENTRY_FLAG);
- unprotect_entry(cache_ptr, 0, 6, FALSE, /* (0,6) unprotect */
+ unprotect_entry(file_ptr, 0, 6, FALSE, /* (0,6) unprotect */
H5C__NO_FLAGS_SET);
- protect_entry_ro(cache_ptr, 0, 4); /* (0,4) read only (3) */
+ protect_entry_ro(file_ptr, 0, 4); /* (0,4) read only (3) */
- unprotect_entry(cache_ptr, 0, 2, FALSE, /* (0,2) unprotect */
+ unprotect_entry(file_ptr, 0, 2, FALSE, /* (0,2) unprotect */
H5C__NO_FLAGS_SET);
- unprotect_entry(cache_ptr, 0, 1, FALSE, /* (0,1) unprotect */
+ unprotect_entry(file_ptr, 0, 1, FALSE, /* (0,1) unprotect */
H5C__NO_FLAGS_SET);
if ( pass ) {
entry_ptr = &((entries[0])[4]);
- if ( H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr) < 0 ) {
+ if ( H5C_pin_protected_entry((void *)entry_ptr) < 0 ) {
pass = FALSE;
failure_mssg = "H5C_pin_protected_entry() failed.\n";
@@ -13702,9 +13725,9 @@ check_multiple_read_protect(void)
}
}
- unprotect_entry(cache_ptr, 0, 4, FALSE, /* (0,4) read only (2) */
+ unprotect_entry(file_ptr, 0, 4, FALSE, /* (0,4) read only (2) */
H5C__NO_FLAGS_SET);
- unprotect_entry(cache_ptr, 0, 4, FALSE, /* (0,4) read only (1) */
+ unprotect_entry(file_ptr, 0, 4, FALSE, /* (0,4) read only (1) */
H5C__UNPIN_ENTRY_FLAG);
if ( ( pass ) && ( entry_ptr->header.is_pinned ) ) {
@@ -13714,12 +13737,12 @@ check_multiple_read_protect(void)
}
- unprotect_entry(cache_ptr, 0, 4, FALSE, /* (0,4) unprotect */
+ unprotect_entry(file_ptr, 0, 4, FALSE, /* (0,4) unprotect */
H5C__NO_FLAGS_SET);
- unprotect_entry(cache_ptr, 0, 0, FALSE, /* (0,0) unprotect */
+ unprotect_entry(file_ptr, 0, 0, FALSE, /* (0,0) unprotect */
H5C__NO_FLAGS_SET);
- unpin_entry(cache_ptr, 0, 2);
+ unpin_entry(0, 2);
}
#if H5C_COLLECT_CACHE_STATS
@@ -13735,7 +13758,7 @@ check_multiple_read_protect(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -13773,7 +13796,7 @@ check_rename_entry(void)
{
const char * fcn_name = "check_rename_entry";
int i;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
struct rename_entry_test_spec test_specs[4] =
{
{
@@ -13835,20 +13858,20 @@ check_rename_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
}
i = 0;
while ( ( pass ) && ( i < 4 ) )
{
- check_rename_entry__run_test(cache_ptr, i, &(test_specs[i]));
+ check_rename_entry__run_test(file_ptr, i, &(test_specs[i]));
i++;
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -13884,11 +13907,12 @@ check_rename_entry(void)
*/
static void
-check_rename_entry__run_test(H5C_t * cache_ptr,
+check_rename_entry__run_test(H5F_t * file_ptr,
int test_num,
struct rename_entry_test_spec * spec_ptr)
{
/* const char * fcn_name = "check_rename_entry__run_test"; */
+ H5C_t *cache_ptr = file_ptr->shared->cache;
static char msg[128];
unsigned int flags = H5C__NO_FLAGS_SET;
test_entry_t * base_addr;
@@ -13936,9 +13960,9 @@ check_rename_entry__run_test(H5C_t * cache_ptr,
}
}
- protect_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index);
+ protect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index);
- unprotect_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index,
+ unprotect_entry(file_ptr, spec_ptr->entry_type, spec_ptr->entry_index,
(int)(spec_ptr->is_dirty), flags);
rename_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, FALSE);
@@ -13981,7 +14005,7 @@ check_rename_entry__run_test(H5C_t * cache_ptr,
}
}
- unpin_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index);
+ unpin_entry(spec_ptr->entry_type, spec_ptr->entry_index);
} else {
@@ -14035,7 +14059,7 @@ check_pin_protected_entry(void)
const char * fcn_name = "check_pin_protected_entry";
static char msg[128];
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -14052,18 +14076,18 @@ check_pin_protected_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
}
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
if ( pass ) {
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
- result = H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_pin_protected_entry((void *)entry_ptr);
if ( result < 0 ) {
@@ -14084,11 +14108,11 @@ check_pin_protected_entry(void)
}
}
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -14134,6 +14158,7 @@ check_resize_entry(void)
hbool_t is_pinned;
size_t entry_size;
size_t reported_entry_size;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -14177,8 +14202,9 @@ check_resize_entry(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
(size_t)(1 * 1024 * 1024));
+ cache_ptr = file_ptr->shared->cache;
base_addr = entries[LARGE_ENTRY_TYPE];
entry_ptr = &(base_addr[0]);
@@ -14199,7 +14225,7 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
if ( pass ) {
@@ -14218,7 +14244,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14249,11 +14275,9 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr,
- H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG,
- (LARGE_ENTRY_SIZE / 2));
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2));
if ( result < 0 ) {
@@ -14288,7 +14312,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14318,15 +14342,13 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr,
- (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG),
- LARGE_ENTRY_SIZE);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -14361,7 +14383,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14391,14 +14413,13 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__PIN_ENTRY_FLAG);
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr,
- (LARGE_ENTRY_SIZE / 4));
+ result = H5C_resize_pinned_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
if ( result < 0 ) {
@@ -14426,7 +14447,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14458,8 +14479,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr,
- LARGE_ENTRY_SIZE);
+ result = H5C_resize_pinned_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -14487,7 +14507,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14517,14 +14537,14 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE,
H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned);
@@ -14587,14 +14607,14 @@ check_resize_entry(void)
entry_size = LARGE_ENTRY_SIZE;
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__NO_FLAGS_SET);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1, TRUE, H5C__NO_FLAGS_SET);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, TRUE, H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__NO_FLAGS_SET);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__NO_FLAGS_SET);
if ( pass ) {
@@ -14611,7 +14631,7 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
if ( pass ) {
@@ -14630,7 +14650,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14661,11 +14681,9 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr,
- H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG,
- (LARGE_ENTRY_SIZE / 2));
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__SIZE_CHANGED_FLAG | H5C__DIRTIED_FLAG, (LARGE_ENTRY_SIZE / 2));
if ( result < 0 ) {
@@ -14702,7 +14720,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14732,15 +14750,13 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr,
- &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr,
- (void *)entry_ptr,
- (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG),
- LARGE_ENTRY_SIZE);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[LARGE_ENTRY_TYPE]), entry_ptr->addr, (void *)entry_ptr,
+ (H5C__DIRTIED_FLAG | H5C__SIZE_CHANGED_FLAG), LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -14775,7 +14791,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14805,14 +14821,13 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE, H5C__PIN_ENTRY_FLAG);
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr,
- (LARGE_ENTRY_SIZE / 4));
+ result = H5C_resize_pinned_entry((void *)entry_ptr, (LARGE_ENTRY_SIZE / 4));
if ( result < 0 ) {
@@ -14842,7 +14857,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14874,8 +14889,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr,
- LARGE_ENTRY_SIZE);
+ result = H5C_resize_pinned_entry((void *)entry_ptr, LARGE_ENTRY_SIZE);
if ( result < 0 ) {
@@ -14903,7 +14917,7 @@ check_resize_entry(void)
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
&reported_entry_size, &in_cache,
&is_dirty, &is_protected, &is_pinned);
@@ -14933,14 +14947,14 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, FALSE,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, FALSE,
H5C__UNPIN_ENTRY_FLAG | H5C__DELETED_FLAG);
if ( pass ) {
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr, &entry_size,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected,
&is_pinned);
@@ -14983,14 +14997,14 @@ check_resize_entry(void)
}
}
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__DELETED_FLAG);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, FALSE, H5C__DELETED_FLAG);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1, FALSE, H5C__DELETED_FLAG);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, FALSE, H5C__DELETED_FLAG);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__DELETED_FLAG);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, FALSE, H5C__DELETED_FLAG);
if ( pass ) {
@@ -15009,7 +15023,7 @@ check_resize_entry(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -15055,6 +15069,7 @@ check_evictions_enabled(void)
int i;
int mile_stone = 1;
size_t entry_size;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -15107,8 +15122,9 @@ check_evictions_enabled(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(1 * 1024 * 1024),
+ file_ptr = setup_cache((size_t)(1 * 1024 * 1024),
(size_t)( 512 * 1024));
+ cache_ptr = file_ptr->shared->cache;
base_addr = entries[MONSTER_ENTRY_TYPE];
entry_size = MONSTER_ENTRY_SIZE;
@@ -15158,8 +15174,8 @@ check_evictions_enabled(void)
/* fill the cache */
for ( i = 0; i < 16 ; i++ )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
FALSE, H5C__NO_FLAGS_SET);
}
@@ -15189,8 +15205,8 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* protect and unprotect another entry */
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 16);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 16,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 16,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 7 */
@@ -15221,7 +15237,7 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[0]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -15254,7 +15270,7 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* insert an entry */
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 17, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 17, TRUE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 10 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -15284,7 +15300,7 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[1]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -15354,8 +15370,8 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* protect and unprotect another entry */
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 18);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 18,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 18,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 15 */
@@ -15383,7 +15399,7 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* insert another entry */
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 19, TRUE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 17 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -15427,8 +15443,8 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* protect and unprotect an entry that is in the cache */
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 19,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 19,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 20 */
@@ -15456,8 +15472,8 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* protect and unprotect an entry that isn't in the cache */
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 20);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 20,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 20,
FALSE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 22 */
@@ -15491,7 +15507,7 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[2]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -15527,7 +15543,7 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[3]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -15579,8 +15595,8 @@ check_evictions_enabled(void)
/* protect and unprotect an entry that isn't in the cache, forcing
* the cache to grow.
*/
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 21);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 21,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 21,
FALSE, H5C__NO_FLAGS_SET);
@@ -15626,7 +15642,7 @@ check_evictions_enabled(void)
fcn_name, mile_stone++, (int)pass);
/* insert an entry */
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 22, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 22, TRUE, H5C__NO_FLAGS_SET);
if ( show_progress ) /* 30 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
@@ -15656,7 +15672,7 @@ check_evictions_enabled(void)
entry_ptr = &(base_addr[4]);
- result = H5C_get_entry_status(cache_ptr, entry_ptr->addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->addr,
NULL, &in_cache, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -15707,7 +15723,7 @@ check_evictions_enabled(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) /* 34 */
@@ -15747,7 +15763,7 @@ static void
check_flush_protected_err(void)
{
const char * fcn_name = "check_flush_protected_err";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("flush cache with protected entry error");
@@ -15762,30 +15778,30 @@ check_flush_protected_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- if ( H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET)
- >= 0 ) {
+ if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ H5C__NO_FLAGS_SET) >= 0 ) {
pass = FALSE;
failure_mssg = "flush succeeded on cache with protected entry.\n";
} else {
- unprotect_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- if ( H5C_flush_cache(NULL, -1, -1, cache_ptr, H5C__NO_FLAGS_SET)
- < 0 ) {
+ if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ H5C__NO_FLAGS_SET) < 0 ) {
pass = FALSE;
failure_mssg = "flush failed after unprotect.\n";
} else {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
}
}
@@ -15820,11 +15836,13 @@ check_flush_protected_err(void)
*-------------------------------------------------------------------------
*/
+extern H5C_t * saved_cache;
+
static void
check_destroy_pinned_err(void)
{
const char * fcn_name = "check_destroy_pinned_err()";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("destroy cache with permanently pinned entry error");
@@ -15839,28 +15857,44 @@ check_destroy_pinned_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ protect_entry(file_ptr, 0, 0);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
- if ( H5C_dest(NULL, -1, -1, cache_ptr) >= 0 ) {
+ if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) >= 0 ) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with pinned entry.\n";
} else {
- unpin_entry(cache_ptr, 0, 0);
+ unpin_entry(0, 0);
- if ( H5C_dest(NULL, -1, -1, cache_ptr) < 0 ) {
+ if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) < 0 ) {
pass = FALSE;
failure_mssg = "destroy failed after unpin.\n";
- }
+ } else {
+ file_ptr->shared->cache = NULL;
+ }
+ }
+
+ if ( saved_cache != NULL ) {
+
+ file_ptr->shared->cache = saved_cache;
+ saved_cache = NULL;
+
}
+
+ /* call takedown_cache() with a NULL file_ptr parameter.
+ * This causes the function to close and delete the file,
+ * while skipping the call to H5C_dest().
+ */
+ takedown_cache(NULL, FALSE, FALSE);
+
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -15896,7 +15930,7 @@ static void
check_destroy_protected_err(void)
{
const char * fcn_name = "check_destroy_protected_err";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
TESTING("destroy cache with protected entry error");
@@ -15911,27 +15945,42 @@ check_destroy_protected_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- if ( H5C_dest(NULL, -1, -1, cache_ptr) >= 0 ) {
+ if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) >= 0 ) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with protected entry.\n";
} else {
- unprotect_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- if ( H5C_dest(NULL, -1, -1, cache_ptr) < 0 ) {
+ if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT) < 0 ) {
pass = FALSE;
failure_mssg = "destroy failed after unprotect.\n";
- }
+ } else {
+ file_ptr->shared->cache = NULL;
+ }
+ }
+
+ if ( saved_cache != NULL ) {
+
+ file_ptr->shared->cache = saved_cache;
+ saved_cache = NULL;
+
}
+
+ /* call takedown_cache() with a NULL file_ptr parameter.
+ * This causes the function to close and delete the file,
+ * while skipping the call to H5C_dest().
+ */
+ takedown_cache(NULL, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -15968,7 +16017,7 @@ check_duplicate_insert_err(void)
{
const char * fcn_name = "check_duplicate_insert_err";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -15985,19 +16034,18 @@ check_duplicate_insert_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
if ( pass ) {
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
- result = H5C_insert_entry(NULL, -1, -1, cache_ptr,
- &(types[0]), entry_ptr->addr,
- (void *)entry_ptr, H5C__NO_FLAGS_SET);
+ result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET);
if ( result >= 0 ) {
@@ -16006,9 +16054,9 @@ check_duplicate_insert_err(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
}
}
@@ -16047,6 +16095,7 @@ check_rename_err(void)
{
const char * fcn_name = "check_rename_err()";
herr_t result;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
test_entry_t * entry_0_0_ptr;
test_entry_t * entry_0_1_ptr;
@@ -16065,12 +16114,13 @@ check_rename_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
- insert_entry(cache_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
- insert_entry(cache_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET);
- insert_entry(cache_ptr, 1, 0, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, 0, 0, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, 0, 1, TRUE, H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, 1, 0, TRUE, H5C__NO_FLAGS_SET);
entry_0_0_ptr = &((entries[0])[0]);
entry_0_1_ptr = &((entries[0])[1]);
@@ -16103,7 +16153,7 @@ check_rename_err(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16142,7 +16192,7 @@ check_double_pin_err(void)
{
const char * fcn_name = "check_double_pin_err()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("pin a pinned entry error");
@@ -16159,23 +16209,23 @@ check_double_pin_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__PIN_ENTRY_FLAG, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__PIN_ENTRY_FLAG, (size_t)0);
if ( result > 0 ) {
@@ -16185,13 +16235,13 @@ check_double_pin_err(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
}
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16230,7 +16280,7 @@ check_double_unpin_err(void)
{
const char * fcn_name = "check_double_unpin_err()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("unpin an unpinned entry error");
@@ -16249,19 +16299,19 @@ check_double_unpin_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__UNPIN_ENTRY_FLAG, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__UNPIN_ENTRY_FLAG, (size_t)0);
if ( result > 0 ) {
@@ -16271,13 +16321,13 @@ check_double_unpin_err(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
}
if ( pass ) {
- result = H5C_unpin_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_unpin_entry((void *)entry_ptr);
if ( result > 0 ) {
@@ -16290,7 +16340,7 @@ check_double_unpin_err(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16329,7 +16379,7 @@ check_pin_entry_errs(void)
{
const char * fcn_name = "check_pin_entry_errs()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("pin entry related errors");
@@ -16352,19 +16402,19 @@ check_pin_entry_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_pin_protected_entry((void *)entry_ptr);
if ( result > 0 ) {
@@ -16374,17 +16424,17 @@ check_pin_entry_errs(void)
} else {
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
}
}
if ( pass ) {
- result = H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_pin_protected_entry((void *)entry_ptr);
if ( result > 0 ) {
@@ -16394,14 +16444,14 @@ check_pin_entry_errs(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
}
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16442,7 +16492,7 @@ static void
check_double_protect_err(void)
{
const char * fcn_name = "check_double_protect_err()";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
H5C_cache_entry_t * cache_entry_ptr;
@@ -16459,19 +16509,18 @@ check_double_protect_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- cache_entry_ptr = H5C_protect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, NULL, NULL,
- H5C__NO_FLAGS_SET);
+ cache_entry_ptr = H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
if ( cache_entry_ptr != NULL ) {
@@ -16482,12 +16531,12 @@ check_double_protect_err(void)
if ( pass ) {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16532,7 +16581,7 @@ check_double_unprotect_err(void)
{
const char * fcn_name = "check_double_unprotect_err()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("unprotect an unprotected entry error");
@@ -16548,21 +16597,21 @@ check_double_unprotect_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__NO_FLAGS_SET, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__NO_FLAGS_SET, (size_t)0);
if ( result > 0 ) {
@@ -16574,7 +16623,7 @@ check_double_unprotect_err(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16622,7 +16671,7 @@ check_mark_entry_dirty_errs(void)
{
const char * fcn_name = "check_mark_entry_dirty_errs()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("mark entry dirty related errors");
@@ -16645,22 +16694,21 @@ check_mark_entry_dirty_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_mark_pinned_entry_dirty(cache_ptr, (void *)entry_ptr,
- FALSE, (size_t)0);
+ result = H5C_mark_pinned_entry_dirty((void *)entry_ptr, FALSE, (size_t)0);
if ( result > 0 ) {
@@ -16670,14 +16718,13 @@ check_mark_entry_dirty_errs(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
}
}
if ( pass ) {
- result = H5C_mark_pinned_entry_dirty(cache_ptr, (void *)entry_ptr,
- FALSE, (size_t)0);
+ result = H5C_mark_pinned_entry_dirty((void *)entry_ptr, FALSE, (size_t)0);
if ( result > 0 ) {
@@ -16690,8 +16737,7 @@ check_mark_entry_dirty_errs(void)
if ( pass ) {
- result = H5C_mark_pinned_or_protected_entry_dirty(cache_ptr,
- (void *)entry_ptr);
+ result = H5C_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
if ( result > 0 ) {
@@ -16704,7 +16750,7 @@ check_mark_entry_dirty_errs(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16743,7 +16789,7 @@ check_expunge_entry_errs(void)
{
const char * fcn_name = "check_expunge_entry_errs()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("expunge entry related errors");
@@ -16766,19 +16812,19 @@ check_expunge_entry_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
entry_ptr = &((entries[0])[0]);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
}
if ( pass ) {
- result = H5C_expunge_entry(NULL, -1, -1, cache_ptr,
- &(types[0]), entry_ptr->addr);
+ result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr);
if ( result > 0 ) {
@@ -16788,15 +16834,15 @@ check_expunge_entry_errs(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
}
}
if ( pass ) {
- result = H5C_expunge_entry(NULL, -1, -1, cache_ptr,
- &(types[0]), entry_ptr->addr);
+ result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr);
if ( result > 0 ) {
@@ -16806,15 +16852,15 @@ check_expunge_entry_errs(void)
} else {
- unpin_entry(cache_ptr, 0, 0);
+ unpin_entry(0, 0);
}
}
if ( pass ) {
- result = H5C_expunge_entry(NULL, -1, -1, cache_ptr,
- &(types[0]), entry_ptr->addr);
+ result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr);
if ( result < 0 ) {
@@ -16828,7 +16874,7 @@ check_expunge_entry_errs(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16867,7 +16913,7 @@ check_resize_entry_errs(void)
{
const char * fcn_name = "check_resize_entry_errs()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("resize entry related errors");
@@ -16889,18 +16935,18 @@ check_resize_entry_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
entry_ptr = &((entries[0])[0]);
- protect_entry(cache_ptr, 0, 0);
+ protect_entry(file_ptr, 0, 0);
}
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, (size_t)1);
+ result = H5C_resize_pinned_entry((void *)entry_ptr, (size_t)1);
if ( result > 0 ) {
@@ -16910,14 +16956,14 @@ check_resize_entry_errs(void)
} else {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
}
}
if ( pass ) {
- result = H5C_resize_pinned_entry(cache_ptr, (void *)entry_ptr, (size_t)0);
+ result = H5C_resize_pinned_entry((void *)entry_ptr, (size_t)0);
if ( result > 0 ) {
@@ -16927,14 +16973,14 @@ check_resize_entry_errs(void)
} else {
- unpin_entry(cache_ptr, 0, 0);
+ unpin_entry(0, 0);
}
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -16973,7 +17019,7 @@ check_unprotect_ro_dirty_err(void)
{
const char * fcn_name = "check_unprotect_ro_dirty_err()";
herr_t result;
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
TESTING("unprotect a read only entry dirty error");
@@ -16989,19 +17035,19 @@ check_unprotect_ro_dirty_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__DIRTIED_FLAG, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__DIRTIED_FLAG, (size_t)0);
if ( result >= 0 ) {
@@ -17013,13 +17059,13 @@ check_unprotect_ro_dirty_err(void)
if ( pass ) {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
/* allocate a another cache, protect an entry read only twice, and
@@ -17032,20 +17078,20 @@ check_unprotect_ro_dirty_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry_ro(cache_ptr, 0, 0);
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, (void *)entry_ptr,
- H5C__DIRTIED_FLAG, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, (void *)entry_ptr,
+ H5C__DIRTIED_FLAG, (size_t)0);
if ( result > 0 ) {
@@ -17057,14 +17103,14 @@ check_unprotect_ro_dirty_err(void)
if ( pass ) {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17102,7 +17148,7 @@ static void
check_protect_ro_rw_err(void)
{
const char * fcn_name = "check_protect_ro_rw_err()";
- H5C_t * cache_ptr = NULL;
+ H5F_t * file_ptr = NULL;
test_entry_t * entry_ptr;
void * thing_ptr = NULL;
@@ -17120,18 +17166,18 @@ check_protect_ro_rw_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
- protect_entry_ro(cache_ptr, 0, 0);
+ protect_entry_ro(file_ptr, 0, 0);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- thing_ptr = H5C_protect(NULL, -1, -1, cache_ptr, &(types[0]),
- entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
+ thing_ptr = H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[0]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
if ( thing_ptr != NULL ) {
@@ -17142,12 +17188,12 @@ check_protect_ro_rw_err(void)
if ( pass ) {
- unprotect_entry(cache_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
}
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17187,6 +17233,7 @@ check_check_evictions_enabled_err(void)
const char * fcn_name = "check_evictions_enabled_err()";
herr_t result;
hbool_t evictions_enabled;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
TESTING("get/set evictions enabled errors");
@@ -17210,8 +17257,9 @@ check_check_evictions_enabled_err(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
@@ -17257,7 +17305,7 @@ check_check_evictions_enabled_err(void)
if ( result == SUCCEED ) {
pass = FALSE;
- failure_mssg = "H5C_set_evictions_enabled succeeded() 1.\n";
+ failure_mssg = "H5C_get_evictions_enabled succeeded() 1.\n";
} else if ( cache_ptr->evictions_enabled == TRUE ) {
@@ -17275,7 +17323,7 @@ check_check_evictions_enabled_err(void)
if ( result == SUCCEED ) {
pass = FALSE;
- failure_mssg = "H5C_set_evictions_enabled succeeded() 2.\n";
+ failure_mssg = "H5C_get_evictions_enabled succeeded() 2.\n";
}
(cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
@@ -17284,7 +17332,7 @@ check_check_evictions_enabled_err(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -17346,6 +17394,7 @@ check_auto_cache_resize(void)
herr_t result;
int32_t i;
int32_t checkpoint = 0;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -17408,8 +17457,9 @@ check_auto_cache_resize(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
@@ -17444,10 +17494,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, i);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17474,10 +17524,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17504,10 +17554,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, i);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17534,10 +17584,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17564,10 +17614,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17594,10 +17644,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17625,10 +17675,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17655,10 +17705,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17685,10 +17735,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17716,10 +17766,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17816,10 +17866,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17847,10 +17897,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17878,10 +17928,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17909,10 +17959,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17939,10 +17989,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17969,10 +18019,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -17999,10 +18049,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 900 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18010,10 +18060,10 @@ check_auto_cache_resize(void)
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i + 1000);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i + 1000);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i + 1000,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i + 1000,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18040,10 +18090,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18070,10 +18120,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18170,10 +18220,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18200,10 +18250,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18230,10 +18280,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18260,10 +18310,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18367,10 +18417,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18394,10 +18444,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18421,10 +18471,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18452,10 +18502,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18482,10 +18532,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18511,10 +18561,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18540,10 +18590,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18570,10 +18620,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18601,10 +18651,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18628,10 +18678,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18655,10 +18705,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18685,10 +18735,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18794,10 +18844,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18821,10 +18871,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18848,10 +18898,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18879,10 +18929,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18909,10 +18959,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18938,10 +18988,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18967,10 +19017,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -18996,10 +19046,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19025,10 +19075,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19054,10 +19104,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19083,10 +19133,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19113,10 +19163,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19144,10 +19194,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19171,10 +19221,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19200,10 +19250,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19230,10 +19280,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19338,10 +19388,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19365,10 +19415,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19392,10 +19442,10 @@ check_auto_cache_resize(void)
i = 2000;
while ( ( pass ) && ( i < 3000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19423,10 +19473,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19453,10 +19503,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19482,10 +19532,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19511,10 +19561,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19541,10 +19591,10 @@ check_auto_cache_resize(void)
i = 3000;
while ( ( pass ) && ( i < 4000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19572,10 +19622,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19599,10 +19649,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19626,10 +19676,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19656,10 +19706,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19763,10 +19813,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19790,10 +19840,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19817,10 +19867,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19845,10 +19895,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19873,10 +19923,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19901,10 +19951,10 @@ check_auto_cache_resize(void)
i = 1002;
while ( ( pass ) && ( i < 2002 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -19930,10 +19980,10 @@ check_auto_cache_resize(void)
i = 1003;
while ( ( pass ) && ( i < 2003 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20032,10 +20082,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20059,10 +20109,10 @@ check_auto_cache_resize(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20094,10 +20144,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20125,10 +20175,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20156,10 +20206,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20188,10 +20238,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20218,10 +20268,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, i);
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20249,10 +20299,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20281,10 +20331,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20313,10 +20363,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20345,10 +20395,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20375,10 +20425,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20405,10 +20455,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20435,10 +20485,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20465,10 +20515,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20495,10 +20545,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -20519,7 +20569,7 @@ check_auto_cache_resize(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
/* now test the flash cache size increment code. At least at present,
@@ -20544,8 +20594,9 @@ check_auto_cache_resize(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -20625,10 +20676,10 @@ check_auto_cache_resize(void)
/* Load a huge entry into the cache */
if ( pass ) {
- protect_entry(cache_ptr, HUGE_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, HUGE_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, HUGE_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
@@ -20653,10 +20704,10 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
@@ -20682,9 +20733,9 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 1);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 1,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 1,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -20707,9 +20758,9 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 2);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 2);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 2,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 2,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -20731,13 +20782,12 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 1);
- expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 2);
+ expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 1);
+ expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 2);
if ( pass ) {
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -20767,14 +20817,13 @@ check_auto_cache_resize(void)
/* insert a huge entry into the cache */
if ( pass ) {
- insert_entry(cache_ptr, HUGE_ENTRY_TYPE, 1, TRUE,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, HUGE_ENTRY_TYPE, 1, TRUE, H5C__NO_FLAGS_SET);
/* protect and unprotect a couple times to increment cache_accesses */
- protect_entry(cache_ptr, HUGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, HUGE_ENTRY_TYPE, 1,
+ protect_entry(file_ptr, HUGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 1,
NO_CHANGE, H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, HUGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, HUGE_ENTRY_TYPE, 1,
+ protect_entry(file_ptr, HUGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, HUGE_ENTRY_TYPE, 1,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -20798,8 +20847,7 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 4, TRUE,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 4, TRUE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (80 * 1024) ) ||
@@ -20820,8 +20868,7 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- insert_entry(cache_ptr, MONSTER_ENTRY_TYPE, 5, TRUE,
- H5C__NO_FLAGS_SET);
+ insert_entry(file_ptr, MONSTER_ENTRY_TYPE, 5, TRUE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (144 * 1024) ) ||
@@ -20843,9 +20890,9 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 6);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 6);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 6,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 6,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -20869,33 +20916,32 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 5);
- expunge_entry(cache_ptr, MONSTER_ENTRY_TYPE, 6);
+ expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 5);
+ expunge_entry(file_ptr, MONSTER_ENTRY_TYPE, 6);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 11,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 11,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 12,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 12,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 13);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 13,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 13,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1024);
- flush_cache(cache_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
if ( pass ) {
auto_size_ctl.initial_size = 6 * 1024;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -20921,20 +20967,20 @@ check_auto_cache_resize(void)
/* Now load the variable entries into the cache */
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 13);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 13, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -20956,8 +21002,8 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 3 * 1024);
@@ -20981,8 +21027,8 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 10 * 1024);
@@ -21005,8 +21051,8 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 11,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 11,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 10 * 1024);
@@ -21029,8 +21075,8 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 12,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 12,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 10 * 1024);
@@ -21054,21 +21100,20 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 11,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 11,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 12,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 12,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
if ( pass ) {
auto_size_ctl.initial_size = 6 * 1024;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -21095,10 +21140,10 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (6 * 1024) ) ||
@@ -21116,7 +21161,7 @@ check_auto_cache_resize(void)
if ( pass ) {
- resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (13 * 1024) ) ||
@@ -21134,10 +21179,10 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
@@ -21155,10 +21200,10 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
- resize_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
+ resize_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024, TRUE);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
@@ -21179,16 +21224,16 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
if ( ( pass ) &&
@@ -21211,21 +21256,20 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 10,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 10,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 11,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 11,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry_with_size_change(cache_ptr, VARIABLE_ENTRY_TYPE, 12,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry_with_size_change(file_ptr, VARIABLE_ENTRY_TYPE, 12,
H5C__DIRTIED_FLAG|H5C__SIZE_CHANGED_FLAG, 1 * 1024);
if ( pass ) {
auto_size_ctl.initial_size = 6 * 1024;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -21248,8 +21292,8 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, 2 * 1024);
@@ -21287,8 +21331,8 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, 10 * 1024);
@@ -21308,8 +21352,8 @@ check_auto_cache_resize(void)
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__PIN_ENTRY_FLAG);
resize_pinned_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, 10 * 1024);
@@ -21332,16 +21376,16 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
- protect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- unprotect_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
+ protect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ unprotect_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12, NO_CHANGE,
H5C__UNPIN_ENTRY_FLAG);
if ( ( pass ) &&
@@ -21361,10 +21405,10 @@ check_auto_cache_resize(void)
*/
if ( pass ) {
- expunge_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 10);
- expunge_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 11);
- expunge_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 12);
- expunge_entry(cache_ptr, VARIABLE_ENTRY_TYPE, 13);
+ expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 10);
+ expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 11);
+ expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 12);
+ expunge_entry(file_ptr, VARIABLE_ENTRY_TYPE, 13);
if ( ( pass ) &&
( ( ( cache_ptr->max_cache_size != (22 * 1024) ) ||
@@ -21461,8 +21505,8 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21488,8 +21532,8 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 1);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 1, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21514,11 +21558,11 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, NO_CHANGE,
H5C__NO_FLAGS_SET);
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 3);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 3, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21545,10 +21589,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, TINY_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, TINY_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, TINY_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, TINY_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21571,8 +21615,8 @@ check_auto_cache_resize(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -21599,10 +21643,10 @@ check_auto_cache_resize(void)
i = 0;
while ( ( pass ) && ( i < 500 ) )
{
- protect_entry(cache_ptr, TINY_ENTRY_TYPE, i);
+ protect_entry(file_ptr, TINY_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, TINY_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, TINY_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21623,7 +21667,7 @@ check_auto_cache_resize(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -21669,6 +21713,7 @@ check_auto_cache_resize_disable(void)
herr_t result;
int32_t i;
int32_t checkpoint = 0;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -21731,8 +21776,9 @@ check_auto_cache_resize_disable(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
@@ -21840,10 +21886,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21871,10 +21917,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -21901,10 +21947,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22001,10 +22047,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22032,10 +22078,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22062,10 +22108,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22162,10 +22208,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22193,10 +22239,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22223,10 +22269,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22324,10 +22370,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22353,10 +22399,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22383,10 +22429,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22482,10 +22528,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22512,10 +22558,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22542,10 +22588,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22641,10 +22687,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22671,10 +22717,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22701,10 +22747,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22794,7 +22840,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(cache_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -22807,10 +22853,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22837,10 +22883,10 @@ check_auto_cache_resize_disable(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22869,10 +22915,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22899,10 +22945,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -22931,10 +22977,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23022,7 +23068,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(cache_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -23035,10 +23081,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23065,10 +23111,10 @@ check_auto_cache_resize_disable(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23097,10 +23143,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23127,10 +23173,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23159,10 +23205,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23257,7 +23303,7 @@ check_auto_cache_resize_disable(void)
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
/* flush the cache and destroy all entries so we start from a known point */
- flush_cache(cache_ptr, TRUE, FALSE, FALSE);
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -23270,10 +23316,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23300,10 +23346,10 @@ check_auto_cache_resize_disable(void)
i = 1000;
while ( ( pass ) && ( i < 2000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23334,10 +23380,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23366,10 +23412,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23400,10 +23446,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 999);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 999);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 999,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 999,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23504,10 +23550,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23536,10 +23582,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23633,10 +23679,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23665,10 +23711,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23762,10 +23808,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23794,10 +23840,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23891,10 +23937,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -23923,10 +23969,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24021,10 +24067,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24053,10 +24099,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24151,10 +24197,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24183,10 +24229,10 @@ check_auto_cache_resize_disable(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24306,8 +24352,8 @@ check_auto_cache_resize_disable(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, LARGE_ENTRY_TYPE, 0,
+ protect_entry(file_ptr, LARGE_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -24346,8 +24392,8 @@ check_auto_cache_resize_disable(void)
rpt_fcn_called = FALSE;
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0,
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
if ( ( pass ) &&
@@ -24377,7 +24423,7 @@ check_auto_cache_resize_disable(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -24420,6 +24466,7 @@ check_auto_cache_resize_epoch_markers(void)
int32_t i;
int32_t j;
int32_t checkpoint = 0;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t auto_size_ctl =
{
@@ -24477,8 +24524,9 @@ check_auto_cache_resize_epoch_markers(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
@@ -24592,10 +24640,10 @@ check_auto_cache_resize_epoch_markers(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i);
+ protect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, MEDIUM_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, MEDIUM_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24625,10 +24673,10 @@ check_auto_cache_resize_epoch_markers(void)
i = (j - 2) * 1000;
while ( ( pass ) && ( i < (j - 1) * 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24657,10 +24705,10 @@ check_auto_cache_resize_epoch_markers(void)
i = 9000;
while ( ( pass ) && ( i < 10000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24771,10 +24819,10 @@ check_auto_cache_resize_epoch_markers(void)
i = 9000;
while ( ( pass ) && ( i < 10000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -24963,10 +25011,10 @@ check_auto_cache_resize_epoch_markers(void)
i = (j - 1) * 1000;
while ( ( pass ) && ( i < j * 1000 ) )
{
- protect_entry(cache_ptr, SMALL_ENTRY_TYPE, i);
+ protect_entry(file_ptr, SMALL_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, SMALL_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, SMALL_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -25085,7 +25133,7 @@ check_auto_cache_resize_epoch_markers(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -25160,6 +25208,7 @@ check_auto_cache_resize_input_errs(void)
{
const char * fcn_name = "check_auto_cache_resize_input_errs()";
herr_t result;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
H5C_auto_size_ctl_t ref_auto_size_ctl =
{
@@ -25224,14 +25273,14 @@ check_auto_cache_resize_input_errs(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &ref_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &ref_auto_size_ctl);
if ( result != SUCCEED ) {
@@ -25312,8 +25361,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(NULL,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(NULL, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25388,8 +25436,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25465,8 +25512,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25539,8 +25585,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25615,8 +25660,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25688,8 +25732,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25765,8 +25808,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25838,8 +25880,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25911,8 +25952,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -25987,8 +26027,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26060,8 +26099,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26137,8 +26175,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26211,8 +26248,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26287,8 +26323,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26360,8 +26395,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26433,8 +26467,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26510,8 +26543,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26587,8 +26619,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26663,8 +26694,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26737,8 +26767,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26813,8 +26842,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26887,8 +26915,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -26963,8 +26990,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27037,8 +27063,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27113,8 +27138,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27186,8 +27210,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27262,8 +27285,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27335,8 +27357,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27410,8 +27431,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = -0.0000001; /* INVALID */
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27483,8 +27503,7 @@ check_auto_cache_resize_input_errs(void)
invalid_auto_size_ctl.apply_empty_reserve = TRUE;
invalid_auto_size_ctl.empty_reserve = 0.05;
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &invalid_auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &invalid_auto_size_ctl);
if ( result != FAIL ) {
@@ -27530,7 +27549,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- result = H5C_get_cache_auto_resize_config((H5C_t *)&test_auto_size_ctl,
+ result = H5C_get_cache_auto_resize_config((const H5C_t *)&test_auto_size_ctl,
&test_auto_size_ctl);
if ( result != FAIL ) {
@@ -27555,7 +27574,7 @@ check_auto_cache_resize_input_errs(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
@@ -27598,6 +27617,7 @@ check_auto_cache_resize_aux_fcns(void)
const char * fcn_name = "check_auto_cache_resize_aux_fcns()";
herr_t result;
int32_t i;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
double hit_rate;
size_t max_size;
@@ -27665,14 +27685,14 @@ check_auto_cache_resize_aux_fcns(void)
reset_entries();
- cache_ptr = setup_cache((size_t)(2 * 1024),
+ file_ptr = setup_cache((size_t)(2 * 1024),
(size_t)(1 * 1024));
+ cache_ptr = file_ptr->shared->cache;
}
if ( pass ) {
- result = H5C_set_cache_auto_resize_config(cache_ptr,
- &auto_size_ctl);
+ result = H5C_set_cache_auto_resize_config(cache_ptr, &auto_size_ctl);
if ( result != SUCCEED ) {
@@ -27728,11 +27748,11 @@ check_auto_cache_resize_aux_fcns(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, i);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, i);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -27774,11 +27794,11 @@ check_auto_cache_resize_aux_fcns(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, 0);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, 0,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, 0,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -27857,11 +27877,11 @@ check_auto_cache_resize_aux_fcns(void)
i = 0;
while ( ( pass ) && ( i < 1000 ) )
{
- protect_entry(cache_ptr, PICO_ENTRY_TYPE, i + 500);
+ protect_entry(file_ptr, PICO_ENTRY_TYPE, i + 500);
if ( pass ) {
- unprotect_entry(cache_ptr, PICO_ENTRY_TYPE, i + 500,
+ unprotect_entry(file_ptr, PICO_ENTRY_TYPE, i + 500,
NO_CHANGE, H5C__NO_FLAGS_SET);
}
i++;
@@ -27962,11 +27982,11 @@ check_auto_cache_resize_aux_fcns(void)
*/
if ( pass ) {
- protect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0);
+ protect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0);
}
if ( pass ) {
- unprotect_entry(cache_ptr, MONSTER_ENTRY_TYPE, 0, NO_CHANGE,
+ unprotect_entry(file_ptr, MONSTER_ENTRY_TYPE, 0, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -28137,7 +28157,7 @@ check_auto_cache_resize_aux_fcns(void)
if ( pass ) {
- takedown_cache(cache_ptr, FALSE, FALSE);
+ takedown_cache(file_ptr, FALSE, FALSE);
}
if ( pass ) { PASSED(); } else { H5_FAILED(); }
diff --git a/test/cache_api.c b/test/cache_api.c
index fcc4664..fc6f890 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -27,10 +27,7 @@
/* global variable declarations: */
-const char *FILENAME[] = {
- "cache_api",
- NULL
-};
+extern const char *FILENAME[];
/* macro definitions */
@@ -331,7 +328,7 @@ check_fapl_mdc_api_calls(void)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -480,7 +477,7 @@ check_fapl_mdc_api_calls(void)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -919,7 +916,7 @@ check_file_mdc_api_calls(void)
/* setup the file name */
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -1533,7 +1530,7 @@ mdc_api_call_smoke_check(int express_test)
if ( pass ) {
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
@@ -3724,7 +3721,7 @@ check_file_mdc_api_errs(void)
HDfprintf(stdout, "%s: calling h5_fixname().\n", fcn_name);
}
- if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ if ( h5_fixname(FILENAME[1], H5P_DEFAULT, filename, sizeof(filename))
== NULL ) {
pass = FALSE;
diff --git a/test/cache_common.c b/test/cache_common.c
index 25eb988..f0f9e74 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -20,17 +20,47 @@
* implemented in H5C.c
*/
#include "h5test.h"
-#include "H5Iprivate.h"
#include "H5ACprivate.h"
+#include "H5Iprivate.h"
+#include "H5MFprivate.h"
#include "cache_common.h"
/* global variable declarations: */
+const char *FILENAME[] = {
+ "cache_test",
+ "cache_api_test",
+ NULL
+};
+
+hid_t saved_fapl_id = H5P_DEFAULT; /* store the fapl id here between
+ * cache setup and takedown. Note
+ * that if saved_fapl_id == H5P_DEFAULT,
+ * we assume that there is no fapl to
+ * close.
+ */
+
+hid_t saved_fid = -1; /* store the file id here between cache setup
+ * and takedown.
+ */
+
+H5C_t * saved_cache = NULL; /* store the pointer to the instance of
+ * of H5C_t created by H5Fcreate()
+ * here between test cache setup and
+ * shutdown.
+ */
+
+haddr_t saved_actual_base_addr = HADDR_UNDEF; /* Store the address of the
+ space allocated for cache items in the file between
+ cache setup & takedown */
+
hbool_t write_permitted = TRUE;
hbool_t pass = TRUE; /* set to false on error */
hbool_t skip_long_tests = TRUE;
hbool_t run_full_test = TRUE;
+hbool_t try_core_file_driver = FALSE;
+hbool_t core_file_driver_failed = FALSE;
const char *failure_mssg = NULL;
test_entry_t pico_entries[NUM_PICO_ENTRIES];
@@ -222,6 +252,9 @@ static herr_t flush(H5F_t *f, hid_t dxpl_id, hbool_t dest,
static void * load(H5F_t *f, hid_t dxpl_id, haddr_t addr,
const void *udata1, void *udata2);
static herr_t size(H5F_t * f, void * thing, size_t * size_ptr);
+static void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr,
+ struct flush_op *op_ptr, unsigned *flags_ptr);
+
@@ -596,8 +629,7 @@ destroy(H5F_t UNUSED * f,
if ( pinned_entry_ptr->pinning_ref_count <= 0 ) {
- unpin_entry(pinned_entry_ptr->cache_ptr,
- pinned_entry_ptr->type,
+ unpin_entry(pinned_entry_ptr->type,
pinned_entry_ptr->index);
}
@@ -748,7 +780,7 @@ flush(H5F_t *f,
for ( i = 0; i < entry_ptr->num_flush_ops; i++ )
{
- execute_flush_op(entry_ptr->cache_ptr,
+ execute_flush_op(f,
entry_ptr,
&((entry_ptr->flush_ops)[i]),
flags_ptr);
@@ -1221,7 +1253,7 @@ add_flush_op(int target_type,
*/
void
-create_pinned_entry_dependency(H5C_t * cache_ptr,
+create_pinned_entry_dependency(H5F_t * file_ptr,
int pinning_type,
int pinning_idx,
int pinned_type,
@@ -1265,8 +1297,8 @@ create_pinned_entry_dependency(H5C_t * cache_ptr,
if ( pinned_entry_ptr->pinning_ref_count == 0 ) {
- protect_entry(cache_ptr, pinned_type, pinned_idx);
- unprotect_entry(cache_ptr, pinned_type, pinned_idx, FALSE,
+ protect_entry(file_ptr, pinned_type, pinned_idx);
+ unprotect_entry(file_ptr, pinned_type, pinned_idx, FALSE,
H5C__PIN_ENTRY_FLAG);
}
@@ -1304,7 +1336,7 @@ create_pinned_entry_dependency(H5C_t * cache_ptr,
*/
void
-dirty_entry(H5C_t * cache_ptr,
+dirty_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t dirty_pin)
@@ -1312,13 +1344,16 @@ dirty_entry(H5C_t * cache_ptr,
test_entry_t * base_addr;
test_entry_t * entry_ptr;
- HDassert( cache_ptr );
+ HDassert( file_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
if ( pass ) {
if ( dirty_pin ) {
+ H5C_t *cache_ptr = file_ptr->shared->cache;
+
+ HDassert(cache_ptr);
if ( ! entry_in_cache(cache_ptr, type, idx) ) {
@@ -1341,14 +1376,14 @@ dirty_entry(H5C_t * cache_ptr,
} else {
- mark_pinned_entry_dirty(cache_ptr, type, idx, FALSE, (size_t)0);
+ mark_pinned_entry_dirty(type, idx, FALSE, (size_t)0);
}
}
} else {
- protect_entry(cache_ptr, type, idx);
- unprotect_entry(cache_ptr, type, idx, TRUE, H5C__NO_FLAGS_SET);
+ protect_entry(file_ptr, type, idx);
+ unprotect_entry(file_ptr, type, idx, TRUE, H5C__NO_FLAGS_SET);
}
}
@@ -1378,11 +1413,15 @@ dirty_entry(H5C_t * cache_ptr,
*/
void
-execute_flush_op(H5C_t * cache_ptr,
+execute_flush_op(H5F_t * file_ptr,
struct test_entry_t * entry_ptr,
struct flush_op * op_ptr,
unsigned * flags_ptr)
{
+ H5C_t * cache_ptr;
+
+ HDassert( file_ptr ) ;
+ cache_ptr = file_ptr->shared->cache;
HDassert( cache_ptr != NULL );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( entry_ptr != NULL );
@@ -1413,7 +1452,7 @@ execute_flush_op(H5C_t * cache_ptr,
HDassert( ( entry_ptr->type != op_ptr->type ) ||
( entry_ptr->index != op_ptr->idx ) );
- dirty_entry(cache_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag);
+ dirty_entry(file_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag);
break;
case FLUSH_OP__RESIZE:
@@ -1444,7 +1483,7 @@ execute_flush_op(H5C_t * cache_ptr,
/* change the size of some other entry */
- resize_entry(cache_ptr, op_ptr->type, op_ptr->idx,
+ resize_entry(file_ptr, op_ptr->type, op_ptr->idx,
op_ptr->size, op_ptr->flag);
}
break;
@@ -1552,7 +1591,7 @@ reset_entries(void)
int j;
int k;
int32_t max_index;
- haddr_t addr = 0;
+ haddr_t addr = PICO_BASE_ADDR;
haddr_t alt_addr = PICO_ALT_BASE_ADDR;
size_t entry_size;
test_entry_t * base_addr;
@@ -1664,7 +1703,7 @@ reset_entries(void)
*/
void
-resize_entry(H5C_t * cache_ptr,
+resize_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
size_t new_size,
@@ -1673,7 +1712,6 @@ resize_entry(H5C_t * cache_ptr,
test_entry_t * base_addr;
test_entry_t * entry_ptr;
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( type == VARIABLE_ENTRY_TYPE );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -1689,6 +1727,9 @@ resize_entry(H5C_t * cache_ptr,
HDassert( entry_ptr == entry_ptr->self );
if ( resize_pin ) {
+ H5C_t *cache_ptr = file_ptr->shared->cache;
+
+ HDassert( cache_ptr );
if ( ! entry_in_cache(cache_ptr, type, idx) ) {
@@ -1704,14 +1745,13 @@ resize_entry(H5C_t * cache_ptr,
} else {
- mark_pinned_entry_dirty(cache_ptr, type, idx,
- TRUE, new_size);
+ mark_pinned_entry_dirty(type, idx, TRUE, new_size);
}
}
} else {
- protect_entry(cache_ptr, type, idx);
- unprotect_entry_with_size_change(cache_ptr, type, idx,
+ protect_entry(file_ptr, type, idx);
+ unprotect_entry_with_size_change(file_ptr, type, idx,
H5C__SIZE_CHANGED_FLAG, new_size);
}
}
@@ -1755,7 +1795,7 @@ resize_pinned_entry(H5C_t * cache_ptr,
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
- HDassert( type = VARIABLE_ENTRY_TYPE ) ;
+ HDassert( type == VARIABLE_ENTRY_TYPE ) ;
HDassert( ( 0 < new_size ) && ( new_size <= entry_sizes[type] ) );
if ( pass ) {
@@ -1783,8 +1823,7 @@ resize_pinned_entry(H5C_t * cache_ptr,
entry_ptr->size = new_size;
- result = H5C_resize_pinned_entry(cache_ptr,
- (void *)entry_ptr,
+ result = H5C_resize_pinned_entry((void *)entry_ptr,
new_size);
if ( result != SUCCEED ) {
@@ -2181,38 +2220,267 @@ verify_unprotected(void)
* Programmer: John Mainzer
* 6/11/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-H5C_t *
+H5F_t *
setup_cache(size_t max_cache_size,
size_t min_clean_size)
{
+ const char * fcn_name = "setup_cache()";
+ char filename[512];
+ hbool_t show_progress = FALSE;
+ hbool_t verbose = TRUE;
+ int mile_stone = 1;
+ hid_t fid = -1;
+ haddr_t actual_base_addr;
+ H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
+ H5F_t * ret_val = NULL;
+ hid_t fapl_id = H5P_DEFAULT;
- cache_ptr = H5C_create(max_cache_size,
- min_clean_size,
- (NUMBER_OF_ENTRY_TYPES - 1),
- (const char **)entry_type_names,
- check_write_permitted,
- TRUE,
- NULL,
- NULL);
+ if ( show_progress ) /* 1 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
- if ( cache_ptr == NULL ) {
+ saved_fid = -1;
- pass = FALSE;
- failure_mssg = "H5C_create() returned NULL.";
+ /* setup the file name */
+ if ( pass ) {
- } else {
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "h5_fixname() failed.\n";
+ }
+ }
+
+ if ( show_progress ) /* 2 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( ( pass ) && ( try_core_file_driver ) ) {
+
+ if ( (fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == FAIL ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Pcreate(H5P_FILE_ACCESS) failed.\n";
+ }
+ else if ( H5Pset_fapl_core(fapl_id, MAX_ADDR, FALSE) < 0 ) {
+
+ H5Pclose(fapl_id);
+ fapl_id = H5P_DEFAULT;
+ pass = FALSE;
+ failure_mssg = "H5P_set_fapl_core() failed.\n";
+ }
+ else if ( (fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id))
+ < 0 ) {
+
+ core_file_driver_failed = TRUE;
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", fcn_name);
+ }
+
+ } else {
+
+ saved_fapl_id = fapl_id;
+ }
+ }
+
+ if ( show_progress ) /* 3 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ /* if we either aren't using the core file driver, or a create
+ * with the core file driver failed, try again with a regular file.
+ * If this fails, we are cooked.
+ */
+ if ( ( pass ) && ( fid < 0 ) ) {
+
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+
+ saved_fid = fid;
+
+ if ( fid < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fcreate() failed.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5Fcreate() failed.\n", fcn_name);
+ }
+ }
+ }
+
+ if ( show_progress ) /* 4 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) {
+
+ HDassert( fid >= 0 );
+
+ saved_fid = fid;
+
+ if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5Fflush() failed.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5Fflush() failed.\n", fcn_name);
+ }
+
+ } else {
+
+ file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE);
+
+ if ( file_ptr == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "Can't get file_ptr.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5Fflush() failed.\n", fcn_name);
+ }
+ }
+ }
+ }
+
+ if ( show_progress ) /* 5 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) {
+
+ /* A bit of fancy footwork here:
+ *
+ * The call to H5Fcreate() allocates an instance of H5C_t,
+ * initializes it, and stores its address in f->shared->cache.
+ *
+ * We don't want to use this cache, as it has a bunch of extra
+ * initialization that may change over time, and in any case
+ * it will not in general be configured the way we want it.
+ *
+ * We used to deal with this problem by storing the file pointer
+ * in another instance of H5C_t, and then ignoring the original
+ * version. However, this strategy doesn't work any more, as
+ * we can't store the file pointer in the instance of H5C_t,
+ * and we have modified many cache routines to use a file
+ * pointer to look up the target cache.
+ *
+ * Thus we now make note of the address of the instance of
+ * H5C_t created by the call to H5Fcreate(), set
+ * file_ptr->shared->cache to NULL, call H5C_create()
+ * to allocate a new instance of H5C_t for test purposes,
+ * and store than new instance's address in
+ * file_ptr->shared->cache.
+ *
+ * On shut down, we call H5C_dest on our instance of H5C_t,
+ * set file_ptr->shared->cache to point to the original
+ * instance, and then close the file normally.
+ */
+
+ HDassert( saved_cache == NULL );
+
+ saved_cache = file_ptr->shared->cache;
+
+ file_ptr->shared->cache = NULL;
+
+ cache_ptr = H5C_create(max_cache_size,
+ min_clean_size,
+ (NUMBER_OF_ENTRY_TYPES - 1),
+ (const char **)entry_type_names,
+ check_write_permitted,
+ TRUE,
+ NULL,
+ NULL);
+
+ file_ptr->shared->cache = cache_ptr;
+ }
+
+ if ( show_progress ) /* 6 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) {
+
+ if ( cache_ptr == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "H5C_create() failed.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5C_create() failed.\n", fcn_name);
+ }
+
+ } else if ( cache_ptr->magic != H5C__H5C_T_MAGIC ) {
+
+ pass = FALSE;
+ failure_mssg = "Bad cache_ptr magic.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: Bad cache_ptr magic.\n", fcn_name);
+ }
+ }
+ }
+
+ if ( show_progress ) /* 7 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) { /* allocate space for test entries */
+
+ actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT,
+ (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
+
+ if ( actual_base_addr == HADDR_UNDEF ) {
+
+ pass = FALSE;
+ failure_mssg = "H5MF_alloc() failed.";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: H5MF_alloc() failed.\n", fcn_name);
+ }
+
+ } else if ( actual_base_addr > BASE_ADDR ) {
+
+ /* If this happens, must increase BASE_ADDR so that the
+ * actual_base_addr is <= BASE_ADDR. This should only happen
+ * if the size of the superblock is increase.
+ */
+ pass = FALSE;
+ failure_mssg = "actual_base_addr > BASE_ADDR";
+
+ if ( verbose ) {
+ HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n",
+ fcn_name);
+ }
+ }
+
+ saved_actual_base_addr = actual_base_addr;
+ }
+
+ if ( show_progress ) /* 8 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+
+ if ( pass ) {
+
+ H5C_stats__reset(cache_ptr);
H5C_set_skip_flags(cache_ptr, TRUE, TRUE);
+
+ ret_val = file_ptr;
}
- return(cache_ptr);
+ if ( show_progress ) /* 9 */
+ HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
+ fcn_name, mile_stone++, (int)pass);
+ return(ret_val);
} /* setup_cache() */
@@ -2227,26 +2495,77 @@ setup_cache(size_t max_cache_size,
* Programmer: John Mainzer
* 6/11/04
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
-takedown_cache(H5C_t * cache_ptr,
+takedown_cache(H5F_t * file_ptr,
hbool_t dump_stats,
hbool_t dump_detailed_stats)
{
- HDassert(cache_ptr);
+ char filename[512];
- if ( pass ) {
+ if ( file_ptr != NULL ) {
+ H5C_t * cache_ptr = file_ptr->shared->cache;
if ( dump_stats ) {
H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
}
+
+ flush_cache(file_ptr, TRUE, FALSE, FALSE);
+
+ H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT);
+
+ if ( saved_cache != NULL ) {
+
+ file_ptr->shared->cache = saved_cache;
+ saved_cache = NULL;
+ }
+
+ if ( H5F_addr_defined(saved_actual_base_addr) ) {
+
+ H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, H5P_DEFAULT, saved_actual_base_addr,
+ (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
+ saved_actual_base_addr = HADDR_UNDEF;
+ }
+ }
+
+ if ( saved_fapl_id != H5P_DEFAULT ) {
+
+ H5Pclose(saved_fapl_id);
+ saved_fapl_id = H5P_DEFAULT;
+ }
+
+ if ( saved_fid != -1 ) {
+
+ if ( H5Fclose(saved_fid) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't close test file.";
+
+ } else {
+
+ saved_fid = -1;
+
+ }
+
+ if ( ( ! try_core_file_driver ) || ( core_file_driver_failed ) ) {
+
+ if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
+ == NULL ) {
+
+ pass = FALSE;
+ failure_mssg = "h5_fixname() failed.\n";
+ }
- H5C_dest(NULL, -1, -1, cache_ptr);
+ if ( HDremove(filename) < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "couldn't delete test file.";
+
+ }
+ }
}
return;
@@ -2274,7 +2593,7 @@ takedown_cache(H5C_t * cache_ptr,
*/
void
-expunge_entry(H5C_t * cache_ptr,
+expunge_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx)
{
@@ -2284,8 +2603,12 @@ expunge_entry(H5C_t * cache_ptr,
test_entry_t * entry_ptr;
if ( pass ) {
+#ifndef NDEBUG
+ H5C_t * cache_ptr = file_ptr->shared->cache;
HDassert( cache_ptr );
+#endif /* NDEBUG */
+
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2301,8 +2624,8 @@ expunge_entry(H5C_t * cache_ptr,
HDassert( ! ( entry_ptr->header.is_pinned ) );
HDassert( ! ( entry_ptr->is_pinned ) );
- result = H5C_expunge_entry(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr);
+ result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr);
if ( result < 0 ) {
@@ -2334,27 +2657,30 @@ expunge_entry(H5C_t * cache_ptr,
*/
void
-flush_cache(H5C_t * cache_ptr,
+flush_cache(H5F_t * file_ptr,
hbool_t destroy_entries,
hbool_t dump_stats,
hbool_t dump_detailed_stats)
{
+ H5C_t * cache_ptr;
herr_t result = 0;
- HDassert(cache_ptr);
-
verify_unprotected();
if ( pass ) {
+ HDassert(file_ptr);
+
+ cache_ptr = file_ptr->shared->cache;
+
if ( destroy_entries ) {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__FLUSH_INVALIDATE_FLAG);
} else {
- result = H5C_flush_cache(NULL, -1, -1, cache_ptr,
+ result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
H5C__NO_FLAGS_SET);
}
}
@@ -2414,12 +2740,13 @@ flush_cache(H5C_t * cache_ptr,
*/
void
-insert_entry(H5C_t * cache_ptr,
+insert_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t UNUSED dirty,
unsigned int flags)
{
+ H5C_t * cache_ptr;
herr_t result;
hbool_t insert_pinned;
test_entry_t * base_addr;
@@ -2427,6 +2754,8 @@ insert_entry(H5C_t * cache_ptr,
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2443,8 +2772,8 @@ insert_entry(H5C_t * cache_ptr,
entry_ptr->is_dirty = TRUE;
- result = H5C_insert_entry(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, (void *)entry_ptr, flags);
+ result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags);
if ( ( result < 0 ) ||
( entry_ptr->header.is_protected ) ||
@@ -2515,8 +2844,7 @@ insert_entry(H5C_t * cache_ptr,
*/
void
-mark_pinned_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+mark_pinned_entry_dirty(int32_t type,
int32_t idx,
hbool_t size_changed,
size_t new_size)
@@ -2528,7 +2856,6 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
if ( pass ) {
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2538,7 +2865,6 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
HDassert( entry_ptr->index == idx );
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
- HDassert( entry_ptr->cache_ptr == cache_ptr );
HDassert( ! (entry_ptr->header.is_protected) );
HDassert( entry_ptr->header.is_pinned );
HDassert( entry_ptr->is_pinned );
@@ -2551,8 +2877,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
entry_ptr->size = new_size;
}
- result = H5C_mark_pinned_entry_dirty(cache_ptr,
- (void *)entry_ptr,
+ result = H5C_mark_pinned_entry_dirty((void *)entry_ptr,
size_changed,
new_size);
@@ -2613,8 +2938,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
*/
void
-mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+mark_pinned_or_protected_entry_dirty(int32_t type,
int32_t idx)
{
/* const char * fcn_name = "mark_pinned_or_protected_entry_dirty()"; */
@@ -2624,7 +2948,6 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
if ( pass ) {
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2634,14 +2957,12 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
HDassert( entry_ptr->index == idx );
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
- HDassert( entry_ptr->cache_ptr == cache_ptr );
HDassert( entry_ptr->header.is_protected ||
entry_ptr->header.is_pinned );
entry_ptr->is_dirty = TRUE;
- result = H5C_mark_pinned_or_protected_entry_dirty(cache_ptr,
- (void *)entry_ptr);
+ result = H5C_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
if ( ( result < 0 )
||
@@ -2807,17 +3128,20 @@ rename_entry(H5C_t * cache_ptr,
*/
void
-protect_entry(H5C_t * cache_ptr,
+protect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx)
{
/* const char * fcn_name = "protect_entry()"; */
+ H5C_t * cache_ptr;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
H5C_cache_entry_t * cache_entry_ptr;
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2830,9 +3154,8 @@ protect_entry(H5C_t * cache_ptr,
HDassert( entry_ptr == entry_ptr->self );
HDassert( !(entry_ptr->is_protected) );
- cache_entry_ptr = H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, NULL, NULL,
- H5C__NO_FLAGS_SET);
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, NULL, NULL, H5C__NO_FLAGS_SET);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
( !(entry_ptr->header.is_protected) ) ||
@@ -2904,17 +3227,20 @@ protect_entry(H5C_t * cache_ptr,
*/
void
-protect_entry_ro(H5C_t * cache_ptr,
+protect_entry_ro(H5F_t * file_ptr,
int32_t type,
int32_t idx)
{
/* const char * fcn_name = "protect_entry_ro()"; */
+ H5C_t *cache_ptr;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
H5C_cache_entry_t * cache_entry_ptr;
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -2929,9 +3255,8 @@ protect_entry_ro(H5C_t * cache_ptr,
( ( entry_ptr->is_read_only ) &&
( entry_ptr->ro_ref_count > 0 ) ) );
- cache_entry_ptr = H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, NULL, NULL,
- H5C__READ_ONLY_FLAG);
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, NULL, NULL, H5C__READ_ONLY_FLAG);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
( !(entry_ptr->header.is_protected) ) ||
@@ -2983,8 +3308,7 @@ protect_entry_ro(H5C_t * cache_ptr,
*/
void
-unpin_entry(H5C_t * cache_ptr,
- int32_t type,
+unpin_entry(int32_t type,
int32_t idx)
{
/* const char * fcn_name = "unpin_entry()"; */
@@ -2994,7 +3318,6 @@ unpin_entry(H5C_t * cache_ptr,
if ( pass ) {
- HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3004,12 +3327,11 @@ unpin_entry(H5C_t * cache_ptr,
HDassert( entry_ptr->index == idx );
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
- HDassert( entry_ptr->cache_ptr == cache_ptr );
HDassert( ! (entry_ptr->header.is_protected) );
HDassert( entry_ptr->header.is_pinned );
HDassert( entry_ptr->is_pinned );
- result = H5C_unpin_entry(cache_ptr, (void *)entry_ptr);
+ result = H5C_unpin_entry((void *)entry_ptr);
if ( ( result < 0 ) ||
( entry_ptr->header.is_pinned ) ||
@@ -3069,13 +3391,14 @@ unpin_entry(H5C_t * cache_ptr,
*/
void
-unprotect_entry(H5C_t * cache_ptr,
+unprotect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
int dirty,
unsigned int flags)
{
/* const char * fcn_name = "unprotect_entry()"; */
+ H5C_t *cache_ptr;
herr_t result;
hbool_t pin_flag_set;
hbool_t unpin_flag_set;
@@ -3084,6 +3407,8 @@ unprotect_entry(H5C_t * cache_ptr,
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3111,9 +3436,9 @@ unprotect_entry(H5C_t * cache_ptr,
entry_ptr->is_dirty = (entry_ptr->is_dirty || dirty);
}
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, (void *)entry_ptr,
- flags, (size_t)0);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags,
+ (size_t)0);
if ( ( result < 0 ) ||
( ( entry_ptr->header.is_protected ) &&
@@ -3223,13 +3548,14 @@ unprotect_entry(H5C_t * cache_ptr,
*/
void
-unprotect_entry_with_size_change(H5C_t * cache_ptr,
+unprotect_entry_with_size_change(H5F_t * file_ptr,
int32_t type,
int32_t idx,
unsigned int flags,
size_t new_size)
{
/* const char * fcn_name = "unprotect_entry_with_size_change()"; */
+ H5C_t *cache_ptr;
herr_t result;
hbool_t dirty_flag_set;
hbool_t pin_flag_set;
@@ -3240,6 +3566,8 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
if ( pass ) {
+ cache_ptr = file_ptr->shared->cache;
+
HDassert( cache_ptr );
HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
@@ -3275,9 +3603,9 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
entry_ptr->size = new_size;
}
- result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[type]),
- entry_ptr->addr, (void *)entry_ptr,
- flags, new_size);
+ result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ &(types[type]), entry_ptr->addr, (void *)entry_ptr, flags,
+ new_size);
if ( ( result < 0 ) ||
( entry_ptr->header.is_protected ) ||
@@ -3343,7 +3671,7 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
*/
void
-row_major_scan_forward(H5C_t * cache_ptr,
+row_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -3359,19 +3687,25 @@ row_major_scan_forward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "row_major_scan_forward";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
if ( verbose )
HDfprintf(stdout, "%s(): entering.\n", fcn_name);
- HDassert( lag >= 10 );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
- H5C_stats__reset(cache_ptr);
+ HDassert( lag >= 10 );
+
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
while ( ( pass ) && ( type < NUMBER_OF_ENTRY_TYPES ) )
@@ -3393,7 +3727,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(cache_ptr, type, (idx + lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -3405,7 +3739,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 1));
- protect_entry(cache_ptr, type, (idx + lag - 1));
+ protect_entry(file_ptr, type, (idx + lag - 1));
}
if ( ( pass ) && ( (idx + lag - 2) >= 0 ) &&
@@ -3415,7 +3749,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
- unprotect_entry(cache_ptr, type, idx+lag-2, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx+lag-2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3436,7 +3770,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 3));
- protect_entry(cache_ptr, type, (idx + lag - 3));
+ protect_entry(file_ptr, type, (idx + lag - 3));
}
if ( ( pass ) && ( (idx + lag - 5) >= 0 ) &&
@@ -3446,7 +3780,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 5));
- unprotect_entry(cache_ptr, type, idx+lag-5, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx+lag-5, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3460,7 +3794,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx + lag - 5));
- protect_entry_ro(cache_ptr, type, (idx + lag - 5));
+ protect_entry_ro(file_ptr, type, (idx + lag - 5));
}
if ( ( pass ) && ( (idx + lag - 6) >= 0 ) &&
@@ -3471,7 +3805,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx + lag - 6));
- protect_entry_ro(cache_ptr, type, (idx + lag - 6));
+ protect_entry_ro(file_ptr, type, (idx + lag - 6));
}
if ( ( pass ) && ( (idx + lag - 7) >= 0 ) &&
@@ -3482,7 +3816,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx + lag - 7));
- protect_entry_ro(cache_ptr, type, (idx + lag - 7));
+ protect_entry_ro(file_ptr, type, (idx + lag - 7));
}
if ( ( pass ) && ( (idx + lag - 7) >= 0 ) &&
@@ -3493,7 +3827,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 7));
- unprotect_entry(cache_ptr, type, (idx + lag - 7),
+ unprotect_entry(file_ptr, type, (idx + lag - 7),
FALSE, H5C__NO_FLAGS_SET);
}
@@ -3505,7 +3839,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 8));
- unprotect_entry(cache_ptr, type, (idx + lag - 8),
+ unprotect_entry(file_ptr, type, (idx + lag - 8),
FALSE, H5C__NO_FLAGS_SET);
}
@@ -3517,7 +3851,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx + lag - 9));
- unprotect_entry(cache_ptr, type, (idx + lag - 9),
+ unprotect_entry(file_ptr, type, (idx + lag - 9),
FALSE, H5C__NO_FLAGS_SET);
}
} /* if ( do_mult_ro_protects ) */
@@ -3527,7 +3861,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, idx);
- protect_entry(cache_ptr, type, idx);
+ protect_entry(file_ptr, type, idx);
}
if ( ( pass ) && ( (idx - lag + 2) >= 0 ) &&
@@ -3537,7 +3871,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
- unprotect_entry(cache_ptr, type, idx-lag+2, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx-lag+2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3548,7 +3882,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 1));
- protect_entry(cache_ptr, type, (idx - lag + 1));
+ protect_entry(file_ptr, type, (idx - lag + 1));
}
@@ -3560,36 +3894,36 @@ row_major_scan_forward(H5C_t * cache_ptr,
switch ( (idx - lag) %4 ) {
case 0: /* we just did an insert */
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
NO_CHANGE, H5C__NO_FLAGS_SET);
break;
case 1:
if ( (entries[type])[idx-lag].is_dirty ) {
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
NO_CHANGE, H5C__NO_FLAGS_SET);
} else {
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
dirty_unprotects,
H5C__NO_FLAGS_SET);
}
break;
case 2: /* we just did an insrt */
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
NO_CHANGE, H5C__DELETED_FLAG);
break;
case 3:
if ( (entries[type])[idx-lag].is_dirty ) {
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
NO_CHANGE, H5C__DELETED_FLAG);
} else {
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
dirty_destroys,
H5C__DELETED_FLAG);
}
@@ -3609,7 +3943,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
}
@@ -3655,7 +3989,7 @@ row_major_scan_forward(H5C_t * cache_ptr,
*/
void
-hl_row_major_scan_forward(H5C_t * cache_ptr,
+hl_row_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -3665,7 +3999,8 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
hbool_t dirty_inserts)
{
const char * fcn_name = "hl_row_major_scan_forward";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
int32_t i;
int32_t lag = 100;
@@ -3674,15 +4009,19 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s(): entering.\n", fcn_name);
- HDassert( lag > 5 );
- HDassert( max_index >= 200 );
- HDassert( max_index <= MAX_ENTRIES );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 200 );
+ HDassert( max_index <= MAX_ENTRIES );
- H5C_stats__reset(cache_ptr);
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
while ( ( pass ) && ( type < NUMBER_OF_ENTRY_TYPES ) )
@@ -3701,7 +4040,7 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(cache_ptr, type, (idx + lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -3714,12 +4053,12 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, i);
- protect_entry(cache_ptr, type, i);
+ protect_entry(file_ptr, type, i);
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i, NO_CHANGE,
+ unprotect_entry(file_ptr, type, i, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
i--;
@@ -3755,17 +4094,11 @@ hl_row_major_scan_forward(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 6/12/04
*
- * Modifications:
- *
- * JRM -- 4/4/07
- * Added code supporting multiple read only protects.
- * Note that this increased the minimum lag to 10.
- *
*-------------------------------------------------------------------------
*/
void
-row_major_scan_backward(H5C_t * cache_ptr,
+row_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -3781,19 +4114,24 @@ row_major_scan_backward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "row_major_scan_backward";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = NUMBER_OF_ENTRY_TYPES - 1;
int32_t idx;
if ( verbose )
HDfprintf(stdout, "%s(): Entering.\n", fcn_name);
- HDassert( lag >= 10 );
+ if ( pass ) {
- type = NUMBER_OF_ENTRY_TYPES - 1;
+ cache_ptr = file_ptr->shared->cache;
+
+ HDassert( cache_ptr != NULL );
+ HDassert( lag >= 10 );
- if ( ( pass ) && ( reset_stats ) ) {
+ if ( reset_stats ) {
- H5C_stats__reset(cache_ptr);
+ H5C_stats__reset(cache_ptr);
+ }
}
while ( ( pass ) && ( type >= 0 ) )
@@ -3810,7 +4148,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
- insert_entry(cache_ptr, type, (idx - lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx - lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -3822,7 +4160,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 1));
- protect_entry(cache_ptr, type, (idx - lag + 1));
+ protect_entry(file_ptr, type, (idx - lag + 1));
}
if ( ( pass ) && ( (idx - lag + 2) >= 0 ) &&
@@ -3832,7 +4170,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 2));
- unprotect_entry(cache_ptr, type, idx-lag+2, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx-lag+2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3853,7 +4191,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx - lag + 3));
- protect_entry(cache_ptr, type, (idx - lag + 3));
+ protect_entry(file_ptr, type, (idx - lag + 3));
}
if ( ( pass ) && ( (idx - lag + 5) >= 0 ) &&
@@ -3863,7 +4201,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag + 5));
- unprotect_entry(cache_ptr, type, idx-lag+5, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx-lag+5, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3877,7 +4215,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx - lag + 5));
- protect_entry_ro(cache_ptr, type, (idx - lag + 5));
+ protect_entry_ro(file_ptr, type, (idx - lag + 5));
}
if ( ( pass ) && ( (idx - lag + 6) >= 0 ) &&
@@ -3888,7 +4226,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx - lag + 6));
- protect_entry_ro(cache_ptr, type, (idx - lag + 6));
+ protect_entry_ro(file_ptr, type, (idx - lag + 6));
}
if ( ( pass ) && ( (idx - lag + 7) >= 0 ) &&
@@ -3899,7 +4237,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(p-ro, %d, %d) ", type,
(idx - lag + 7));
- protect_entry_ro(cache_ptr, type, (idx - lag + 7));
+ protect_entry_ro(file_ptr, type, (idx - lag + 7));
}
if ( ( pass ) && ( (idx - lag + 7) >= 0 ) &&
@@ -3910,7 +4248,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 7));
- unprotect_entry(cache_ptr, type, (idx - lag + 7),
+ unprotect_entry(file_ptr, type, (idx - lag + 7),
FALSE, H5C__NO_FLAGS_SET);
}
@@ -3922,7 +4260,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 8));
- unprotect_entry(cache_ptr, type, (idx - lag + 8),
+ unprotect_entry(file_ptr, type, (idx - lag + 8),
FALSE, H5C__NO_FLAGS_SET);
}
@@ -3934,7 +4272,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
HDfprintf(stdout, "(u-ro, %d, %d) ", type,
(idx - lag + 9));
- unprotect_entry(cache_ptr, type, (idx - lag + 9),
+ unprotect_entry(file_ptr, type, (idx - lag + 9),
FALSE, H5C__NO_FLAGS_SET);
}
} /* if ( do_mult_ro_protects ) */
@@ -3944,7 +4282,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, idx);
- protect_entry(cache_ptr, type, idx);
+ protect_entry(file_ptr, type, idx);
}
@@ -3955,7 +4293,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag - 2));
- unprotect_entry(cache_ptr, type, idx+lag-2, NO_CHANGE,
+ unprotect_entry(file_ptr, type, idx+lag-2, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
@@ -3966,7 +4304,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, (idx + lag - 1));
- protect_entry(cache_ptr, type, (idx + lag - 1));
+ protect_entry(file_ptr, type, (idx + lag - 1));
}
@@ -3980,36 +4318,36 @@ row_major_scan_backward(H5C_t * cache_ptr,
case 0:
if ( (entries[type])[idx+lag].is_dirty ) {
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
NO_CHANGE, H5C__NO_FLAGS_SET);
} else {
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
dirty_unprotects,
H5C__NO_FLAGS_SET);
}
break;
case 1: /* we just did an insert */
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
NO_CHANGE, H5C__NO_FLAGS_SET);
break;
case 2:
if ( (entries[type])[idx + lag].is_dirty ) {
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
NO_CHANGE, H5C__DELETED_FLAG);
} else {
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
dirty_destroys,
H5C__DELETED_FLAG);
}
break;
case 3: /* we just did an insrt */
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
NO_CHANGE, H5C__DELETED_FLAG);
break;
@@ -4026,7 +4364,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
}
@@ -4072,7 +4410,7 @@ row_major_scan_backward(H5C_t * cache_ptr,
*/
void
-hl_row_major_scan_backward(H5C_t * cache_ptr,
+hl_row_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -4082,7 +4420,8 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
hbool_t dirty_inserts)
{
const char * fcn_name = "hl_row_major_scan_backward";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = NUMBER_OF_ENTRY_TYPES - 1;
int32_t idx;
int32_t i;
int32_t lag = 100;
@@ -4091,15 +4430,19 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s(): entering.\n", fcn_name);
- HDassert( lag > 5 );
- HDassert( max_index >= 200 );
- HDassert( max_index <= MAX_ENTRIES );
+ if ( pass ) {
- type = NUMBER_OF_ENTRY_TYPES - 1;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 200 );
+ HDassert( max_index <= MAX_ENTRIES );
- H5C_stats__reset(cache_ptr);
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
while ( ( pass ) && ( type >= 0 ) )
@@ -4118,7 +4461,7 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(cache_ptr, type, (idx + lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4131,12 +4474,12 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, i);
- protect_entry(cache_ptr, type, i);
+ protect_entry(file_ptr, type, i);
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i, NO_CHANGE,
+ unprotect_entry(file_ptr, type, i, NO_CHANGE,
H5C__NO_FLAGS_SET);
}
i--;
@@ -4178,7 +4521,7 @@ hl_row_major_scan_backward(H5C_t * cache_ptr,
*/
void
-col_major_scan_forward(H5C_t * cache_ptr,
+col_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -4189,19 +4532,23 @@ col_major_scan_forward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "col_major_scan_forward()";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( lag > 5 );
- H5C_stats__reset(cache_ptr);
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
idx = -lag;
@@ -4220,7 +4567,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx + lag));
- insert_entry(cache_ptr, type, (idx + lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx + lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4229,7 +4576,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, idx);
- protect_entry(cache_ptr, type, idx);
+ protect_entry(file_ptr, type, idx);
}
if ( ( pass ) && ( (idx - lag) >= 0 ) &&
@@ -4238,7 +4585,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx - lag));
- unprotect_entry(cache_ptr, type, idx - lag,
+ unprotect_entry(file_ptr, type, idx - lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
@@ -4284,7 +4631,7 @@ col_major_scan_forward(H5C_t * cache_ptr,
*/
void
-hl_col_major_scan_forward(H5C_t * cache_ptr,
+hl_col_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -4295,7 +4642,8 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "hl_col_major_scan_forward()";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
int32_t lag = 200;
int32_t i;
@@ -4304,15 +4652,19 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
- HDassert( max_index >= 500 );
- HDassert( max_index <= MAX_ENTRIES );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
- if ( ( pass ) && ( reset_stats ) ) {
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 500 );
+ HDassert( max_index <= MAX_ENTRIES );
- H5C_stats__reset(cache_ptr);
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
idx = 0;
@@ -4338,7 +4690,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, i);
- insert_entry(cache_ptr, type, i, dirty_inserts,
+ insert_entry(file_ptr, type, i, dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4347,7 +4699,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, i);
- protect_entry(cache_ptr, type, i);
+ protect_entry(file_ptr, type, i);
}
if ( ( pass ) && ( i >= 0 ) &&
@@ -4356,7 +4708,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i,
+ unprotect_entry(file_ptr, type, i,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
@@ -4400,7 +4752,7 @@ hl_col_major_scan_forward(H5C_t * cache_ptr,
*/
void
-col_major_scan_backward(H5C_t * cache_ptr,
+col_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -4411,6 +4763,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "col_major_scan_backward()";
+ H5C_t * cache_ptr;
int mile_stone = 1;
int32_t type;
int32_t idx;
@@ -4418,11 +4771,18 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
+ if ( pass ) {
- if ( ( pass ) && ( reset_stats ) ) {
+ cache_ptr = file_ptr->shared->cache;
- H5C_stats__reset(cache_ptr);
+ HDassert( cache_ptr != NULL );
+
+ HDassert( lag > 5 );
+
+ if ( reset_stats ) {
+
+ H5C_stats__reset(cache_ptr);
+ }
}
idx = MAX_ENTRIES + lag;
@@ -4445,7 +4805,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, (idx - lag));
- insert_entry(cache_ptr, type, (idx - lag), dirty_inserts,
+ insert_entry(file_ptr, type, (idx - lag), dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4454,7 +4814,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, idx);
- protect_entry(cache_ptr, type, idx);
+ protect_entry(file_ptr, type, idx);
}
if ( ( pass ) && ( (idx + lag) >= 0 ) &&
@@ -4463,7 +4823,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, (idx + lag));
- unprotect_entry(cache_ptr, type, idx + lag,
+ unprotect_entry(file_ptr, type, idx + lag,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
@@ -4515,7 +4875,7 @@ col_major_scan_backward(H5C_t * cache_ptr,
*/
void
-hl_col_major_scan_backward(H5C_t * cache_ptr,
+hl_col_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -4526,7 +4886,8 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
int dirty_unprotects)
{
const char * fcn_name = "hl_col_major_scan_backward()";
- int32_t type;
+ H5C_t * cache_ptr;
+ int32_t type = 0;
int32_t idx;
int32_t lag = 50;
int32_t i;
@@ -4535,20 +4896,24 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "%s: entering.\n", fcn_name);
- HDassert( lag > 5 );
- HDassert( max_index >= 500 );
- HDassert( max_index <= MAX_ENTRIES );
+ if ( pass ) {
- type = 0;
+ cache_ptr = file_ptr->shared->cache;
+
+ HDassert( cache_ptr != NULL );
+ HDassert( lag > 5 );
+ HDassert( max_index >= 500 );
+ HDassert( max_index <= MAX_ENTRIES );
- local_max_index = MIN(max_index, MAX_ENTRIES);
+ local_max_index = MIN(max_index, MAX_ENTRIES);
- if ( ( pass ) && ( reset_stats ) ) {
+ if ( reset_stats ) {
- H5C_stats__reset(cache_ptr);
- }
+ H5C_stats__reset(cache_ptr);
+ }
- idx = local_max_index;
+ idx = local_max_index;
+ }
while ( ( pass ) && ( idx >= 0 ) )
{
@@ -4568,7 +4933,7 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(i, %d, %d) ", type, i);
- insert_entry(cache_ptr, type, i, dirty_inserts,
+ insert_entry(file_ptr, type, i, dirty_inserts,
H5C__NO_FLAGS_SET);
}
@@ -4577,7 +4942,7 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(p, %d, %d) ", type, i);
- protect_entry(cache_ptr, type, i);
+ protect_entry(file_ptr, type, i);
}
if ( ( pass ) && ( i >= 0 ) &&
@@ -4586,7 +4951,7 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
if ( verbose )
HDfprintf(stdout, "(u, %d, %d) ", type, i);
- unprotect_entry(cache_ptr, type, i,
+ unprotect_entry(file_ptr, type, i,
dirty_unprotects, H5C__NO_FLAGS_SET);
}
diff --git a/test/cache_common.h b/test/cache_common.h
index e1d33f2..67c5763 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -72,7 +72,11 @@
#define MAX_ENTRIES (10 * 1024)
-#define PICO_BASE_ADDR (haddr_t)0
+/* The choice of the BASE_ADDR below is arbitrary -- it just has to be
+ * larger than the superblock.
+ */
+#define BASE_ADDR (haddr_t)1024
+#define PICO_BASE_ADDR BASE_ADDR
#define NANO_BASE_ADDR (haddr_t)(PICO_BASE_ADDR + \
(PICO_ENTRY_SIZE * NUM_PICO_ENTRIES))
#define MICRO_BASE_ADDR (haddr_t)(NANO_BASE_ADDR + \
@@ -112,6 +116,9 @@
(HUGE_ENTRY_SIZE * NUM_HUGE_ENTRIES))
#define VARIABLE_ALT_BASE_ADDR (haddr_t)(MONSTER_ALT_BASE_ADDR + \
(MONSTER_ENTRY_SIZE * NUM_MONSTER_ENTRIES))
+#define MAX_ADDR (haddr_t)(VARIABLE_ALT_BASE_ADDR + \
+ (VARIABLE_ENTRY_SIZE * NUM_VARIABLE_ENTRIES))
+#define ADDR_SPACE_SIZE (haddr_t)(MAX_ADDR - BASE_ADDR)
#define MAX_PINS 8 /* Maximum number of entries that can be
* directly pinned by a single entry.
@@ -594,29 +601,27 @@ haddr_t type_and_index_to_addr(int32_t type,
int32_t idx);
#endif
-void dirty_entry(H5C_t * cache_ptr,
+void dirty_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t dirty_pin);
-void expunge_entry(H5C_t * cache_ptr,
+void expunge_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx);
-void insert_entry(H5C_t * cache_ptr,
+void insert_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t dirty,
unsigned int flags);
-void mark_pinned_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+void mark_pinned_entry_dirty(int32_t type,
int32_t idx,
hbool_t size_changed,
size_t new_size);
-void mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+void mark_pinned_or_protected_entry_dirty(int32_t type,
int32_t idx);
void rename_entry(H5C_t * cache_ptr,
@@ -624,11 +629,11 @@ void rename_entry(H5C_t * cache_ptr,
int32_t idx,
hbool_t main_addr);
-void protect_entry(H5C_t * cache_ptr,
+void protect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx);
-void protect_entry_ro(H5C_t * cache_ptr,
+void protect_entry_ro(H5F_t * file_ptr,
int32_t type,
int32_t idx);
@@ -636,20 +641,15 @@ hbool_t entry_in_cache(H5C_t * cache_ptr,
int32_t type,
int32_t idx);
-void create_pinned_entry_dependency(H5C_t * cache_ptr,
+void create_pinned_entry_dependency(H5F_t * file_ptr,
int pinning_type,
int pinning_idx,
int pinned_type,
int pinned_idx);
-void execute_flush_op(H5C_t * cache_ptr,
- struct test_entry_t * entry_ptr,
- struct flush_op * op_ptr,
- unsigned * flags_ptr);
-
void reset_entries(void);
-void resize_entry(H5C_t * cache_ptr,
+void resize_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
size_t new_size,
@@ -660,9 +660,9 @@ void resize_pinned_entry(H5C_t * cache_ptr,
int32_t idx,
size_t new_size);
-H5C_t * setup_cache(size_t max_cache_size, size_t min_clean_size);
+H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size);
-void row_major_scan_forward(H5C_t * cache_ptr,
+void row_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -677,7 +677,7 @@ void row_major_scan_forward(H5C_t * cache_ptr,
int dirty_destroys,
int dirty_unprotects);
-void hl_row_major_scan_forward(H5C_t * cache_ptr,
+void hl_row_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -686,7 +686,7 @@ void hl_row_major_scan_forward(H5C_t * cache_ptr,
hbool_t do_inserts,
hbool_t dirty_inserts);
-void row_major_scan_backward(H5C_t * cache_ptr,
+void row_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -701,7 +701,7 @@ void row_major_scan_backward(H5C_t * cache_ptr,
int dirty_destroys,
int dirty_unprotects);
-void hl_row_major_scan_backward(H5C_t * cache_ptr,
+void hl_row_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -710,7 +710,7 @@ void hl_row_major_scan_backward(H5C_t * cache_ptr,
hbool_t do_inserts,
hbool_t dirty_inserts);
-void col_major_scan_forward(H5C_t * cache_ptr,
+void col_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -720,7 +720,7 @@ void col_major_scan_forward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void hl_col_major_scan_forward(H5C_t * cache_ptr,
+void hl_col_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -730,7 +730,7 @@ void hl_col_major_scan_forward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void col_major_scan_backward(H5C_t * cache_ptr,
+void col_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -740,7 +740,7 @@ void col_major_scan_backward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void hl_col_major_scan_backward(H5C_t * cache_ptr,
+void hl_col_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -750,26 +750,25 @@ void hl_col_major_scan_backward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void takedown_cache(H5C_t * cache_ptr,
+void takedown_cache(H5F_t * file_ptr,
hbool_t dump_stats,
hbool_t dump_detailed_stats);
-void flush_cache(H5C_t * cache_ptr,
+void flush_cache(H5F_t * file_ptr,
hbool_t destroy_entries,
hbool_t dump_stats,
hbool_t dump_detailed_stats);
-void unpin_entry(H5C_t * cache_ptr,
- int32_t type,
+void unpin_entry(int32_t type,
int32_t idx);
-void unprotect_entry(H5C_t * cache_ptr,
+void unprotect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
int dirty,
unsigned int flags);
-void unprotect_entry_with_size_change(H5C_t * cache_ptr,
+void unprotect_entry_with_size_change(H5F_t * file_ptr,
int32_t type,
int32_t idx,
unsigned int flags,
diff --git a/test/lheap.c b/test/lheap.c
index df41315..52af202 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -104,7 +104,7 @@ main(void)
goto error;
}
}
- if(H5HL_unprotect(f, heap) < 0) {
+ if(H5HL_unprotect(heap) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -151,7 +151,7 @@ main(void)
goto error;
}
- if(H5HL_unprotect(f, heap) < 0) {
+ if(H5HL_unprotect(heap) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index dc047ed..0697f3a 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -352,19 +352,14 @@ void lock_and_unlock_random_entries(H5C_t * cache_ptr, H5F_t * file_ptr,
void lock_and_unlock_random_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int min_idx, int max_idx);
void lock_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx);
-void mark_pinned_entry_dirty(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, hbool_t size_changed, size_t new_size);
-void mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx);
+void mark_pinned_entry_dirty(int32_t idx, hbool_t size_changed, size_t new_size);
+void mark_pinned_or_protected_entry_dirty(int32_t idx);
void pin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx,
hbool_t global, hbool_t dirty);
-void pin_protected_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, hbool_t global);
+void pin_protected_entry(int32_t idx, hbool_t global);
void rename_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int32_t old_idx, int32_t new_idx);
-void resize_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, size_t new_size);
+void resize_entry(int32_t idx, size_t new_size);
hbool_t setup_cache_for_test(hid_t * fid_ptr, H5F_t ** file_ptr_ptr,
H5C_t ** cache_ptr_ptr);
void setup_rand(void);
@@ -2194,7 +2189,7 @@ expunge_entry(H5C_t * cache_ptr,
HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE );
HDassert( ! ((entry_ptr->header).is_dirty) );
- result = H5C_get_entry_status(cache_ptr, entry_ptr->base_addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr,
NULL, &in_cache, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -2707,7 +2702,7 @@ lock_entry(H5C_t * cache_ptr,
HDassert( ! (entry_ptr->locked) );
- cache_entry_ptr = H5AC_protect(file_ptr, -1, &(types[0]),
+ cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, -1, &(types[0]),
entry_ptr->base_addr,
NULL, NULL, H5AC_WRITE);
@@ -2753,9 +2748,7 @@ lock_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-mark_pinned_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+mark_pinned_entry_dirty(int32_t idx,
hbool_t size_changed,
size_t new_size)
{
@@ -2765,8 +2758,6 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( file_ptr );
- HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2778,8 +2769,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_mark_pinned_entry_dirty(file_ptr,
- (void *)entry_ptr,
+ result = H5AC_mark_pinned_entry_dirty((void *)entry_ptr,
size_changed,
new_size);
@@ -2821,9 +2811,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
*****************************************************************************/
void
-mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx)
+mark_pinned_or_protected_entry_dirty(int32_t idx)
{
const char * fcn_name = "mark_pinned_or_protected_entry_dirty()";
herr_t result;
@@ -2831,8 +2819,6 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( file_ptr );
- HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2843,8 +2829,7 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_mark_pinned_or_protected_entry_dirty(file_ptr,
- (void *)entry_ptr);
+ result = H5AC_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
if ( result < 0 ) {
@@ -2958,17 +2943,13 @@ pin_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-pin_protected_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+pin_protected_entry(int32_t idx,
hbool_t global)
{
const char * fcn_name = "pin_protected_entry()";
herr_t result;
struct datum * entry_ptr;
- HDassert( cache_ptr );
- HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2978,7 +2959,7 @@ pin_protected_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- result = H5AC_pin_protected_entry(file_ptr, (void *)entry_ptr);
+ result = H5AC_pin_protected_entry((void *)entry_ptr);
if ( ( result < 0 ) ||
( entry_ptr->header.type != &(types[0]) ) ||
@@ -3147,9 +3128,7 @@ rename_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-resize_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+resize_entry(int32_t idx,
size_t new_size)
{
const char * fcn_name = "resize_entry()";
@@ -3158,8 +3137,6 @@ resize_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
- HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -3175,8 +3152,7 @@ resize_entry(H5C_t * cache_ptr,
HDassert( new_size > 0 );
HDassert( new_size <= entry_ptr->len );
- result = H5AC_resize_pinned_entry(file_ptr, (void *)entry_ptr,
- new_size);
+ result = H5AC_resize_pinned_entry((void *)entry_ptr, new_size);
if ( result < 0 ) {
@@ -3262,7 +3238,7 @@ setup_cache_for_test(hid_t * fid_ptr,
world_mpi_rank, fcn_name);
}
} else {
- file_ptr = H5I_object_verify(fid, H5I_FILE);
+ file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE);
}
if ( file_ptr == NULL ) {
@@ -3740,12 +3716,11 @@ unpin_entry(H5C_t * cache_ptr,
if ( dirty ) {
- mark_pinned_entry_dirty(cache_ptr, file_ptr, idx, FALSE,
- (size_t)0);
+ mark_pinned_entry_dirty(idx, FALSE, (size_t)0);
}
- result = H5AC_unpin_entry(file_ptr, (void *)entry_ptr);
+ result = H5AC_unpin_entry((void *)entry_ptr);
if ( result < 0 ) {
@@ -5106,7 +5081,7 @@ smoke_check_5(void)
if ( i % 2 == 0 )
{
- mark_pinned_or_protected_entry_dirty(cache_ptr, file_ptr, i);
+ mark_pinned_or_protected_entry_dirty(i);
}
unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
@@ -5133,23 +5108,21 @@ smoke_check_5(void)
{
if ( i % 8 <= 4 ) {
- resize_entry(cache_ptr, file_ptr, i, data[i].len / 2);
+ resize_entry(i, data[i].len / 2);
}
if ( i % 4 == 0 )
{
- mark_pinned_or_protected_entry_dirty(cache_ptr,
- file_ptr, i);
+ mark_pinned_or_protected_entry_dirty(i);
}
else
{
- mark_pinned_entry_dirty(cache_ptr, file_ptr, i,
- FALSE, (size_t)0);
+ mark_pinned_entry_dirty(i, FALSE, (size_t)0);
}
if ( i % 8 <= 4 ) {
- resize_entry(cache_ptr, file_ptr, i, data[i].len);
+ resize_entry(i, data[i].len);
}
}
@@ -5395,22 +5368,22 @@ trace_file_check(void)
insert_entry(cache_ptr, file_ptr, 3, H5AC__NO_FLAGS_SET);
lock_entry(cache_ptr, file_ptr, 0);
- mark_pinned_or_protected_entry_dirty(cache_ptr, file_ptr, 0);
+ mark_pinned_or_protected_entry_dirty(0);
unlock_entry(cache_ptr, file_ptr, 0, H5AC__NO_FLAGS_SET);
lock_entry(cache_ptr, file_ptr, 1);
- pin_protected_entry(cache_ptr, file_ptr, 1, TRUE);
+ pin_protected_entry(1, TRUE);
unlock_entry(cache_ptr, file_ptr, 1, H5AC__NO_FLAGS_SET);
unpin_entry(cache_ptr, file_ptr, 1, TRUE, FALSE, FALSE);
expunge_entry(cache_ptr,file_ptr, 1);
lock_entry(cache_ptr, file_ptr, 2);
- pin_protected_entry(cache_ptr, file_ptr, 2, TRUE);
+ pin_protected_entry(2, TRUE);
unlock_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET);
- mark_pinned_entry_dirty(cache_ptr, file_ptr, 2, FALSE, 0);
- resize_entry(cache_ptr, file_ptr, 2, data[2].len / 2);
- resize_entry(cache_ptr, file_ptr, 2, data[2].len);
+ mark_pinned_entry_dirty(2, FALSE, 0);
+ resize_entry(2, data[2].len / 2);
+ resize_entry(2, data[2].len);
unpin_entry(cache_ptr, file_ptr, 2, TRUE, FALSE, FALSE);
rename_entry(cache_ptr, file_ptr, 0, 20);