diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-03-02 20:07:10 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-03-02 20:07:10 (GMT) |
commit | 483185409e16ec83c24301e21bfdc92234506730 (patch) | |
tree | e97c85158440c18965ce515b90ff5139e75566b1 /src/H5Dbtree.c | |
parent | a074829c66d295ebd83b77aac9abc27ba4457e33 (diff) | |
download | hdf5-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/H5Dbtree.c')
-rw-r--r-- | src/H5Dbtree.c | 54 |
1 files changed, 17 insertions, 37 deletions
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 89d2596..6ca826c 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -26,7 +26,6 @@ /* Module Setup */ /****************/ -#define H5B_PACKAGE /*suppress error about including H5Bpkg */ #define H5D_PACKAGE /*suppress error about including H5Dpkg */ @@ -34,7 +33,8 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5Bpkg.h" /* B-link trees */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5Bprivate.h" /* B-link trees */ #include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ @@ -42,11 +42,8 @@ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ #include "H5MFprivate.h" /* File space management */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ #include "H5Sprivate.h" /* Dataspaces */ -#include "H5SLprivate.h" /* Skip lists */ #include "H5Vprivate.h" /* Vector and array functions */ /****************/ @@ -106,10 +103,8 @@ static int H5D_btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_ke static H5RC_t *H5D_btree_get_shared(const H5F_t *f, const void *_udata); static herr_t H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key, void *_udata, void *_rt_key, haddr_t *addr_p /*out*/); -static int H5D_btree_cmp2(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, - void *_rt_key); -static int H5D_btree_cmp3(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, - void *_rt_key); +static int H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key); +static int H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key); static htri_t H5D_btree_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_lt_key, void *_udata); static H5B_ins_t H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, @@ -118,12 +113,12 @@ static H5B_ins_t H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, static H5B_ins_t H5D_btree_remove( H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed, void *_udata, void *_rt_key, hbool_t *rt_key_changed); -static herr_t H5D_btree_decode_key(const H5F_t *f, const H5B_t *bt, - const uint8_t *raw, void *_key); -static herr_t H5D_btree_encode_key(const H5F_t *f, const H5B_t *bt, - uint8_t *raw, void *_key); -static herr_t H5D_btree_debug_key(FILE *stream, H5F_t *f, hid_t dxpl_id, - int indent, int fwidth, const void *key, const void *udata); +static herr_t H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, + void *_key); +static herr_t H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, + void *_key); +static herr_t H5D_btree_debug_key(FILE *stream, int indent, int fwidth, + const void *key, const void *udata); /* Chunked layout indexing callbacks */ static herr_t H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info, @@ -231,9 +226,6 @@ H5D_btree_get_shared(const H5F_t UNUSED *f, const void *_udata) HDassert(udata->storage->idx_type == H5D_CHUNK_BTREE); HDassert(udata->storage->u.btree.shared); - /* Increment reference count on B-tree info */ - H5RC_INC(udata->storage->u.btree.shared); - /* Return the pointer to the ref-count object */ FUNC_LEAVE_NOAPI(udata->storage->u.btree.shared) } /* end H5D_btree_get_shared() */ @@ -332,10 +324,8 @@ done: * *------------------------------------------------------------------------- */ -/* ARGSUSED */ static int -H5D_btree_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udata, - void *_rt_key) +H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key) { H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key; H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key; @@ -383,10 +373,8 @@ H5D_btree_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udat * *------------------------------------------------------------------------- */ -/* ARGSUSED */ static int -H5D_btree_cmp3(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_udata, - void *_rt_key) +H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key) { H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key; H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key; @@ -540,7 +528,7 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key, HDassert(rt_key); HDassert(new_node_p); - cmp = H5D_btree_cmp3(f, dxpl_id, lt_key, udata, rt_key); + cmp = H5D_btree_cmp3(lt_key, udata, rt_key); HDassert(cmp <= 0); if(cmp < 0) { @@ -674,19 +662,15 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D_btree_decode_key(const H5F_t UNUSED *f, const H5B_t *bt, const uint8_t *raw, void *_key) +H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key) { H5D_btree_key_t *key = (H5D_btree_key_t *) _key; - H5B_shared_t *shared; /* Pointer to shared B-tree info */ size_t ndims; unsigned u; FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_decode_key) /* check args */ - HDassert(f); - HDassert(bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(raw); HDassert(key); @@ -716,19 +700,15 @@ H5D_btree_decode_key(const H5F_t UNUSED *f, const H5B_t *bt, const uint8_t *raw, *------------------------------------------------------------------------- */ static herr_t -H5D_btree_encode_key(const H5F_t UNUSED *f, const H5B_t *bt, uint8_t *raw, void *_key) +H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, void *_key) { H5D_btree_key_t *key = (H5D_btree_key_t *) _key; - H5B_shared_t *shared; /* Pointer to shared B-tree info */ size_t ndims; unsigned u; FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_encode_key) /* check args */ - HDassert(f); - HDassert(bt); - shared = (H5B_shared_t *)H5RC_GET_OBJ(bt->rc_shared); HDassert(shared); HDassert(raw); HDassert(key); @@ -759,8 +739,8 @@ H5D_btree_encode_key(const H5F_t UNUSED *f, const H5B_t *bt, uint8_t *raw, void */ /* ARGSUSED */ static herr_t -H5D_btree_debug_key(FILE *stream, H5F_t UNUSED *f, hid_t UNUSED dxpl_id, int indent, - int fwidth, const void *_key, const void *_udata) +H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, + const void *_udata) { const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key; const unsigned *ndims = (const unsigned *)_udata; |