summaryrefslogtreecommitdiffstats
path: root/src/H5Bdbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-05 13:39:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-05 13:39:56 (GMT)
commit74c8b68acab0fc2408740e7a38a2ab2bcdf58f57 (patch)
treed0d2da7ac1ea824f0ef78e757ace31a85bc4b6aa /src/H5Bdbg.c
parent4c0421ba76a7615cc02f43b8f3778f5d6a1f4d68 (diff)
downloadhdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.zip
hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.gz
hdf5-74c8b68acab0fc2408740e7a38a2ab2bcdf58f57.tar.bz2
[svn-r18702] Description:
Bring r18672 from metadata journaling "merging" branch to trunk: Mostly changes to move to only using one 'user data' parameter for calls to H5AC_protect(), along with some minor reformatting code cleanups. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Bdbg.c')
-rw-r--r--src/H5Bdbg.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c
index dff2380..3212416 100644
--- a/src/H5Bdbg.c
+++ b/src/H5Bdbg.c
@@ -59,7 +59,9 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
const H5B_class_t *type, void *udata)
{
H5B_t *bt = NULL;
+ H5RC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -75,13 +77,20 @@ H5B_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int f
HDassert(fwidth >= 0);
HDassert(type);
+ /* Get shared info for B-tree */
+ if(NULL == (rc_shared = (type->get_shared)(f, udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ HDassert(shared);
+
/*
* Load the tree node.
*/
- if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ)))
+ cache_udata.f = f;
+ cache_udata.type = type;
+ cache_udata.rc_shared = rc_shared;
+ if(NULL == (bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to load B-tree node")
- shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
- HDassert(shared);
/*
* Print the values.
@@ -165,7 +174,9 @@ herr_t
H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void *udata)
{
H5B_t *bt = NULL;
+ H5RC_t *rc_shared; /* Ref-counted shared info */
H5B_shared_t *shared; /* Pointer to shared B-tree info */
+ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */
int i, ncell, cmp;
static int ncalls = 0;
herr_t status;
@@ -185,8 +196,17 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
fprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
} /* end if */
+ /* Get shared info for B-tree */
+ if(NULL == (rc_shared = (type->get_shared)(f, udata)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object")
+ shared = (H5B_shared_t *)H5RC_GET_OBJ(rc_shared);
+ HDassert(shared);
+
/* Initialize the queue */
- bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, type, udata, H5AC_READ);
+ cache_udata.f = f;
+ cache_udata.type = type;
+ cache_udata.rc_shared = rc_shared;
+ bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, addr, &cache_udata, H5AC_READ);
HDassert(bt);
shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
@@ -207,7 +227,7 @@ H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type, void
* test.
*/
for(ncell = 0; cur; ncell++) {
- bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, cur->addr, type, udata, H5AC_READ);
+ bt = (H5B_t *)H5AC_protect(f, dxpl_id, H5AC_BT, cur->addr, &cache_udata, H5AC_READ);
HDassert(bt);
/* Check node header */