summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-03-02 20:07:10 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-03-02 20:07:10 (GMT)
commit483185409e16ec83c24301e21bfdc92234506730 (patch)
treee97c85158440c18965ce515b90ff5139e75566b1 /src/H5B.c
parenta074829c66d295ebd83b77aac9abc27ba4457e33 (diff)
downloadhdf5-483185409e16ec83c24301e21bfdc92234506730.zip
hdf5-483185409e16ec83c24301e21bfdc92234506730.tar.gz
hdf5-483185409e16ec83c24301e21bfdc92234506730.tar.bz2
[svn-r18357] Description:
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/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-ia64 2.4 (tg-login3) w/parallel, w/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 2573ba4..a0168aa 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;