diff options
author | Quincey Koziol <koziol@lbl.gov> | 2016-11-18 03:03:43 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@lbl.gov> | 2016-11-18 03:03:43 (GMT) |
commit | f6ad126673553838df0dec514c5d2c1b4b70df1a (patch) | |
tree | 53142d64c8e678f0862533b17790bb4ea72fa87c /src/H5C.c | |
parent | 248a93cde8d87dd3a8162831103b5358a166fed8 (diff) | |
parent | eba0ff43c968ef9a0b09edf19c1e337cfcae0816 (diff) | |
download | hdf5-f6ad126673553838df0dec514c5d2c1b4b70df1a.zip hdf5-f6ad126673553838df0dec514c5d2c1b4b70df1a.tar.gz hdf5-f6ad126673553838df0dec514c5d2c1b4b70df1a.tar.bz2 |
Merge pull request #163 in HDFFV/hdf5 from ~KOZIOL/hdf5:develop_merge_revise_chunks_08 to develop
* commit 'eba0ff43c968ef9a0b09edf19c1e337cfcae0816':
Remove 'clear' callback from metadata cache client interface, using the new 'entry cleaned' notify action innstead.
Diffstat (limited to 'src/H5C.c')
-rw-r--r-- | src/H5C.c | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -776,8 +776,7 @@ H5C_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, #if H5C_DO_EXTREME_SANITY_CHECKS if(H5C_validate_lru_list(cache_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ - "LRU extreme sanity check failed on entry.\n"); + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU extreme sanity check failed on entry.\n"); #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ /* Look for entry in cache */ @@ -806,7 +805,7 @@ H5C_expunge_entry(H5F_t *f, hid_t dxpl_id, const H5C_class_t *type, * This will clear the entry, and then delete it from the cache. */ - /* Pass along 'free file space' flag to cache client. */ + /* Pass along 'free file space' flag */ flush_flags |= (flags & H5C__FREE_FILE_SPACE_FLAG); /* Delete the entry from the skip list on destroy */ @@ -5960,7 +5959,7 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_ /* verify that the entry is no longer part of any flush dependencies */ HDassert(entry_ptr->flush_dep_nparents == 0); HDassert(entry_ptr->flush_dep_nchildren == 0); - } + } /* end if */ else { HDassert(clear_only || write_entry); HDassert(entry_ptr->is_dirty); @@ -5987,9 +5986,6 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_ H5C__UPDATE_INDEX_FOR_ENTRY_CLEAN(cache_ptr, entry_ptr); - if(entry_ptr->type->clear && (entry_ptr->type->clear)(f, (void *)entry_ptr, FALSE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to clear entry") - /* Check for entry changing status and do notifications, etc. */ if(was_dirty) { /* If the entry's type has a 'notify' callback send a 'entry cleaned' @@ -6088,19 +6084,10 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_ /* Check for actually destroying the entry in memory */ /* (As opposed to taking ownership of it) */ if(destroy_entry) { - /* if the entry is dirty and it has a clear callback, - * call this callback now. Since this callback exists, - * it follows tht the client maintains its own dirty bits, - * which must be cleared before the entry is freed to avoid - * sanity check failures. Also clear the dirty flag for - * the same reason. - */ if(entry_ptr->is_dirty) { + /* Reset dirty flag */ entry_ptr->is_dirty = FALSE; - if(entry_ptr->type->clear && (entry_ptr->type->clear)(f, (void *)entry_ptr, TRUE) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to clear entry") - /* If the entry's type has a 'notify' callback send a 'entry cleaned' * notice now that the entry is fully integrated into the cache. */ |