diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-06-04 19:13:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-06-04 19:13:49 (GMT) |
commit | cef36b8e7bc68b040ece7d4f43330c2979d4216a (patch) | |
tree | 7a6283d5f8d3b350def097c7d79b25b1c68e859e | |
parent | cdc17466372df564ed2b9d603b278803000c027c (diff) | |
download | hdf5-cef36b8e7bc68b040ece7d4f43330c2979d4216a.zip hdf5-cef36b8e7bc68b040ece7d4f43330c2979d4216a.tar.gz hdf5-cef36b8e7bc68b040ece7d4f43330c2979d4216a.tar.bz2 |
[svn-r17006] Description:
Bring r17005 from revise_chunks branch to trunk:
Correct error in unpinning an entry from outside the cache to correctly
unpin the entry only when it is not being used for a flush dependency relation.
Tested on:
FreeBSD/32 6.3 (duty)
h5committested on branch
-rw-r--r-- | src/H5C.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -2048,6 +2048,7 @@ if ( (cache_ptr)->index_size != \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ + HDassert( (cache_ptr)->pel_len >= 0 ); \ \ } else { \ \ @@ -2110,6 +2111,7 @@ if ( (cache_ptr)->index_size != \ (cache_ptr)->pel_tail_ptr, \ (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ + HDassert( (cache_ptr)->pel_len >= 0 ); \ \ } else { \ \ @@ -2475,6 +2477,7 @@ if ( (cache_ptr)->index_size != \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ + HDassert( (cache_ptr)->pel_len >= 0 ); \ \ /* modified LRU specific code */ \ \ @@ -2527,6 +2530,7 @@ if ( (cache_ptr)->index_size != \ H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \ (cache_ptr)->pel_tail_ptr, (cache_ptr)->pel_len, \ (cache_ptr)->pel_size, (fail_val)) \ + HDassert( (cache_ptr)->pel_len >= 0 ); \ \ /* modified LRU specific code */ \ \ @@ -7778,12 +7782,12 @@ H5C_unpin_entry_from_client(H5C_t * cache_ptr, if(!entry_ptr->pinned_from_client) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Entry wasn't pinned by cache client") - /* If requested, update the replacement policy if the entry is not protected */ - if(update_rp && !entry_ptr->is_protected) - H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, FAIL) - /* Check if the entry is not pinned from a flush dependency */ if(!entry_ptr->pinned_from_cache) { + /* If requested, update the replacement policy if the entry is not protected */ + if(update_rp && !entry_ptr->is_protected) + H5C__UPDATE_RP_FOR_UNPIN(cache_ptr, entry_ptr, FAIL) + /* Unpin the entry now */ entry_ptr->is_pinned = FALSE; |