From 06763537dabab2043d7df4cf05ed21f7d01977c0 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 20 Jul 2010 13:49:06 -0500 Subject: [svn-r19112] Description: Rename H5AC_set() to H5AC_insert_entry() Get rid of H5C_set_skip_flags() & related flags Tested on: Eyeballed only, very simple... --- src/H5AC.c | 10 +++++----- src/H5ACprivate.h | 2 +- src/H5B.c | 4 ++-- src/H5B2.c | 2 +- src/H5B2int.c | 4 ++-- src/H5C.c | 50 -------------------------------------------------- src/H5Cpkg.h | 21 --------------------- src/H5Cprivate.h | 4 ---- src/H5FS.c | 2 +- src/H5FSsection.c | 2 +- src/H5Gnode.c | 2 +- src/H5HFcache.c | 12 +++++------- src/H5HFdblock.c | 2 +- src/H5HFhdr.c | 2 +- src/H5HFiblock.c | 2 +- src/H5HG.c | 2 +- src/H5HL.c | 4 ++-- src/H5O.c | 2 +- src/H5Ochunk.c | 2 +- src/H5Ocopy.c | 2 +- src/H5SM.c | 4 ++-- testpar/t_cache.c | 17 +++++++---------- 22 files changed, 37 insertions(+), 117 deletions(-) diff --git a/src/H5AC.c b/src/H5AC.c index 82b7bfe..de3defb 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -1546,7 +1546,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 @@ -1561,7 +1561,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, +H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned int flags) { #ifdef H5_HAVE_PARALLEL @@ -1574,7 +1574,7 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, #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); @@ -1598,7 +1598,7 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, ( 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); @@ -1639,7 +1639,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 78eaf83..6fd3c33 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -286,7 +286,7 @@ H5_DLL herr_t H5AC_end_transaction(hbool_t do_transaction, 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 f94bb0a..f872283 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -248,7 +248,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); @@ -712,7 +712,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/H5B2.c b/src/H5B2.c index dd182fb..bda3643 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -138,7 +138,7 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree header") /* Cache the new B-tree node */ - if(H5AC_set(f, dxpl_id, H5AC_BT2_HDR, *addr_p, bt2, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_BT2_HDR, *addr_p, bt2, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree header to cache") done: diff --git a/src/H5B2int.c b/src/H5B2int.c index d31231e..9384056 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -2010,7 +2010,7 @@ HDmemset(leaf->leaf_native, 0, shared->type->nrec_size * shared->node_info[0].ma HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node") /* Cache the new B-tree node */ - if(H5AC_set(f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(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: @@ -2092,7 +2092,7 @@ HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (shared->node_info[de HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree internal node") /* Cache the new B-tree node */ - if(H5AC_set(f, dxpl_id, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(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 8ee5ec5..d9a6f08 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -573,8 +573,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 */ /* We used to check for journaling here, but the super block hasn't @@ -1103,7 +1101,6 @@ H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags) 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 ); @@ -1486,7 +1483,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 ) { @@ -2040,7 +2036,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( ( ! ( cache_ptr->mdj_enabled ) ) || ( cache_ptr->trans_in_progress ) ); HDassert( type ); @@ -3047,7 +3042,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( H5F_addr_defined(addr) ); @@ -3769,48 +3763,6 @@ done: /*------------------------------------------------------------------------- - * 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. @@ -4471,7 +4423,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( H5F_addr_defined(addr) ); HDassert( thing ); @@ -6316,7 +6267,6 @@ H5C_flush_invalidate_cache(const 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. diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index a000a69..b8e6072 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -1357,25 +1357,6 @@ typedef struct H5C_mdjsc_record_t * * 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. @@ -1555,8 +1536,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 0f7d4fd..be7e076 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -1474,10 +1474,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 8a41ee7..43f4172 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -136,7 +136,7 @@ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, ncl fspace->max_sect_size = fs_create->max_sect_size; /* 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") /* Set the return value */ diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 49a9bc1..befc6ff 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -222,7 +222,7 @@ HDfprintf(stderr, "%s: New section info, addr = %a, size = %Hu\n", FUNC, fspace- #endif /* QAK */ /* Cache the new free space section info (pinned) */ - if(H5AC_set(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, sinfo, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, sinfo, H5AC__PIN_ENTRY_FLAG) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't add free space sections to cache") /* Mark free space header as dirty */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 6cbb9f6..032ef48 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -591,7 +591,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_RESOURCE, H5E_NOSPACE, 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/H5HFcache.c b/src/H5HFcache.c index a9a371b..ab44abe 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -595,7 +595,7 @@ H5HF_cache_hdr_serialize(const H5F_t *f, hid_t UNUSED dxpl_id, /* Sanity check */ HDassert((size_t)(p - (const uint8_t *)image) == size); - /* Reset the cache flags for this operation (metadata not resized or renamed) */ + /* Reset the cache flags for this operation (metadata not resized or moved) */ *flags = 0; /* Sanity check */ @@ -991,7 +991,7 @@ H5HF_cache_iblock_serialize(const H5F_t *f, hid_t UNUSED dxpl_id, /* Metadata checksum */ UINT32ENCODE(p, metadata_chksum); - /* Reset the cache flags for this operation (metadata not resized or renamed) */ + /* Reset the cache flags for this operation (metadata not resized or moved) */ *flags = 0; /* Sanity check */ @@ -1512,14 +1512,12 @@ H5HF_cache_dblock_serialize(const H5F_t *f, hid_t dxpl_id, haddr_t addr, H5MM_xfree(write_buf); } /* end if */ else { - /* on disk image has been resized, and possibly renamed -- *flags, - * *new_len, and *new_addr should all be setup by now. - * Thus all we need to do here is the old image, and allocate + /* On disk image has been resized, and possibly moved -- *flags, + * *new_len, and *new_addr should all be set up by now. + * Thus all we need to do here is free the old image, and assign the * space for the new image. */ - HDassert(*flags != 0); HDassert(write_buf != NULL); - HDassert(*new_len = write_size); HDassert(write_buf != dblock->blk); H5MM_xfree(image); diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index 78af693..536df20 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -175,7 +175,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 3189478..073d2a9 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -490,7 +490,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_CANTINIT, 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 71c2573..14a9060 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -1033,7 +1033,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 d496bdb..0ebedc4 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -227,7 +227,7 @@ 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) + 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 37e154d..a0d85da 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 63fb0f4..ddd4382 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -1186,7 +1186,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 bc0f718..14b0fd6 100644 --- a/src/H5Ochunk.c +++ b/src/H5Ochunk.c @@ -114,7 +114,7 @@ H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) chk_proxy->chunkno = idx; /* 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 07a7c9c..e03b221 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -719,7 +719,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 e3b4b40..7106667 100755 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -208,7 +208,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d HGOTO_ERROR(H5E_RESOURCE, 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_CACHE, H5E_CANTINS, FAIL, "can't add SOHM table to cache") /* Record the address of the master table in the file */ @@ -628,7 +628,7 @@ H5SM_create_list(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id) HGOTO_ERROR(H5E_RESOURCE, 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_CACHE, H5E_CANTINS, HADDR_UNDEF, "can't add SOHM list to cache") /* Set return value */ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 1a0b699..59f1a70 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -2286,7 +2286,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 ) || @@ -2296,7 +2296,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); } } @@ -3207,9 +3207,6 @@ setup_cache_for_test(hid_t * fid_ptr, *fid_ptr = fid; *file_ptr_ptr = file_ptr; *cache_ptr_ptr = cache_ptr; -#if 0 /* delete this eventually */ - H5C_set_skip_flags(cache_ptr, TRUE, TRUE); -#endif /* JRM */ H5C_stats__reset(cache_ptr); success = TRUE; } @@ -5137,7 +5134,7 @@ smoke_check_5(void) * functions: * * - H5AC_flush() - * - H5AC_set() + * - H5AC_insert_entry() * - H5AC_mark_entry_dirty() * H5AC_move_entry() * - H5AC_pin_protected_entry() @@ -5180,10 +5177,10 @@ trace_file_check(void) { "### HDF5 metadata cache trace file version 2 ###\n", "H5AC_set_cache_auto_resize_config 1 0 1 0 \"t_cache_trace.txt\" 1 0 1048576 0.500000 16777216 1048576 50000 1 0.900000 2.000000 1 4194304 1 1.000000 0.250000 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 0\n", - "H5AC_set 0x400 2 0x0 2 0\n", - "H5AC_set 0x402 2 0x0 2 0\n", - "H5AC_set 0x404 4 0x0 4 0\n", - "H5AC_set 0x408 6 0x0 6 0\n", + "H5AC_insert_entry 0x400 2 0x0 2 0\n", + "H5AC_insert_entry 0x402 2 0x0 2 0\n", + "H5AC_insert_entry 0x404 4 0x0 4 0\n", + "H5AC_insert_entry 0x408 6 0x0 6 0\n", "H5AC_protect 0x400 2 H5AC_WRITE 2 1\n", "H5AC_mark_entry_dirty 0x400 0\n", "H5AC_unprotect 0x400 16 2 0 0\n", -- cgit v0.12