summaryrefslogtreecommitdiffstats
path: root/src/H5B2stat.c
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2008-06-27 14:18:39 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2008-06-27 14:18:39 (GMT)
commit5b7788f3ececa7efa6b91c4d0806e672ed724d14 (patch)
tree55a8851784231f321268ab8f61fc73177eb869cd /src/H5B2stat.c
parent1bc53871cd54271844b30693aff7a41fa080b365 (diff)
downloadhdf5-5b7788f3ececa7efa6b91c4d0806e672ed724d14.zip
hdf5-5b7788f3ececa7efa6b91c4d0806e672ed724d14.tar.gz
hdf5-5b7788f3ececa7efa6b91c4d0806e672ed724d14.tar.bz2
[svn-r15285] Purpose: metadata cache client conversion
Description: converted the v2 b-tree header, internal node, and leaf node metadata cache clients over to use the new journaling cache callbacks. Tested: kagiso, smirom
Diffstat (limited to 'src/H5B2stat.c')
-rw-r--r--src/H5B2stat.c8
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)