diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-03-24 03:58:43 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-03-24 03:58:43 (GMT) |
commit | 9333a2e39c9a496f2a21a97d772493932c3f66d4 (patch) | |
tree | 45875ff8c9f35c0020dc5ef5abd6cb8733002d15 /src/H5Ochunk.c | |
parent | 32f21214bb0215e77c4819be9462e254c4532b85 (diff) | |
download | hdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.zip hdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.tar.gz hdf5-9333a2e39c9a496f2a21a97d772493932c3f66d4.tar.bz2 |
[svn-r29548] Minor normalization w/ trunk in preparation for big merge.
Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1
autotools serial
autotools parallel (MPICH 3.1.4)
Diffstat (limited to 'src/H5Ochunk.c')
-rw-r--r-- | src/H5Ochunk.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c index 8abe660..18561b3 100644 --- a/src/H5Ochunk.c +++ b/src/H5Ochunk.c @@ -95,7 +95,7 @@ H5FL_DEFINE(H5O_chunk_proxy_t); herr_t H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) { - H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for chunk, to mark it dirty in the cache */ + H5O_chunk_proxy_t *chk_proxy = NULL; /* Proxy for chunk, to mark it dirty in the cache */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL) @@ -121,6 +121,7 @@ H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) /* Insert the chunk proxy into the cache */ 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; done: @@ -372,6 +373,7 @@ H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) { H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to mark it dirty in the cache */ H5O_chk_cache_ud_t chk_udata; /* User data for loading chunk */ + unsigned cache_flags = H5AC__DELETED_FLAG; /* Flags for unprotecting proxy */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL) @@ -397,8 +399,10 @@ H5O_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) HDassert(chk_proxy->oh == oh); HDassert(chk_proxy->chunkno == idx); + cache_flags |= H5AC__DIRTIED_FLAG | H5AC__FREE_FILE_SPACE_FLAG; + /* Release the chunk proxy from the cache, marking it deleted */ - if(H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, (H5AC__DIRTIED_FLAG | H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG)) < 0) + if(H5AC_unprotect(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, cache_flags) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk") done: |