diff options
Diffstat (limited to 'src/H5B2stat.c')
-rw-r--r-- | src/H5B2stat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5B2stat.c b/src/H5B2stat.c index 899bb8a..b837a43 100644 --- a/src/H5B2stat.c +++ b/src/H5B2stat.c @@ -89,6 +89,7 @@ H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, H5B2_t *bt2 = NULL; /* Pointer to the B-tree header */ H5B2_shared_t *shared; /* Pointer to B-tree's shared information */ herr_t ret_value = SUCCEED; /* Return value */ + H5B2_hdr_cache_ud_t cache_udata; /* User-data for callback */ FUNC_ENTER_NOAPI_NOINIT(H5B2_stat_info) @@ -98,8 +99,11 @@ H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, HDassert(H5F_addr_defined(addr)); HDassert(info); + cache_udata.f = f; + cache_udata.type = type; + /* Look up the B-tree header */ - if(NULL == (bt2 = (H5B2_t *)H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ))) + if(NULL == (bt2 = (H5B2_t *)H5AC2_protect(f, dxpl_id, H5AC2_BT2_HDR, addr, (size_t)H5B2_HEADER_SIZE(f), &cache_udata, H5AC2_READ))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree header") /* Get pointer to reference counted shared B-tree info */ @@ -111,7 +115,7 @@ H5B2_stat_info(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, done: /* Release B-tree header node */ - if(bt2 && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, bt2, H5AC__NO_FLAGS_SET) < 0) + if(bt2 && H5AC2_unprotect(f, dxpl_id, H5AC2_BT2_HDR, addr, (size_t)0, bt2, H5AC2__NO_FLAGS_SET) < 0) HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree header info") FUNC_LEAVE_NOAPI(ret_value) |