summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-03-02 20:13:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-03-02 20:13:22 (GMT)
commit68c936cd239f860eff477636abe0e6bf388a92d7 (patch)
tree6075c8c5a84e3538d0ef6a7b6aea3fb4ce100fa8 /src/H5B.c
parent48142bf5fd0d75ff44c2736a919f41ea4e3d4216 (diff)
downloadhdf5-68c936cd239f860eff477636abe0e6bf388a92d7.zip
hdf5-68c936cd239f860eff477636abe0e6bf388a92d7.tar.gz
hdf5-68c936cd239f860eff477636abe0e6bf388a92d7.tar.bz2
[svn-r18358] Description:
Bring r18357 from trunk to 1.8 branch: Bring r18356 from metadata journaling merge branch to trunk: Converge metadata journaling branch with trunk with a bunch of v1 B-tree changes: - Remove H5ACprivate.h header from H5Bprivate.h header - Revise v1 B-tree client callbacks - Get rid of H5B_serialize() by bringing it into H5B_flush() Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5B.c')
-rw-r--r--src/H5B.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/H5B.c b/src/H5B.c
index 558f5bd..6d951f6 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -233,6 +233,7 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata,
bt->nchildren = 0;
if(NULL == (bt->rc_shared = (type->get_shared)(f, udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree node buffer")
+ H5RC_INC(bt->rc_shared);
shared=(H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared);
HDassert(shared);
if(NULL == (bt->native = H5FL_BLK_MALLOC(native_block, shared->sizeof_keys)) ||
@@ -321,7 +322,7 @@ H5B_find(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, void *u
while(lt < rt && cmp) {
idx = (lt + rt) / 2;
/* compare */
- if((cmp = (type->cmp3)(f, dxpl_id, H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0)
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, (idx + 1)))) < 0)
rt = idx;
else
lt = idx + 1;
@@ -823,7 +824,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
while(lt < rt && cmp) {
idx = (lt + rt) / 2;
- if((cmp = (type->cmp3)(f, dxpl_id, H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
rt = idx;
else
lt = idx + 1;
@@ -1035,7 +1036,7 @@ H5B_insert_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
* The max key in the original left node must be equal to the min key
* in the new node.
*/
- cmp = (type->cmp2)(f, dxpl_id, H5B_NKEY(bt, shared, bt->nchildren), udata,
+ cmp = (type->cmp2)(H5B_NKEY(bt, shared, bt->nchildren), udata,
H5B_NKEY(twin, shared, 0));
HDassert(0 == cmp);
#endif
@@ -1293,7 +1294,7 @@ H5B_remove_helper(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type
rt = bt->nchildren;
while(lt < rt && cmp) {
idx = (lt + rt) / 2;
- if((cmp = (type->cmp3)(f, dxpl_id, H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
+ if((cmp = (type->cmp3)(H5B_NKEY(bt, shared, idx), udata, H5B_NKEY(bt, shared, idx + 1))) < 0)
rt = idx;
else
lt = idx + 1;
@@ -1711,6 +1712,8 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
/* Set up the "global" information for this file's groups */
shared->type = type;
shared->two_k = 2 * H5F_KVALUE(f, type);
+ shared->sizeof_addr = H5F_SIZEOF_ADDR(f);
+ shared->sizeof_len = H5F_SIZEOF_SIZE(f);
shared->sizeof_rkey = sizeof_rkey;
HDassert(shared->sizeof_rkey);
shared->sizeof_keys = (shared->two_k + 1) * type->sizeof_nkey;