diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-12-10 14:09:40 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-12-10 14:09:40 (GMT) |
commit | cc6eb939f4dec06e234835acbb5b3bc269b228c5 (patch) | |
tree | c4a9f78fd8217d14e55030350ad1985c1f969ef7 /src | |
parent | 122819fec3af15e67421872cd5e11415d6653ab9 (diff) | |
parent | 02879bc4b2ba161dc259bf28a71e7a99b44be0e3 (diff) | |
download | hdf5-cc6eb939f4dec06e234835acbb5b3bc269b228c5.zip hdf5-cc6eb939f4dec06e234835acbb5b3bc269b228c5.tar.gz hdf5-cc6eb939f4dec06e234835acbb5b3bc269b228c5.tar.bz2 |
Merge pull request #191 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:eoc_h5fs_fix to develop
Final fix for evict-on-close issues with new-style groups.
* commit '02879bc4b2ba161dc259bf28a71e7a99b44be0e3':
Updated the H5FS cache code to grab the correct tag and modified the freespace test to use dxpls that have been tagged with the H5AC__FREESPACE_TAG global tag instead of H5AC_ind_read_dxpl_id. The library code now expects the owner of the free space manager to tag it so the owner-less free space managers in the freespace tag had to be tagged with *something* to avoid cache errors.
Changed the name of H5MF_alloc_close() to H5MF__alloc_close() to make the FUNC_ENTER macro happy.
Reverted the freespace test. The TAG macros in H5MF_get_freespace() make the changes unnecessary.
Added missing TAG macros to H5MF_get_freespace().
Updated the freespace test so functions take a common, tagged dxpl so the test will work with the new H5FS tag changes.
Updated the cache_tagging test so it correctly analyzes the new fractal heap free space manager behavior.
Added TAG macros to the H5MF package code so H5AC__FREESPACE_TAG gets set on the dxpl correctly. Also restored the TAG macro to H5FS__cache_hdr_pre_serialize() since otherwise the tag won't be initialized.
First cut at fixing the tagging issue with the free space managers. * Converted the tag macros to regular ones so the parent's tag is used via the dxpl.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5AC.c | 34 | ||||
-rw-r--r-- | src/H5ACprivate.h | 1 | ||||
-rw-r--r-- | src/H5Cprivate.h | 1 | ||||
-rw-r--r-- | src/H5Ctag.c | 42 | ||||
-rw-r--r-- | src/H5FS.c | 29 | ||||
-rw-r--r-- | src/H5FScache.c | 33 | ||||
-rw-r--r-- | src/H5FSsection.c | 4 | ||||
-rw-r--r-- | src/H5MF.c | 56 | ||||
-rw-r--r-- | src/H5MFdbg.c | 8 |
9 files changed, 139 insertions, 69 deletions
@@ -2557,6 +2557,40 @@ done: } /* H5AC_expunge_tag_type_metadata*/ +/*------------------------------------------------------------------------------ + * Function: H5AC_get_tag() + * + * Purpose: Get the tag for a metadata cache entry. + * + * Return: SUCCEED/FAIL + * + * Programmer: Dana Robinson + * Fall 2016 + * + *------------------------------------------------------------------------------ + */ +herr_t +H5AC_get_tag(const void *thing, haddr_t *tag) +{ + /* Variable Declarations */ + herr_t ret_value = SUCCEED; + + /* Function Enter Macro */ + FUNC_ENTER_NOAPI(FAIL) + + /* Assertions */ + HDassert(thing); + HDassert(tag); + + /* Call cache level function to get the tag */ + if(H5C_get_tag(thing, tag) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "Cannot get tag for metadata cache entry") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5AC_get_tag() */ + + /*------------------------------------------------------------------------- * Function: H5AC_cork * diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 76013a3..bbaa614 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -403,6 +403,7 @@ H5_DLL herr_t H5AC_set_ring(hid_t dxpl_id, H5AC_ring_t ring, H5P_genplist_t **dx H5AC_ring_t *orig_ring); H5_DLL herr_t H5AC_reset_ring(H5P_genplist_t *dxpl, H5AC_ring_t orig_ring); H5_DLL herr_t H5AC_expunge_tag_type_metadata(H5F_t *f, hid_t dxpl_id, haddr_t tag, int type_id, unsigned flags); +H5_DLL herr_t H5AC_get_tag(const void *thing, /*OUT*/ haddr_t *tag); /* Virtual entry routines */ H5_DLL H5AC_proxy_entry_t *H5AC_proxy_entry_create(void); diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index baa80a2..ed75bec 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -1726,6 +1726,7 @@ H5_DLL herr_t H5C_flush_cache(H5F_t *f, hid_t dxpl_id, unsigned flags); H5_DLL herr_t H5C_flush_tagged_entries(H5F_t * f, hid_t dxpl_id, haddr_t tag); H5_DLL herr_t H5C_evict_tagged_entries(H5F_t * f, hid_t dxpl_id, haddr_t tag, hbool_t match_global); H5_DLL herr_t H5C_expunge_tag_type_metadata(H5F_t *f, hid_t dxpl_id, haddr_t tag, int type_id, unsigned flags); +H5_DLL herr_t H5C_get_tag(const void *thing, /*OUT*/ haddr_t *tag); #if H5C_DO_TAGGING_SANITY_CHECKS herr_t H5C_verify_tag(int id, haddr_t tag); #endif diff --git a/src/H5Ctag.c b/src/H5Ctag.c index 6b47cc7..157a838 100644 --- a/src/H5Ctag.c +++ b/src/H5Ctag.c @@ -647,20 +647,13 @@ H5C_verify_tag(int id, haddr_t tag) } /* end else */ /* Free Space Manager */ - if((id == H5AC_FSPACE_HDR_ID) || (id == H5AC_FSPACE_SINFO_ID)) { - if(tag != H5AC__FREESPACE_TAG) - HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "freespace entry not tagged with H5AC__FREESPACE_TAG") - } /* end if */ - else { - if(tag == H5AC__FREESPACE_TAG) + if(tag == H5AC__FREESPACE_TAG && ((id != H5AC_FSPACE_HDR_ID) && (id != H5AC_FSPACE_SINFO_ID))) HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "H5AC__FREESPACE_TAG applied to non-freespace entry") - } /* end else */ /* SOHM */ - if((id == H5AC_SOHM_TABLE_ID) || (id == H5AC_SOHM_LIST_ID)) { + if((id == H5AC_SOHM_TABLE_ID) || (id == H5AC_SOHM_LIST_ID)) if(tag != H5AC__SOHM_TAG) HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "sohm entry not tagged with H5AC__SOHM_TAG") - } /* end if */ /* Global Heap */ if(id == H5AC_GHEAP_ID) { @@ -846,3 +839,34 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C_expunge_tag_type_metadata() */ + +/*------------------------------------------------------------------------- + * + * Function: H5C_get_tag() + * + * Purpose: Get the tag for a metadata cache entry. + * + * Return: SUCCEED (can't fail) + * + * Programmer: Dana Robinson + * Fall 2016 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_get_tag(const void *thing, haddr_t *tag /*OUT*/) +{ + const H5C_cache_entry_t *entry = (const H5C_cache_entry_t *)thing; /* Pointer to cache entry */ + + FUNC_ENTER_NOAPI_NOERR + + HDassert(entry); + HDassert(entry->tag_info); + HDassert(tag); + + /* Return the tag */ + *tag = entry->tag_info->tag; + + FUNC_LEAVE_NOAPI(SUCCEED) +} /* H5C_get_tag() */ + @@ -109,7 +109,7 @@ H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr, const H5FS_create_t *fs_c H5FS_t *fspace = NULL; /* New free space structure */ H5FS_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, NULL) + FUNC_ENTER_NOAPI(NULL) #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, nclasses); #endif /* H5FS_DEBUG */ @@ -168,7 +168,7 @@ done: #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value); #endif /* H5FS_DEBUG */ - FUNC_LEAVE_NOAPI_TAG(ret_value, NULL) + FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_create() */ @@ -193,7 +193,7 @@ H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, uint16_t nclasses, H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */ H5FS_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, NULL) + FUNC_ENTER_NOAPI(NULL) #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\n", FUNC, fs_addr, nclasses); #endif /* H5FS_DEBUG */ @@ -237,7 +237,7 @@ HDfprintf(stderr, "%s: fspace->rc = %u\n", FUNC, fspace->rc); ret_value = fspace; done: - FUNC_LEAVE_NOAPI_TAG(ret_value, NULL) + FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_open() */ @@ -260,7 +260,7 @@ H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr) H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) + FUNC_ENTER_NOAPI(FAIL) #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_addr); #endif /* H5FS_DEBUG */ @@ -387,7 +387,7 @@ done: if(fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0) HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space header") - FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) + FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_delete() */ @@ -409,7 +409,7 @@ H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) + FUNC_ENTER_NOAPI(FAIL) /* Check arguments. */ HDassert(f); @@ -570,7 +570,7 @@ done: #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_value, fspace->rc); #endif /* H5FS_DEBUG */ - FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) + FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_close() */ @@ -825,7 +825,7 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr, hid_t dxpl_id) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) + FUNC_ENTER_NOAPI(FAIL) /* Check arguments. */ HDassert(f); @@ -845,7 +845,7 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr, hid_t dxpl_id) *fs_addr = fspace->addr; done: - FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) + FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_alloc_hdr() */ @@ -866,7 +866,7 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) + FUNC_ENTER_NOAPI(FAIL) /* Check arguments. */ HDassert(f); @@ -892,7 +892,7 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) } /* end if */ done: - FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) + FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_alloc_sect() */ @@ -915,7 +915,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) unsigned cache_flags; /* Flags for unprotecting cache entries */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) + FUNC_ENTER_NOAPI(FAIL) /* Check arguments. */ HDassert(f); @@ -1001,7 +1001,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) } /* end if */ done: - FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) + FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_free() */ @@ -1213,3 +1213,4 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS_assert", fspace->t FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5FS_assert() */ #endif /* H5FS_DEBUG_ASSERT */ + diff --git a/src/H5FScache.c b/src/H5FScache.c index f43676d..42eccff 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -413,7 +413,7 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) + FUNC_ENTER_STATIC /* Sanity check */ HDassert(f); @@ -439,7 +439,7 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, /* This implies that the header "owns" the section info. * * Unfortunately, the comments in the code are not clear as to - * what this means, but from reviewing the code (most particularly + * what this means, but from reviewing the code (most particularly * H5FS_close(), H5FS_sinfo_lock, and H5FS_sinfo_unlock()), I * gather that it means that the header is maintaining a pointer to * an instance of H5FS_sinfo_t in which free space data is @@ -483,7 +483,7 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, * disk if it doesn't exist. Similarly, since the section info * will not be stored to disk unless the header is, * H5F_addr_defined(fspace->addr) must hold as well. - * + * * As the objective is to touch up the free space manager header * so that it contains sensical data on the size and location of * the section information, we have to handle each of the above @@ -497,8 +497,8 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, * Otherwise, allocate space for the section info in real * file space, insert the section info at this location, and * set fspace->sect_addr, fspace->sect_size, and - * fspace->alloc_sect_size to reflect the new location - * of the section info. Note that it is not necessary to + * fspace->alloc_sect_size to reflect the new location + * of the section info. Note that it is not necessary to * force a write of the section info. * * Case 2) Allocate space for the section info in real file space, @@ -515,19 +515,28 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, * serialize the header if it thought it was clean. */ if(fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) { - /* Sanity check */ + /* Sanity check */ HDassert(fspace->sect_size > 0); if(!H5F_addr_defined(fspace->sect_addr)) { /* case 1 */ - /* allocate file space for the section info, and insert it + + haddr_t tag = HADDR_UNDEF; + + /* allocate file space for the section info, and insert it * into the metadata cache. */ if(HADDR_UNDEF == (fspace->sect_addr = H5MF_alloc((H5F_t *)f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size))) HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for free space sections") fspace->alloc_sect_size = (size_t)fspace->sect_size; - if(H5AC_insert_entry((H5F_t *)f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) - HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache") + + /* Get the tag for this free space manager and use it to insert the entry */ + if(H5AC_get_tag((const void *)fspace, &tag) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_CANTTAG, FAIL, "can't get tag for metadata cache object") + H5_BEGIN_TAG(dxpl_id, tag, FAIL) + if(H5AC_insert_entry((H5F_t *)f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) + HGOTO_ERROR_TAG(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache") + H5_END_TAG(FAIL) HDassert(fspace->sinfo->cache_info.size == fspace->alloc_sect_size); @@ -539,7 +548,7 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, else if(H5F_IS_TMP_ADDR(f, fspace->sect_addr)) { /* case 2 */ haddr_t new_sect_addr; - /* move the section info from temporary (AKA imaginary) file + /* move the section info from temporary (AKA imaginary) file * space to real file space. */ @@ -595,7 +604,7 @@ H5FS__cache_hdr_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, unsigned sect_status = 0; haddr_t new_sect_addr; - /* we have work to do -- must relocate section info into + /* we have work to do -- must relocate section info into * real file space. * * Since the section info address is in temporary space (AKA @@ -645,7 +654,7 @@ done: if(H5AC_reset_ring(dxpl, orig_ring) < 0) HDONE_ERROR(H5E_FSPACE, H5E_CANTSET, FAIL, "unable to set property value") - FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5FS__cache_hdr_pre_serialize() */ diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 4697bd50..766a823 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -208,7 +208,7 @@ H5FS_sinfo_lock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, unsigned accmode) H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) + FUNC_ENTER_NOAPI_NOINIT #ifdef H5FS_SINFO_DEBUG HDfprintf(stderr, "%s: Called, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC, fspace->addr, fspace->sinfo, fspace->sect_addr); @@ -298,7 +298,7 @@ done: HDfprintf(stderr, "%s: Leaving, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC, fspace->addr, fspace->sinfo, fspace->sect_addr); HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC, fspace->alloc_sect_size, fspace->sect_size); #endif /* H5FS_SINFO_DEBUG */ - FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) + FUNC_LEAVE_NOAPI(ret_value) } /* H5FS_sinfo_lock() */ @@ -85,7 +85,7 @@ typedef struct { /* Allocator routines */ static herr_t H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type); -static herr_t H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type); +static herr_t H5MF__alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type); static herr_t H5MF__close_delete(H5F_t *f, hid_t dxpl_id); @@ -245,7 +245,7 @@ H5MF_alloc_open(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type) H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) /* * Check arguments. @@ -274,7 +274,7 @@ done: if(H5AC_reset_ring(dxpl, orig_ring) < 0) HDONE_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to set property value") - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5MF_alloc_open() */ @@ -301,7 +301,7 @@ H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type) herr_t ret_value = SUCCEED; /* Return value */ H5FS_create_t fs_create; /* Free space creation parameters */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) /* * Check arguments. @@ -329,7 +329,7 @@ H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type) f->shared->fs_state[type] = H5F_FS_STATE_OPEN; done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5MF_alloc_create() */ @@ -379,7 +379,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5MF_alloc_close + * Function: H5MF__alloc_close * * Purpose: Close an existing free space manager of TYPE for file * @@ -391,11 +391,11 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type) +H5MF__alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) /* * Check arguments. @@ -413,8 +413,8 @@ H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type) f->shared->fs_state[type] = H5F_FS_STATE_CLOSED; done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5MF_alloc_close() */ + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) +} /* end H5MF__alloc_close() */ /*------------------------------------------------------------------------- @@ -442,7 +442,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, hsize_t size) H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */ haddr_t ret_value = HADDR_UNDEF; /* Return value */ - FUNC_ENTER_NOAPI(HADDR_UNDEF) + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, HADDR_UNDEF) #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size); #endif /* H5MF_ALLOC_DEBUG */ @@ -543,7 +543,7 @@ HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value, H5MF_sects_dump(f, dxpl_id, stderr); #endif /* H5MF_ALLOC_DEBUG_DUMP */ - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, HADDR_UNDEF) } /* end H5MF_alloc() */ @@ -633,7 +633,7 @@ H5MF_xfree(const H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr, H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type, addr, size); #endif /* H5MF_ALLOC_DEBUG */ @@ -774,7 +774,7 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value); #ifdef H5MF_ALLOC_DEBUG_DUMP H5MF_sects_dump(f, dxpl_id, stderr); #endif /* H5MF_ALLOC_DEBUG_DUMP */ - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5MF_xfree() */ @@ -802,7 +802,7 @@ H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t alloc_type, haddr_t addr, H5FD_mem_t map_type; /* Mapped type */ htri_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_requested = %Hu\n", FUNC, (unsigned)alloc_type, addr, size, extra_requested); #endif /* H5MF_ALLOC_DEBUG */ @@ -861,7 +861,7 @@ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value); H5MF_sects_dump(f, dxpl_id, stderr); #endif /* H5MF_ALLOC_DEBUG_DUMP */ - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5MF_try_extend() */ @@ -900,7 +900,7 @@ H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_si hbool_t eoa_shrank; /* Whether an EOA shrink occurs */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) /* check args */ HDassert(f); @@ -991,7 +991,7 @@ H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_si /* Close the free-space managers if they were opened earlier in this routine */ for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) { if(fs_started[type]) - if(H5MF_alloc_close(f, dxpl_id, type) < 0) + if(H5MF__alloc_close(f, dxpl_id, type) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't close file free space") } /* end for */ @@ -1007,7 +1007,7 @@ done: if(H5AC_reset_ring(dxpl, orig_ring) < 0) HDONE_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to set property value") - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5MF_get_freespace() */ @@ -1108,7 +1108,7 @@ H5MF_close_shrink_eoa(H5F_t *f, hid_t dxpl_id) H5MF_sect_ud_t udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) /* check args */ HDassert(f); @@ -1143,7 +1143,7 @@ H5MF_close_shrink_eoa(H5F_t *f, hid_t dxpl_id) } while(eoa_shrank); done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5MF_close_shrink_eoa() */ @@ -1166,7 +1166,7 @@ H5MF__close_delete(H5F_t *f, hid_t dxpl_id) H5FD_mem_t type; /* Memory type for iteration */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC + FUNC_ENTER_STATIC_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Entering\n", FUNC); #endif /* H5MF_ALLOC_DEBUG */ @@ -1229,7 +1229,7 @@ done: #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Leaving\n", FUNC); #endif /* H5MF_ALLOC_DEBUG */ - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* H5MF__close_delete() */ @@ -1308,7 +1308,7 @@ H5MF_close(H5F_t *f, hid_t dxpl_id) H5FD_mem_t type; /* Memory type for iteration */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Entering\n", FUNC); #endif /* H5MF_ALLOC_DEBUG */ @@ -1446,7 +1446,7 @@ done: #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Leaving\n", FUNC); #endif /* H5MF_ALLOC_DEBUG */ - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5MF_close() */ @@ -1506,7 +1506,7 @@ H5MF_get_free_sections(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, size_t nsects, H5FD_mem_t ty; /* Memory type for iteration */ ssize_t ret_value = -1; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) /* check args */ HDassert(f); @@ -1567,7 +1567,7 @@ H5MF_get_free_sections(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, size_t nsects, /* Close the free space manager of this type, if we started it here */ if(fs_started) - if(H5MF_alloc_close(f, dxpl_id, ty) < 0) + if(H5MF__alloc_close(f, dxpl_id, ty) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCLOSEOBJ, FAIL, "can't close file free space") } /* end for */ @@ -1579,6 +1579,6 @@ done: if(H5AC_reset_ring(dxpl, orig_ring) < 0) HDONE_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to set property value") - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* H5MF_get_free_sections() */ diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c index 59da9e8..6d5d994 100644 --- a/src/H5MFdbg.c +++ b/src/H5MFdbg.c @@ -158,7 +158,7 @@ H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int ind herr_t ret_value = SUCCEED; /* Return value */ H5FD_mem_t type; /* Memory type for iteration */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) /* * Check arguments. @@ -195,7 +195,7 @@ H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int ind } done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* H5MF_sects_debug() */ #ifdef H5MF_ALLOC_DEBUG_DUMP @@ -226,7 +226,7 @@ H5MF_sects_dump(H5F_t *f, hid_t dxpl_id, FILE *stream) int fwidth = 50; /* Field width */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL) #ifdef H5MF_ALLOC_DEBUG HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC); #endif /* H5MF_ALLOC_DEBUG */ @@ -300,7 +300,7 @@ HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC, done: HDfprintf(stderr, "%s: Done dumping file free space sections\n", FUNC); - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5MF_sects_dump() */ #endif /* H5MF_ALLOC_DEBUG_DUMP */ |