diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-06-13 17:49:39 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-06-13 17:49:39 (GMT) |
commit | 7a9e13afdb134bafc070cf8bd2087a84fd0d2334 (patch) | |
tree | c16578adf13fb9312870afff86332ad190add859 /src/H5T.c | |
parent | 1db1d99883397d92dc6984841fecfc391c52676d (diff) | |
download | hdf5-7a9e13afdb134bafc070cf8bd2087a84fd0d2334.zip hdf5-7a9e13afdb134bafc070cf8bd2087a84fd0d2334.tar.gz hdf5-7a9e13afdb134bafc070cf8bd2087a84fd0d2334.tar.bz2 |
[svn-r30068] Description:
Bring metadata cache corking to trunk.
Tested on:
MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
(h5committest forthcoming)
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3612,6 +3612,17 @@ H5T_close(H5T_t *dt) dt->shared->fo_count--; if(dt->shared->state != H5T_STATE_OPEN || dt->shared->fo_count == 0) { + /* Uncork cache entries with object address tag for named datatype only */ + if(dt->shared->state == H5T_STATE_OPEN && dt->shared->fo_count == 0) { + hbool_t corked; /* Whether the named datatype is corked or not */ + + if(H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__GET_CORKED, &corked) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status") + if(corked) + if(H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__UNCORK, NULL) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTUNCORK, FAIL, "unable to uncork an object") + } /* end if */ + if(H5T__free(dt) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype"); |