diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2012-05-30 22:01:00 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2012-05-30 22:01:00 (GMT) |
commit | 9786c0e5cb563c362c9b6f5b9bd0730b9ddcadf6 (patch) | |
tree | 006f9f714a95e349ae313fd76afdae9a45910c19 /src/H5B2private.h | |
parent | 1f6cb6f84a0fdeec79938624ef874d4147d52d87 (diff) | |
download | hdf5-9786c0e5cb563c362c9b6f5b9bd0730b9ddcadf6.zip hdf5-9786c0e5cb563c362c9b6f5b9bd0730b9ddcadf6.tar.gz hdf5-9786c0e5cb563c362c9b6f5b9bd0730b9ddcadf6.tar.bz2 |
[svn-r22422] Purpose: Add support for SWMR with v2 b-trees
Description:
Adds SWMR support to the v2 b-trees when used as a chunk index. Because each
node keeps track of the total number of records reachable through each of its
children, nodes must be shadowed every time a descendent record is inserted or
removed. This implementation prevents this from happening, however, if the node
has already been shadowed since the last time the v2 b-tree header was flushed.
Also modified SWMR test to include v2 b-trees.
Tested: jam, koala, ostrich (h5committest), durandal
Note: There is a preexisting failure in the ph5diff (-v) test
Diffstat (limited to 'src/H5B2private.h')
-rw-r--r-- | src/H5B2private.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/H5B2private.h b/src/H5B2private.h index 8ec9954..7ec0019 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -94,6 +94,8 @@ struct H5B2_class_t { herr_t (*compare)(const void *rec1, const void *rec2); /* Compare two native records */ herr_t (*encode)(uint8_t *raw, const void *record, void *ctx); /* Encode record from native form to disk storage form */ herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */ + herr_t (*crt_flush_dep)(void *record, void *udata, void *parent); /* Create a flush dependency with record as child */ + herr_t (*upd_flush_dep)(void *record, void *udata, void *old_parent, void *new_parent); /* Update a flush dependency with record as child */ herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */ int indent, int fwidth, const void *record, const void *ctx); void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */ @@ -128,8 +130,9 @@ typedef struct H5B2_t H5B2_t; /* Library-private Function Prototypes */ /***************************************/ H5_DLL H5B2_t *H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, - void *ctx_udata); -H5_DLL H5B2_t *H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata); + void *ctx_udata, void *parent); +H5_DLL H5B2_t *H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata, + void *parent); H5_DLL herr_t H5B2_get_addr(const H5B2_t *bt2, haddr_t *addr/*out*/); H5_DLL herr_t H5B2_insert(H5B2_t *bt2, hid_t dxpl_id, void *udata); H5_DLL herr_t H5B2_iterate(H5B2_t *bt2, hid_t dxpl_id, H5B2_operator_t op, @@ -145,13 +148,18 @@ H5_DLL herr_t H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5_DLL herr_t H5B2_remove(H5B2_t *b2, hid_t dxpl_id, void *udata, H5B2_remove_t op, void *op_data); H5_DLL herr_t H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, - H5_iter_order_t order, hsize_t idx, H5B2_remove_t op, void *op_data); + H5_iter_order_t order, hsize_t idx, void *udata, H5B2_remove_t op, + void *op_data); H5_DLL herr_t H5B2_get_nrec(const H5B2_t *bt2, hsize_t *nrec); H5_DLL herr_t H5B2_size(H5B2_t *bt2, hid_t dxpl_id, hsize_t *btree_size); H5_DLL herr_t H5B2_close(H5B2_t *bt2, hid_t dxpl_id); H5_DLL herr_t H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, - void *ctx_udata, H5B2_remove_t op, void *op_data); + void *ctx_udata, void *parent, H5B2_remove_t op, void *op_data); +H5_DLL htri_t H5B2_support(H5B2_t *bt2, hid_t dxpl_id, void *udata, + void *child); +H5_DLL herr_t H5B2_unsupport(H5B2_t *bt2, hid_t dxpl_id, void *udata, + void *child); /* Statistics routines */ H5_DLL herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info); |