summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-07-20 18:52:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-07-20 18:52:37 (GMT)
commit9e76314bb7b1edca9ed92eae6ae298f6e73cb485 (patch)
treea88135396b882102da744e7533d18a4f5a2d5301
parentc5b81d49b5864fa5e1107204a05611fa46726a10 (diff)
downloadhdf5-9e76314bb7b1edca9ed92eae6ae298f6e73cb485.zip
hdf5-9e76314bb7b1edca9ed92eae6ae298f6e73cb485.tar.gz
hdf5-9e76314bb7b1edca9ed92eae6ae298f6e73cb485.tar.bz2
[svn-r19115] Description:
Rename H5AC_set() to H5AC_insert_entry() Get rid of H5C_set_skip_flags() & related flags Tested on: Mac OS X/32 10.6.4 (amazon) w/debug (too simple to require h5committest)
-rw-r--r--src/H5AC.c10
-rw-r--r--src/H5ACprivate.h2
-rw-r--r--src/H5B.c4
-rw-r--r--src/H5B2hdr.c2
-rw-r--r--src/H5B2int.c4
-rw-r--r--src/H5C.c74
-rw-r--r--src/H5Cpkg.h21
-rw-r--r--src/H5Cprivate.h4
-rw-r--r--src/H5FS.c4
-rw-r--r--src/H5Fsuper.c2
-rw-r--r--src/H5Gnode.c2
-rw-r--r--src/H5HFdblock.c2
-rw-r--r--src/H5HFhdr.c2
-rw-r--r--src/H5HFiblock.c2
-rw-r--r--src/H5HG.c5
-rw-r--r--src/H5HL.c4
-rw-r--r--src/H5O.c2
-rw-r--r--src/H5Ochunk.c2
-rw-r--r--src/H5Ocopy.c2
-rwxr-xr-xsrc/H5SM.c4
-rw-r--r--test/cache_common.c2
-rw-r--r--testpar/t_cache.c23
22 files changed, 42 insertions, 137 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 499bc9c..6349788 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -914,7 +914,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5AC_set
+ * Function: H5AC_insert_entry
*
* Purpose: Adds the specified thing to the cache. The thing need not
* exist on disk yet, but it must have an address and disk
@@ -929,7 +929,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned int flags)
+H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned int flags)
{
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
@@ -938,7 +938,7 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_set, FAIL)
+ FUNC_ENTER_NOAPI(H5AC_insert_entry, FAIL)
HDassert(f);
HDassert(f->shared);
@@ -967,7 +967,7 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *
( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) &&
( trace_file_ptr != NULL ) ) {
- sprintf(trace, "H5AC_set 0x%lx %d 0x%x",
+ sprintf(trace, "H5AC_insert_entry 0x%lx %d 0x%x",
(unsigned long)addr,
type->id,
flags);
@@ -1012,7 +1012,7 @@ done:
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_set() */
+} /* H5AC_insert_entry() */
/*-------------------------------------------------------------------------
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 56c7d6d..1c37d41 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -310,7 +310,7 @@ 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(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,
+H5_DLL herr_t H5AC_insert_entry(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(void *thing);
H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
diff --git a/src/H5B.c b/src/H5B.c
index 58aeecb..eae7f4d 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -245,7 +245,7 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
/*
* Cache the new B-tree node.
*/
- if (H5AC_set(f, dxpl_id, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache")
#ifdef H5B_DEBUG
H5B_assert(f, dxpl_id, *addr_p, shared->type, udata);
@@ -687,7 +687,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr,
HDmemcpy(H5B_NKEY(new_bt, shared, 2), rt_key, shared->type->sizeof_nkey);
/* Insert the modified copy of the old root into the file again */
- if (H5AC_set(f, dxpl_id, H5AC_BT, addr, new_bt, H5AC__NO_FLAGS_SET) < 0)
+ if (H5AC_insert_entry(f, dxpl_id, H5AC_BT, addr, new_bt, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to flush old B-tree root node")
#ifdef H5B_DEBUG
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 94e2c54..e8d8b96 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -309,7 +309,7 @@ H5B2_hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "file allocation failed for B-tree header")
/* Cache the new B-tree node */
- if(H5AC_set(f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, HADDR_UNDEF, "can't add B-tree header to cache")
/* Set address of v2 B-tree header to return */
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 91459a0..eeb5d1a 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -1771,7 +1771,7 @@ HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node")
/* Cache the new B-tree node */
- if(H5AC_set(hdr->f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache")
done:
@@ -1890,7 +1890,7 @@ HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree internal node")
/* Cache the new B-tree node */
- if(H5AC_set(hdr->f, dxpl_id, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree internal node to cache")
done:
diff --git a/src/H5C.c b/src/H5C.c
index d7f321c..0b93f72 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -150,8 +150,7 @@ static void * H5C_load_entry(H5F_t * f,
hid_t dxpl_id,
const H5C_class_t * type,
haddr_t addr,
- void * udata,
- hbool_t skip_file_checks);
+ void * udata);
static herr_t H5C_make_space_in_cache(H5F_t * f,
hid_t primary_dxpl_id,
@@ -1147,8 +1146,6 @@ H5C_create(size_t max_cache_size,
H5C_stats__reset(cache_ptr);
- cache_ptr->skip_file_checks = FALSE;
- cache_ptr->skip_dxpl_id_checks = FALSE;
cache_ptr->prefix[0] = '\0'; /* empty string */
/* Set return value */
@@ -1398,7 +1395,6 @@ H5C_dest(H5F_t * f,
/* Sanity check */
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
- HDassert(cache_ptr->skip_file_checks || f);
/* Flush and invalidate all cache entries */
if(H5C_flush_invalidate_cache(f, primary_dxpl_id, secondary_dxpl_id,
@@ -1584,7 +1580,6 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->skip_file_checks || f);
HDassert( cache_ptr->slist_ptr );
ignore_protected = ( (flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0 );
@@ -1948,7 +1943,6 @@ H5C_flush_to_min_clean(H5F_t * f,
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->skip_file_checks || f );
if ( cache_ptr->check_write_permitted != NULL ) {
@@ -2505,7 +2499,6 @@ H5C_insert_entry(H5F_t * f,
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->skip_file_checks || f );
HDassert( type );
HDassert( type->flush );
HDassert( type->size );
@@ -2810,7 +2803,6 @@ H5C_mark_entries_as_clean(H5F_t * f,
cache_ptr = f->shared->cache;
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->skip_file_checks || f );
HDassert( ce_array_len > 0 );
HDassert( ce_array_ptr != NULL );
@@ -3531,7 +3523,6 @@ H5C_protect(H5F_t * f,
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->skip_file_checks || f );
HDassert( type );
HDassert( type->flush );
HDassert( type->load );
@@ -3569,7 +3560,7 @@ H5C_protect(H5F_t * f,
hit = FALSE;
- thing = H5C_load_entry(f, primary_dxpl_id, type, addr, udata, cache_ptr->skip_file_checks);
+ thing = H5C_load_entry(f, primary_dxpl_id, type, addr, udata);
if ( thing == NULL ) {
@@ -4274,48 +4265,6 @@ H5C_set_prefix(H5C_t * cache_ptr, char * prefix)
/*-------------------------------------------------------------------------
- * Function: H5C_set_skip_flags
- *
- * Purpose: Set the values of the skip sanity check flags.
- *
- * This function and the skip sanity check flags were created
- * for the convenience of the test bed. However it is
- * possible that there may be other uses for the flags.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 6/11/04
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_set_skip_flags(H5C_t * cache_ptr,
- hbool_t skip_file_checks,
- hbool_t skip_dxpl_id_checks)
-{
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5C_set_skip_flags, FAIL)
-
- /* 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 ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr")
- }
-
- cache_ptr->skip_file_checks = skip_file_checks;
- cache_ptr->skip_dxpl_id_checks = skip_dxpl_id_checks;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5C_set_skip_flags() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5C_set_trace_file_ptr
*
* Purpose: Set the trace_file_ptr field for the cache.
@@ -5062,7 +5011,6 @@ H5C_unprotect(H5F_t * f,
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->skip_file_checks || f );
HDassert( type );
HDassert( type->clear );
HDassert( type->flush );
@@ -6918,7 +6866,6 @@ H5C_flush_invalidate_cache(H5F_t * f,
HDassert( f );
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->skip_file_checks || f );
HDassert( cache_ptr->slist_ptr );
/* Filter out the flags that are not relevant to the flush/invalidate.
@@ -7446,7 +7393,6 @@ H5C_flush_single_entry(H5F_t * f,
HDassert( f );
HDassert( cache_ptr );
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->skip_file_checks || f );
HDassert( H5F_addr_defined(addr) );
HDassert( first_flush_ptr );
@@ -7516,14 +7462,8 @@ H5C_flush_single_entry(H5F_t * f,
* Note that we only do these sanity checks when the clear_only flag
* is not set, and the entry to be flushed is dirty. Don't bother
* otherwise as no file I/O can result.
- *
- * There are also cases (testing for instance) where it is convenient
- * to pass in dummy dxpl_ids. Since we don't use the dxpl_ids directly,
- * this isn't a problem -- but we do have to turn off sanity checks
- * involving them. We use cache_ptr->skip_dxpl_id_checks to do this.
*/
- if ( ( ! cache_ptr->skip_dxpl_id_checks ) &&
- ( ! clear_only ) &&
+ if ( ( ! clear_only ) &&
( entry_ptr->is_dirty ) &&
( IS_H5FD_MPI(f) ) ) {
@@ -7854,12 +7794,7 @@ H5C_load_entry(H5F_t * f,
hid_t dxpl_id,
const H5C_class_t * type,
haddr_t addr,
- void * udata,
-#ifndef NDEBUG
- hbool_t skip_file_checks)
-#else /* NDEBUG */
- hbool_t UNUSED skip_file_checks)
-#endif /* NDEBUG */
+ void * udata)
{
void * thing = NULL; /* Pointer to thing loaded */
H5C_cache_entry_t * entry; /* Alias for thing loaded, as cache entry */
@@ -7870,7 +7805,6 @@ H5C_load_entry(H5F_t * f,
HDassert(f);
HDassert(f->shared);
HDassert(f->shared->cache);
- HDassert(skip_file_checks || f);
HDassert(type);
HDassert(type->load);
HDassert(type->size);
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 53f2dbc..af39dfb 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -832,25 +832,6 @@
*
* Fields supporting testing:
*
- * For test purposes, it is useful to turn off some asserts and sanity
- * checks. The following flags support this.
- *
- * skip_file_checks: Boolean flag used to skip sanity checks on file
- * parameters passed to the cache. In the test bed, there
- * is no reason to have a file open, as the cache proper
- * just passes these parameters through without using them.
- *
- * When this flag is set, all sanity checks on the file
- * parameters are skipped. The field defaults to FALSE.
- *
- * skip_dxpl_id_checks: Boolean flag used to skip sanity checks on the
- * dxpl_id parameters passed to the cache. These are not
- * used directly by the cache, so skipping the checks
- * simplifies the test bed.
- *
- * When this flag is set, all sanity checks on the dxpl_id
- * parameters are skipped. The field defaults to FALSE.
- *
* prefix Array of char used to prefix debugging output. The
* field is intended to allow marking of output of with
* the processes mpi rank.
@@ -1013,8 +994,6 @@ struct H5C_t
#endif /* H5C_COLLECT_CACHE_STATS */
- hbool_t skip_file_checks;
- hbool_t skip_dxpl_id_checks;
char prefix[H5C__PREFIX_LEN];
};
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 164ef21..2ad6909 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -1112,10 +1112,6 @@ H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr,
H5_DLL herr_t H5C_set_prefix(H5C_t * cache_ptr, char * prefix);
-H5_DLL herr_t H5C_set_skip_flags(H5C_t * cache_ptr,
- hbool_t skip_file_checks,
- hbool_t skip_dxpl_id_checks);
-
H5_DLL herr_t H5C_set_trace_file_ptr(H5C_t * cache_ptr,
FILE * trace_file_ptr);
diff --git a/src/H5FS.c b/src/H5FS.c
index a01ed2d..d7a4950 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -143,7 +143,7 @@ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, ncl
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "file allocation failed for free space header")
/* Cache the new free space header (pinned) */
- if(H5AC_set(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't add free space header to cache")
/* Return free space header address to caller, if desired */
@@ -401,7 +401,7 @@ HDfprintf(stderr, "%s: Real sections to store in file\n", FUNC);
HDassert(H5F_addr_defined(fspace->sect_addr));
/* Cache the free space section info */
- if(H5AC_set(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache")
} /* end if */
else {
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 0a40d13..4275069 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -481,7 +481,7 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set EOA value for superblock")
/* Insert superblock into cache, pinned */
- if(H5AC_set(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, H5AC__PIN_ENTRY_FLAG) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, H5AC__PIN_ENTRY_FLAG) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "can't add superblock to cache")
sblock_in_cache = TRUE;
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 793034a..fc7c633 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -313,7 +313,7 @@ H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t UNUSED op, void *_lt_key,
if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f)))))
HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "memory allocation failed")
- if(H5AC_set(f, dxpl_id, H5AC_SNODE, *addr_p, sym, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_SNODE, *addr_p, sym, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to cache symbol table leaf node")
/*
* The left and right symbols in an empty tree are both the
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index 8db697e..db2359c 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -183,7 +183,7 @@ HDmemset(dblock->blk, 0, dblock->size);
} /* end else */
/* Cache the new fractal heap direct block */
- if(H5AC_set(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap direct block to cache")
/* Increase the allocated heap size */
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index 67bb7b0..e678d74 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -500,7 +500,7 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for fractal heap header")
/* Cache the new fractal heap header */
- if(H5AC_set(f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, HADDR_UNDEF, "can't add fractal heap header to cache")
/* Set address of heap header to return */
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 719b990..3bfa421 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -1056,7 +1056,7 @@ H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *par_iblo
iblock->max_child = 0;
/* Cache the new indirect block */
- if(H5AC_set(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, *addr_p, iblock, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, *addr_p, iblock, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap indirect block to cache")
done:
diff --git a/src/H5HG.c b/src/H5HG.c
index ec70f83..8f4bd89 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -227,9 +227,8 @@ HDmemset(heap->chunk, 0, size);
} /* end else */
/* Add the heap to the cache */
- if (H5AC_set (f, dxpl_id, H5AC_GHEAP, addr, heap, H5AC__NO_FLAGS_SET)<0)
- HGOTO_ERROR (H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, \
- "unable to cache global heap collection");
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_GHEAP, addr, heap, H5AC__NO_FLAGS_SET)<0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to cache global heap collection")
ret_value = addr;
diff --git a/src/H5HL.c b/src/H5HL.c
index 61c97e1..4665474 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -163,7 +163,7 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
/* Add to cache */
- if(H5AC_set(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache local heap prefix")
/* Set address to return */
@@ -270,7 +270,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap prefix in cache")
/* Insert data block into cache (pinned) */
- if(H5AC_set(f, dxpl_id, H5AC_LHEAP_DBLK, new_addr, dblk, H5AC__PIN_ENTRY_FLAG) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_LHEAP_DBLK, new_addr, dblk, H5AC__PIN_ENTRY_FLAG) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache local heap data block")
dblk = NULL;
diff --git a/src/H5O.c b/src/H5O.c
index 5b077bf..3234577 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1231,7 +1231,7 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, hid_t ocpl_id,
oh->mesg[0].chunkno = 0;
/* Cache object header */
- if(H5AC_set(f, dxpl_id, H5AC_OHDR, oh_addr, oh, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR, oh_addr, oh, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header")
oh = NULL;
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index 5def4f7..24f36d4 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -118,7 +118,7 @@ H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "can't increment reference count on object header")
/* Insert the chunk proxy into the cache */
- if(H5AC_set(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header chunk")
chk_proxy = NULL;
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 08ee56b..2238be2 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -728,7 +728,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
} /* end if */
/* Insert destination object header in cache */
- if(H5AC_set(oloc_dst->file, dxpl_id, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(oloc_dst->file, dxpl_id, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header")
oh_dst = NULL;
diff --git a/src/H5SM.c b/src/H5SM.c
index 36bd0f2..602d39e 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -209,7 +209,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "file allocation failed for SOHM table")
/* Cache the new table */
- if(H5AC_set(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, FAIL, "can't add SOHM table to cache")
/* Record the address of the master table in the file */
@@ -655,7 +655,7 @@ H5SM_create_list(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id)
HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list")
/* Put the list into the cache */
- if(H5AC_set(f, dxpl_id, H5AC_SOHM_LIST, addr, list, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_insert_entry(f, dxpl_id, H5AC_SOHM_LIST, addr, list, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, HADDR_UNDEF, "can't add SOHM list to cache")
/* Set return value */
diff --git a/test/cache_common.c b/test/cache_common.c
index c5570ea..c2c0b12 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -2419,8 +2419,6 @@ setup_cache(size_t max_cache_size,
H5C_stats__reset(cache_ptr);
- H5C_set_skip_flags(cache_ptr, TRUE, TRUE);
-
ret_val = file_ptr;
}
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 9e6f97d..463fbac 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -2931,7 +2931,7 @@ insert_entry(H5C_t * cache_ptr,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_set(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]),
+ result = H5AC_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]),
entry_ptr->base_addr, (void *)(&(entry_ptr->header)), flags);
if ( ( result < 0 ) ||
@@ -2941,7 +2941,7 @@ insert_entry(H5C_t * cache_ptr,
nerrors++;
if ( verbose ) {
- HDfprintf(stdout, "%d:%s: Error in H5AC_set().\n",
+ HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n",
world_mpi_rank, fcn_name);
}
}
@@ -3941,7 +3941,6 @@ setup_cache_for_test(hid_t * fid_ptr,
*fid_ptr = fid;
*file_ptr_ptr = file_ptr;
*cache_ptr_ptr = cache_ptr;
- H5C_set_skip_flags(cache_ptr, TRUE, TRUE);
H5C_stats__reset(cache_ptr);
success = TRUE;
}
@@ -6782,7 +6781,7 @@ smoke_check_5(int metadata_write_strategy)
* functions:
*
* - H5AC_flush()
- * - H5AC_set()
+ * - H5AC_insert_entry()
* - H5AC_mark_entry_dirty()
* - H5AC_move_entry()
* - H5AC_pin_protected_entry()
@@ -6815,10 +6814,10 @@ trace_file_check(int metadata_write_strategy)
{
"### HDF5 metadata cache trace file version 1 ###\n",
"H5AC_set_cache_auto_resize_config 1 0 1 0 \"t_cache_trace.txt\" 1 0 2097152 0.300000 33554432 1048576 50000 1 0.900000 2.000000 1 1.000000 0.250000 1 4194304 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 0 0\n",
- "H5AC_set 0x200 25 0x0 2 0\n",
- "H5AC_set 0x202 25 0x0 2 0\n",
- "H5AC_set 0x204 25 0x0 4 0\n",
- "H5AC_set 0x208 25 0x0 6 0\n",
+ "H5AC_insert_entry 0x200 25 0x0 2 0\n",
+ "H5AC_insert_entry 0x202 25 0x0 2 0\n",
+ "H5AC_insert_entry 0x204 25 0x0 4 0\n",
+ "H5AC_insert_entry 0x208 25 0x0 6 0\n",
"H5AC_protect 0x200 25 H5AC_WRITE 2 1\n",
"H5AC_mark_entry_dirty 0x200 0\n",
"H5AC_unprotect 0x200 25 0 0 0\n",
@@ -6843,10 +6842,10 @@ trace_file_check(int metadata_write_strategy)
{
"### HDF5 metadata cache trace file version 1 ###\n",
"H5AC_set_cache_auto_resize_config 1 0 1 0 \"t_cache_trace.txt\" 1 0 2097152 0.300000 33554432 1048576 50000 1 0.900000 2.000000 1 1.000000 0.250000 1 4194304 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 1 0\n",
- "H5AC_set 0x200 25 0x0 2 0\n",
- "H5AC_set 0x202 25 0x0 2 0\n",
- "H5AC_set 0x204 25 0x0 4 0\n",
- "H5AC_set 0x208 25 0x0 6 0\n",
+ "H5AC_insert_entry 0x200 25 0x0 2 0\n",
+ "H5AC_insert_entry 0x202 25 0x0 2 0\n",
+ "H5AC_insert_entry 0x204 25 0x0 4 0\n",
+ "H5AC_insert_entry 0x208 25 0x0 6 0\n",
"H5AC_protect 0x200 25 H5AC_WRITE 2 1\n",
"H5AC_mark_entry_dirty 0x200 0\n",
"H5AC_unprotect 0x200 25 0 0 0\n",