summaryrefslogtreecommitdiffstats
path: root/src/H5MF.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-10-06 05:37:12 (GMT)
committerGitHub <noreply@github.com>2021-10-06 05:37:12 (GMT)
commita45b73e4275b26505d8b659d1d807a654bb60df7 (patch)
tree721928d7f14575113d5a0b27aac21cb548c25b37 /src/H5MF.c
parent5592111747b1e6ea1e934a3c13d3395312215c31 (diff)
downloadhdf5-a45b73e4275b26505d8b659d1d807a654bb60df7.zip
hdf5-a45b73e4275b26505d8b659d1d807a654bb60df7.tar.gz
hdf5-a45b73e4275b26505d8b659d1d807a654bb60df7.tar.bz2
VFD SWMR: Normalization with develop (#1078)
Brings many changes from develop, particularly VOL changes for async
Diffstat (limited to 'src/H5MF.c')
-rw-r--r--src/H5MF.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/H5MF.c b/src/H5MF.c
index fd38495..ca780c3 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -2463,15 +2463,15 @@ done:
* Purpose: To retrieve free-space section information for
* paged or non-paged aggregation
*
- * Return: Success: Number of free sections
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
* Programmer: Vailin Choi; Dec 2012
*
*-------------------------------------------------------------------------
*/
-ssize_t
-H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t *sect_info)
+herr_t
+H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t *sect_info,
+ size_t *sect_count)
{
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5AC_ring_t curr_ring = H5AC_RING_INV; /* Current ring value */
@@ -2480,9 +2480,9 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
H5MF_sect_iter_ud_t sect_udata; /* User data for callback */
H5F_mem_page_t start_type, end_type; /* Memory types to iterate over */
H5F_mem_page_t ty; /* Memory type for iteration */
- ssize_t ret_value = -1; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, (-1))
+ FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/* check args */
HDassert(f);
@@ -2544,7 +2544,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
if (!f->shared->fs_man[ty] && H5F_addr_defined(f->shared->fs_addr[ty])) {
if (H5MF__open_fstype(f, ty) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, (-1), "can't open the free space manager")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't open the free space manager")
HDassert(f->shared->fs_man[ty]);
fs_started = TRUE;
} /* end if */
@@ -2552,7 +2552,7 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
/* Check if there's free space sections of this type */
if (f->shared->fs_man[ty])
if (H5MF__get_free_sects(f, f->shared->fs_man[ty], &sect_udata, &nums) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, (-1),
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL,
"can't get section info for the free space manager")
/* Increment total # of sections */
@@ -2561,13 +2561,13 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t
/* Close the free space manager of this type, if we started it here */
if (fs_started)
if (H5MF__close_fstype(f, ty) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCLOSEOBJ, (-1), "can't close file free space")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCLOSEOBJ, FAIL, "can't close file free space")
if ((H5F_PAGED_AGGR(f)) && (type != H5FD_MEM_DEFAULT))
ty = (H5F_mem_page_t)(ty + H5FD_MEM_NTYPES - 2);
} /* end for */
- /* Set return value */
- ret_value = (ssize_t)total_sects;
+ /* Set value to return */
+ *sect_count = total_sects;
done:
/* Reset the ring in the API context */