diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-05-29 10:57:47 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-05-29 10:57:47 (GMT) |
commit | bf566b775bbef681e9135c38dbf414df2162cdcc (patch) | |
tree | 8d353ae50560cdf28fcbb313b92c7462e4cc7f6a /src/H5C.c | |
parent | 29a5f1061994a9d40a96726df6141f6e127c4b7b (diff) | |
download | hdf5-bf566b775bbef681e9135c38dbf414df2162cdcc.zip hdf5-bf566b775bbef681e9135c38dbf414df2162cdcc.tar.gz hdf5-bf566b775bbef681e9135c38dbf414df2162cdcc.tar.bz2 |
[svn-r29969] Description:
Bring r29934 from revise_chunks branch to trunk:
(1) Fix for HDFFV-9434: throw an error instead of assertion when v1 btree level hits the 1 byte limit.
(2) Modifications to better handle error recovery when conversion by h5format_convert fails.
Tested on:
MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
(h5committest forthcoming)
Diffstat (limited to 'src/H5C.c')
-rw-r--r-- | src/H5C.c | 53 |
1 files changed, 53 insertions, 0 deletions
@@ -9902,6 +9902,59 @@ H5C_retag_entries(H5C_t * cache_ptr, haddr_t src_tag, haddr_t dest_tag) /*------------------------------------------------------------------------- + * + * Function: H5C_expunge_tag_type_metadata + * + * Purpose: Search and expunge from the cache entries associated + * with 'tag' and type id. + * + * Return: FAIL if error is detected, SUCCEED otherwise. + * + * Programmer: Vailin Choi; May 2016 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_expunge_tag_type_metadata(H5F_t *f, hid_t dxpl_id, haddr_t tag, int type_id, unsigned flags) +{ + unsigned u; /* Local index variable */ + H5C_t *cache_ptr = NULL; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Sanity check */ + HDassert(f); + HDassert(f->shared); + HDassert(f->shared->cache); + HDassert(f->shared->cache->magic == H5C__H5C_T_MAGIC); + + /* Get cache pointer */ + cache_ptr = f->shared->cache; + + /* Iterate through hash table entries, expunge those with specified tag and type id */ + for(u = 0; u < H5C__HASH_TABLE_LEN; u++) { + H5C_cache_entry_t *entry_ptr; /* Entry pointer */ + + entry_ptr = cache_ptr->index[u]; + while(entry_ptr != NULL) { + /* Found one with the same tag and type id */ + if(entry_ptr->tag == tag && entry_ptr->type->id == type_id) { + + if(H5C_expunge_entry(f, dxpl_id, entry_ptr->type, entry_ptr->addr, flags) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "H5C_expunge_entry() failed.") + } /* end if */ + + entry_ptr = entry_ptr->ht_next; + } /* end while */ + } /* end for */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_expunge_tag_type_metadata */ + + +/*------------------------------------------------------------------------- * Function: H5C_get_entry_ring * * Purpose: Given a file address, retrieve the ring for an entry at that |