summaryrefslogtreecommitdiffstats
path: root/src/H5Oint.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-23 13:48:05 (GMT)
committerGitHub <noreply@github.com>2022-03-23 13:48:05 (GMT)
commitfbb532cd633e216f47ce846493b38af02cfbb43a (patch)
tree1ef7bc9f25ec0832f8b25bb8ea4be34d53bd144d /src/H5Oint.c
parent78375882485a99a81caa933928ed08d7a38ef88b (diff)
downloadhdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.zip
hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.tar.gz
hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.tar.bz2
VFD SWMR: Normalization with develop (#1506)
* Brought over plugin and test script changes * Removes remaining register keywords (#1481) * Fixed warnings in the aux process code * Minor fixes from develop * Minor changes from develop, fixed format warnings * Formatted source * Added HD prefix to timespec_get * Cleanup in new files * Removes the MANIFEST file and unused release files (#1497) * Removes the MANIFEST file and unused release files * Updated tar command * checkposix corrections * More checkposix fixes * Ripped out unused instrumentation functionality * Brought over cache tagging changes from develop * Changes to tagged metadata expulsion iteration * Fixed typo * Brought over H5O__free() changes from develop * Brings (unused) parallel page buffer test in line with develop * Moved the functionality in supervise.subr to test_vfd_swmr.sh * Tools VFD parameter updates * Committing clang-format changes * H5F VFD SWMR refactoring * Committing clang-format changes * Misc changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Oint.c')
-rw-r--r--src/H5Oint.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/H5Oint.c b/src/H5Oint.c
index ee79b0c..2348790 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -289,7 +289,7 @@ H5O_create(H5F_t *f, size_t size_hint, size_t initial_rc, hid_t ocpl_id, H5O_loc
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "Can't apply object header to file")
done:
- if ((FAIL == ret_value) && (NULL != oh) && (H5O__free(oh) < 0))
+ if ((FAIL == ret_value) && (NULL != oh) && (H5O__free(oh, TRUE) < 0))
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "can't delete object header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -353,7 +353,7 @@ H5O_create_ohdr(H5F_t *f, hid_t ocpl_id)
ret_value = oh;
done:
- if ((NULL == ret_value) && (NULL != oh) && (H5O__free(oh) < 0))
+ if ((NULL == ret_value) && (NULL != oh) && (H5O__free(oh, TRUE) < 0))
HDONE_ERROR(H5E_OHDR, H5E_CANTFREE, NULL, "can't delete object header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -3014,7 +3014,7 @@ H5O_get_proxy(const H5O_t *oh)
*-------------------------------------------------------------------------
*/
herr_t
-H5O__free(H5O_t *oh)
+H5O__free(H5O_t *oh, hbool_t force)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3038,10 +3038,12 @@ H5O__free(H5O_t *oh)
for (u = 0; u < oh->nmesgs; u++) {
#ifndef NDEBUG
/* Verify that message is clean, unless it could have been marked
- * dirty by decoding */
+ * dirty by decoding, or if this is a forced free (in case of
+ * failure during creation of the object some messages may be dirty)
+ */
if (oh->ndecode_dirtied && oh->mesg[u].dirty)
oh->ndecode_dirtied--;
- else
+ else if (!force)
HDassert(oh->mesg[u].dirty == 0);
#endif /* NDEBUG */