summaryrefslogtreecommitdiffstats
path: root/src/H5HFstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5HFstat.c')
-rw-r--r--src/H5HFstat.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index 93e8036..693a6fa 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -83,35 +83,22 @@
*-------------------------------------------------------------------------
*/
herr_t
-H5HF_stat_info(H5F_t *f, hid_t dxpl_id, haddr_t fh_addr, H5HF_stat_t *stats)
+H5HF_stat_info(H5HF_t *fh, H5HF_stat_t *stats)
{
- H5HF_t *hdr = NULL; /* Pointer to the fractal heap header */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI_NOINIT(H5HF_stat_info)
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5HF_stat_info)
/* Check arguments. */
- HDassert(f);
- HDassert(H5F_addr_defined(fh_addr));
+ HDassert(fh);
HDassert(stats);
- /* Look up the fractal heap header */
- if(NULL == (hdr = H5AC_protect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, NULL, NULL, H5AC_READ)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to load fractal heap header")
-
/* Report statistics for fractal heap */
- stats->total_size = hdr->total_size;
- stats->man_size = hdr->man_size;
- stats->std_size = hdr->std_size;
- stats->man_free_space = hdr->total_man_free;
- stats->nobjs = hdr->nobjs;
+ stats->total_size = fh->hdr->total_size;
+ stats->man_size = fh->hdr->man_size;
+ stats->std_size = fh->hdr->std_size;
+ stats->man_free_space = fh->hdr->total_man_free;
+ stats->nobjs = fh->hdr->nobjs;
/* XXX: Add more metadata statistics for the heap */
-done:
- /* Release fractal heap header node */
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, fh_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
- HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap header info")
-
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_stat_info() */