summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-12-19 21:27:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-12-19 21:27:15 (GMT)
commit0016ea927f7474e642c43a8e652033fe00dec828 (patch)
treee2b24b6a6c7587f981893636165a314b9d942ce2
parenteacff80a4e47433ffa9e88fea934b78284d93df8 (diff)
downloadhdf5-0016ea927f7474e642c43a8e652033fe00dec828.zip
hdf5-0016ea927f7474e642c43a8e652033fe00dec828.tar.gz
hdf5-0016ea927f7474e642c43a8e652033fe00dec828.tar.bz2
[svn-r28712] Description:
Switch v2 B-trees to use the same mechanism for setting up flush dependencies as extensible and fixed arrays. Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (h5committest not required on this branch)
-rw-r--r--src/H5Adense.c89
-rw-r--r--src/H5Aint.c21
-rw-r--r--src/H5Apkg.h22
-rw-r--r--src/H5B2.c99
-rw-r--r--src/H5B2cache.c36
-rw-r--r--src/H5B2dbg.c6
-rw-r--r--src/H5B2hdr.c11
-rw-r--r--src/H5B2int.c4
-rw-r--r--src/H5B2pkg.h9
-rw-r--r--src/H5B2private.h10
-rw-r--r--src/H5Dbtree2.c125
-rw-r--r--src/H5Dearray.c58
-rw-r--r--src/H5Dfarray.c56
-rw-r--r--src/H5EAprivate.h1
-rw-r--r--src/H5FAprivate.h1
-rw-r--r--src/H5FS.c2
-rw-r--r--src/H5Gdense.c32
-rw-r--r--src/H5Gobj.c2
-rw-r--r--src/H5Goh.c4
-rw-r--r--src/H5Gtest.c4
-rw-r--r--src/H5HFhdr.c1
-rw-r--r--src/H5HFhuge.c25
-rw-r--r--src/H5HFpkg.h1
-rw-r--r--src/H5HFstat.c2
-rw-r--r--src/H5Oainfo.c17
-rw-r--r--src/H5Oattribute.c103
-rw-r--r--src/H5Otest.c35
-rw-r--r--src/H5SM.c20
-rw-r--r--test/btree2.c32
29 files changed, 264 insertions, 564 deletions
diff --git a/src/H5Adense.c b/src/H5Adense.c
index 8bc0e05..148977d 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -126,7 +126,6 @@ typedef struct H5A_bt2_ud_rm_t {
/* downward */
H5A_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
haddr_t corder_bt2_addr; /* v2 B-tree address of creation order index */
- void *parent; /* Flush dependency parent */
} H5A_bt2_ud_rm_t;
/*
@@ -141,7 +140,6 @@ typedef struct H5A_bt2_ud_rmbi_t {
H5HF_t *shared_fheap; /* Fractal heap handle for shared messages */
H5_index_t idx_type; /* Index type for operation */
haddr_t other_bt2_addr; /* v2 B-tree address of "other" index */
- void *parent; /* Flush dependency parent */
} H5A_bt2_ud_rmbi_t;
@@ -185,7 +183,7 @@ typedef struct H5A_bt2_ud_rmbi_t {
*-------------------------------------------------------------------------
*/
herr_t
-H5A_dense_create(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo, void *parent)
+H5A_dense_create(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo)
{
H5HF_create_t fheap_cparam; /* Fractal heap creation parameters */
H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
@@ -248,7 +246,7 @@ HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
H5O_FHEAP_ID_LEN; /* Fractal heap ID */
bt2_cparam.split_percent = H5A_NAME_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5A_NAME_BT2_MERGE_PERC;
- if(NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL, parent)))
+ if(NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for name index")
/* Retrieve the v2 B-tree's address in the file */
@@ -269,7 +267,7 @@ HDfprintf(stderr, "%s: ainfo->name_bt2_addr = %a\n", FUNC, ainfo->name_bt2_addr)
H5O_FHEAP_ID_LEN; /* Fractal heap ID */
bt2_cparam.split_percent = H5A_CORDER_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5A_CORDER_BT2_MERGE_PERC;
- if(NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL, parent)))
+ if(NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for creation order index")
/* Retrieve the v2 B-tree's address in the file */
@@ -342,7 +340,7 @@ H5A__dense_fnd_cb(const H5A_t *attr, hbool_t *took_ownership, void *_user_attr)
*/
H5A_t *
H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name, void *parent)
+ const char *name)
{
H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -386,7 +384,7 @@ H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
} /* end if */
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL, parent)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "unable to open v2 B-tree for name index")
/* Create the "udata" information for v2 B-tree record find */
@@ -445,7 +443,6 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing message */
unsigned mesg_flags = 0; /* Flags for storing message */
htri_t attr_sharable; /* Flag indicating attributes are sharable */
- H5O_proxy_t *oh_proxy = NULL; /* Attribute's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -531,14 +528,8 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "unable to insert attribute into fractal heap")
} /* end else */
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&attr->oloc, dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin attribute object header proxy")
-
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the callback information for v2 B-tree record insertion */
@@ -562,7 +553,7 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
if(ainfo->index_corder) {
/* Open the creation order index v2 B-tree */
HDassert(H5F_addr_defined(ainfo->corder_bt2_addr));
- if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo->corder_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Insert the record into the creation order index v2 B-tree */
@@ -572,8 +563,6 @@ H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
done:
/* Release resources */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
if(fheap && H5HF_close(fheap, dxpl_id) < 0)
@@ -648,7 +637,6 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
H5WB_t *wb = NULL; /* Wrapped buffer for attribute data */
uint8_t attr_buf[H5A_ATTR_BUF_SIZE]; /* Buffer for serializing attribute */
- H5O_proxy_t *oh_proxy = NULL; /* Attribute's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -672,14 +660,8 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
if(H5F_addr_defined(op_data->corder_bt2_addr)) {
H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(op_data->f) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&op_data->attr->oloc, op_data->dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin attribute object header proxy")
-
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(op_data->f, op_data->dxpl_id, op_data->corder_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_corder = H5B2_open(op_data->f, op_data->dxpl_id, op_data->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Create the "udata" information for v2 B-tree record modify */
@@ -740,8 +722,6 @@ H5A__dense_write_bt2_cb(void *_record, void *_op_data, hbool_t *changed)
done:
/* Release resources */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(bt2_corder && H5B2_close(bt2_corder, op_data->dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for creation order index")
if(wb && H5WB_unwrap(wb) < 0)
@@ -773,7 +753,6 @@ H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
htri_t attr_sharable; /* Flag indicating attributes are sharable */
- H5O_proxy_t *oh_proxy = NULL; /* Attribute's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -811,14 +790,8 @@ H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
if(NULL == (fheap = H5HF_open(f, dxpl_id, ainfo->fheap_addr)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&attr->oloc, dxpl_id)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin attribute object header proxy")
-
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the "udata" information for v2 B-tree record modify */
@@ -847,8 +820,6 @@ H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, H5A_t *attr)
done:
/* Release resources */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(shared_fheap && H5HF_close(shared_fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close fractal heap")
if(fheap && H5HF_close(fheap, dxpl_id) < 0)
@@ -919,7 +890,7 @@ done:
*/
herr_t
H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *old_name, const char *new_name, void *parent)
+ const char *old_name, const char *new_name)
{
H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -966,7 +937,7 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL, parent)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the "udata" information for v2 B-tree record modify */
@@ -1041,7 +1012,7 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
/* Delete old attribute from dense storage */
- if(H5A_dense_remove(f, dxpl_id, ainfo, old_name, parent) < 0)
+ if(H5A_dense_remove(f, dxpl_id, ainfo, old_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage")
done:
@@ -1172,7 +1143,7 @@ done:
herr_t
H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id,
const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t skip, void *parent, hsize_t *last_attr,
+ hsize_t skip, hsize_t *last_attr,
const H5A_attr_iter_op_t *attr_op, void *op_data)
{
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -1246,7 +1217,7 @@ H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id,
} /* end if */
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL, parent)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Construct the user data for v2 B-tree iterator callback */
@@ -1272,7 +1243,7 @@ H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id,
else {
/* Build the table of attributes for this object */
/* (build table using the name index, but sort according to idx_type) */
- if(H5A_dense_build_table(f, dxpl_id, ainfo, idx_type, order, parent, &atable) < 0)
+ if(H5A_dense_build_table(f, dxpl_id, ainfo, idx_type, order, &atable) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error building table of attributes")
/* Iterate over attributes in table */
@@ -1322,7 +1293,7 @@ H5A__dense_remove_bt2_cb(const void *_record, void *_udata)
/* Check for removing the link from the creation order index */
if(H5F_addr_defined(udata->corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(udata->common.f, udata->common.dxpl_id, udata->corder_bt2_addr, NULL, udata->parent)))
+ if(NULL == (bt2_corder = H5B2_open(udata->common.f, udata->common.dxpl_id, udata->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
@@ -1374,7 +1345,7 @@ done:
*/
herr_t
H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name, void *parent)
+ const char *name)
{
H5A_bt2_ud_rm_t udata; /* User data for v2 B-tree record removal */
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -1418,7 +1389,7 @@ H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
} /* end if */
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL, parent)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
@@ -1431,7 +1402,6 @@ H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
udata.common.found_op = H5A__dense_fnd_cb; /* v2 B-tree comparison callback */
udata.common.found_op_data = &attr_copy;
udata.corder_bt2_addr = ainfo->corder_bt2_addr;
- udata.parent = parent;
/* Remove the record from the name index v2 B-tree */
if(H5B2_remove(bt2_name, dxpl_id, &udata, H5A__dense_remove_bt2_cb, &udata) < 0)
@@ -1533,7 +1503,7 @@ H5A__dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
} /* end else */
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->other_bt2_addr, NULL, bt2_udata->parent)))
+ if(NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->other_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Set the common information for the v2 B-tree remove operation */
@@ -1595,7 +1565,7 @@ done:
*/
herr_t
H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- H5_index_t idx_type, H5_iter_order_t order, hsize_t n, void *parent)
+ H5_index_t idx_type, H5_iter_order_t order, hsize_t n)
{
H5HF_t *fheap = NULL; /* Fractal heap handle */
H5HF_t *shared_fheap = NULL; /* Fractal heap handle for shared header messages */
@@ -1665,7 +1635,7 @@ H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
} /* end if */
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL, parent)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
@@ -1675,16 +1645,15 @@ H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
udata.shared_fheap = shared_fheap;
udata.idx_type = idx_type;
udata.other_bt2_addr = idx_type == H5_INDEX_NAME ? ainfo->corder_bt2_addr : ainfo->name_bt2_addr;
- udata.parent = parent;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, NULL, H5A__dense_remove_by_idx_bt2_cb, &udata) < 0)
+ if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5A__dense_remove_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREMOVE, FAIL, "unable to remove attribute from v2 B-tree index")
} /* end if */
else {
/* Build the table of attributes for this object */
/* (build table using the name index, but sort according to idx_type) */
- if(H5A_dense_build_table(f, dxpl_id, ainfo, idx_type, order, parent, &atable) < 0)
+ if(H5A_dense_build_table(f, dxpl_id, ainfo, idx_type, order, &atable) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "error building table of attributes")
/* Check for skipping too many attributes */
@@ -1692,7 +1661,7 @@ H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
/* Delete appropriate attribute from dense storage */
- if(H5A_dense_remove(f, dxpl_id, ainfo, ((atable.attrs[n])->shared)->name, parent) < 0)
+ if(H5A_dense_remove(f, dxpl_id, ainfo, ((atable.attrs[n])->shared)->name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage")
} /* end else */
@@ -1727,7 +1696,7 @@ done:
*/
htri_t
H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name, void *parent)
+ const char *name)
{
H5A_bt2_ud_common_t udata; /* User data for v2 B-tree modify */
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -1770,7 +1739,7 @@ H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
} /* end if */
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL, parent)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the "udata" information for v2 B-tree record 'find' */
@@ -1881,7 +1850,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo, void *parent)
+H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo)
{
H5A_bt2_ud_common_t udata; /* v2 B-tree user data for deleting attributes */
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -1911,7 +1880,7 @@ H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo, void *parent)
udata.found_op_data = NULL;
/* Delete name index v2 B-tree */
- if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, parent, H5A__dense_delete_bt2_cb, &udata) < 0)
+ if(H5B2_delete(f, dxpl_id, ainfo->name_bt2_addr, NULL, H5A__dense_delete_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index")
ainfo->name_bt2_addr = HADDR_UNDEF;
@@ -1923,7 +1892,7 @@ H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo, void *parent)
/* Check if we should delete the creation order index v2 B-tree */
if(H5F_addr_defined(ainfo->corder_bt2_addr)) {
/* Delete the creation order index, without adjusting the ref. count on the attributes */
- if(H5B2_delete(f, dxpl_id, ainfo->corder_bt2_addr, NULL, parent, NULL, NULL) < 0)
+ if(H5B2_delete(f, dxpl_id, ainfo->corder_bt2_addr, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for creation order index")
ainfo->corder_bt2_addr = HADDR_UNDEF;
} /* end if */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index bde64c4..80761b6 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -1407,8 +1407,7 @@ done:
*/
herr_t
H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- H5_index_t idx_type, H5_iter_order_t order, void *parent,
- H5A_attr_table_t *atable)
+ H5_index_t idx_type, H5_iter_order_t order, H5A_attr_table_t *atable)
{
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
hsize_t nrec; /* # of records in v2 B-tree */
@@ -1424,7 +1423,7 @@ H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
HDassert(atable);
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL, parent)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in "name" B-tree */
@@ -1455,7 +1454,7 @@ H5A_dense_build_table(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
/* Iterate over the links in the group, building a table of the link messages */
if(H5A_dense_iterate(f, dxpl_id, (hid_t)0, ainfo, H5_INDEX_NAME,
- H5_ITER_NATIVE, (hsize_t)0, parent, NULL, &attr_op, &udata) < 0)
+ H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
/* Sort attribute table in correct iteration order */
@@ -1789,7 +1788,6 @@ htri_t
H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo)
{
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_TAG(dxpl_id, oh->cache_info.addr, FAIL)
@@ -1811,14 +1809,8 @@ H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo)
if(ainfo->nattrs == HSIZET_MAX) {
/* Check if we are using "dense" attribute storage */
if(H5F_addr_defined(ainfo->fheap_addr)) {
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(f, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in "name" B-tree */
@@ -1834,8 +1826,6 @@ H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo)
done:
/* Release resources */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, FAIL, "can't close v2 B-tree for name index")
@@ -2364,9 +2354,8 @@ H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo
attr_op.op_type = H5A_ATTR_OP_LIB;
attr_op.u.lib_op = H5A__dense_post_copy_file_cb;
- /*!FIXME must pass something for parent once SWMR works with H5Ocopy -NAF */
if(H5A_dense_iterate(src_oloc->file, dxpl_id, (hid_t)0, ainfo_src, H5_INDEX_NAME,
- H5_ITER_NATIVE, (hsize_t)0, NULL, NULL, &attr_op, &udata) < 0)
+ H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
done:
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index ab036fa..5858147 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -207,37 +207,34 @@ H5_DLL herr_t H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid
H5_DLL ssize_t H5A__get_name(H5A_t *attr, size_t buf_size, char *buf);
/* Attribute "dense" storage routines */
-H5_DLL herr_t H5A_dense_create(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo,
- void *parent);
+H5_DLL herr_t H5A_dense_create(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo);
H5_DLL H5A_t *H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name, void *parent);
+ const char *name);
H5_DLL herr_t H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
H5A_t *attr);
H5_DLL herr_t H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
H5A_t *attr);
H5_DLL herr_t H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *old_name, const char *new_name, void *parent);
+ const char *old_name, const char *new_name);
H5_DLL herr_t H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id,
const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t skip, void *parent, hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op,
+ hsize_t skip, hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op,
void *op_data);
H5_DLL herr_t H5A_dense_remove(H5F_t *f, hid_t dxpl_id,
- const H5O_ainfo_t *ainfo, const char *name, void *parent);
+ const H5O_ainfo_t *ainfo, const char *name);
H5_DLL herr_t H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id,
const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
- hsize_t n, void *parent);
+ hsize_t n);
H5_DLL htri_t H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
- const char *name, void *parent);
-H5_DLL herr_t H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo,
- void *parent);
-
+ const char *name);
+H5_DLL herr_t H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo);
/* Attribute table operations */
H5_DLL herr_t H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
H5_index_t idx_type, H5_iter_order_t order, H5A_attr_table_t *atable);
H5_DLL herr_t H5A_dense_build_table(H5F_t *f, hid_t dxpl_id,
const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
- void *parent, H5A_attr_table_t *atable);
+ H5A_attr_table_t *atable);
H5_DLL herr_t H5A_attr_iterate_table(const H5A_attr_table_t *atable,
hsize_t skip, hsize_t *last_attr, hid_t loc_id,
const H5A_attr_iter_op_t *attr_op, void *op_data);
@@ -270,7 +267,6 @@ H5_DLL herr_t H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *me
H5_DLL herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t * ainfo_src,
H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
-
/* Testing functions */
#ifdef H5A_TESTING
H5_DLL htri_t H5A_is_shared_test(hid_t aid);
diff --git a/src/H5B2.c b/src/H5B2.c
index 5225d56..5c1e107 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -134,8 +134,7 @@ H5FL_DEFINE_STATIC(H5B2_t);
*-------------------------------------------------------------------------
*/
H5B2_t *
-H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
- void *ctx_udata, void *parent)
+H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, void *ctx_udata)
{
H5B2_t *bt2 = NULL; /* Pointer to the B-tree */
H5B2_hdr_t *hdr = NULL; /* Pointer to the B-tree header */
@@ -154,7 +153,7 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
HDcompile_assert(H5B2_NUM_BTREE_ID == NELMTS(H5B2_client_class_g));
/* Create shared v2 B-tree header */
- if(HADDR_UNDEF == (hdr_addr = H5B2__hdr_create(f, dxpl_id, cparam, ctx_udata, parent)))
+ if(HADDR_UNDEF == (hdr_addr = H5B2__hdr_create(f, dxpl_id, cparam, ctx_udata)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't create v2 B-tree header")
/* Create v2 B-tree wrapper */
@@ -162,7 +161,7 @@ H5B2_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for v2 B-tree info")
/* Look up the B-tree header */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, ctx_udata, parent, H5AC__NO_FLAGS_SET)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, ctx_udata, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect v2 B-tree header")
/* Point v2 B-tree wrapper at header and bump it's ref count */
@@ -206,7 +205,7 @@ done:
*-------------------------------------------------------------------------
*/
H5B2_t *
-H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata, void *parent)
+H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata)
{
H5B2_t *bt2 = NULL; /* Pointer to the B-tree */
H5B2_hdr_t *hdr = NULL; /* Pointer to the B-tree header */
@@ -219,7 +218,7 @@ H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata, void *parent)
HDassert(H5F_addr_defined(addr));
/* Look up the B-tree header */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, addr, ctx_udata, parent, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, addr, ctx_udata, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, NULL, "unable to protect v2 B-tree header")
/* Check for pending heap deletion */
@@ -904,12 +903,6 @@ done:
*
* Purpose: Removes the n'th record from a B-tree.
*
- * The 'udata' parameter is only used to pass through to the
- * crt_flush_dep and upd_flush_dep callbacks, so it only
- * needs to contain enough information for those (if any - it
- * can be NULL). Specifically, it does not need to identify
- * the specific record to search for.
- *
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
@@ -920,7 +913,7 @@ done:
*/
herr_t
H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order,
- hsize_t idx, void *udata, H5B2_remove_t op, void *op_data)
+ hsize_t idx, H5B2_remove_t op, void *op_data)
{
H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
@@ -954,7 +947,7 @@ H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id, H5_iter_order_t order,
if(H5B2__remove_internal_by_idx(hdr, dxpl_id, &depth_decreased, NULL,
NULL, hdr->depth, &(hdr->cache_info), NULL, &hdr->root,
- H5B2_POS_ROOT, idx, udata, op, op_data) < 0)
+ H5B2_POS_ROOT, idx, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node")
/* Check for decreasing the depth of the B-tree */
@@ -1378,7 +1371,7 @@ H5B2_close(H5B2_t *bt2, hid_t dxpl_id)
/* Lock the v2 B-tree header into memory */
/* (OK to pass in NULL for callback context, since we know the header must be in the cache) */
- if(NULL == (hdr = H5B2__hdr_protect(bt2->f, dxpl_id, bt2_addr, NULL, NULL, H5AC__NO_FLAGS_SET)))
+ if(NULL == (hdr = H5B2__hdr_protect(bt2->f, dxpl_id, bt2_addr, NULL, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")
/* Set the shared v2 B-tree header's file context for this operation */
@@ -1437,7 +1430,7 @@ done:
*/
herr_t
H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata,
- void *parent, H5B2_remove_t op, void *op_data)
+ H5B2_remove_t op, void *op_data)
{
H5B2_hdr_t *hdr = NULL; /* Pointer to the B-tree header */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1452,7 +1445,7 @@ H5B2_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata,
#ifdef QAK
HDfprintf(stderr, "%s: addr = %a\n", FUNC, addr);
#endif /* QAK */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, addr, ctx_udata, parent, H5AC__NO_FLAGS_SET)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, addr, ctx_udata, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")
/* Remember the callback & context for later */
@@ -1509,64 +1502,38 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/*
* Check arguments.
+ *
+ * At present, this function is only used to setup a flush dependency
+ * between an object header proxy and the v2 B-tree header when
+ * the B-tree is being used to index a chunked data set.
+ *
+ * Make sure that the parameters are congruent with this.
*/
HDassert(bt2);
HDassert(hdr);
-
- /* Set the shared v2 B-tree header's file context for this operation */
- bt2->hdr->f = bt2->f;
-
- /* Set up flush dependency between parent entry and B-tree header */
- if(H5B2__create_flush_depend(parent_entry, (H5AC_info_t *)hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency on file metadata")
-
-done:
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5B2_depend() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5B2_undepend
- *
- * Purpose: Remove a child flush dependency between the v2 B-tree's
- * header and another piece of metadata in the file.
- *
- * Return: SUCCEED/FAIL
- *
- * Programmer: Dana Robinson
- * Fall 2012
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5B2_undepend(H5AC_info_t *parent_entry, H5B2_t *bt2)
-{
- /* Local variables */
- H5B2_hdr_t *hdr = bt2->hdr; /* Header for B-tree */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(SUCCEED)
-
-#ifdef QAK
-HDfprintf(stderr, "%s: Called\n", FUNC);
-#endif /* QAK */
+ HDassert(parent_entry);
+ HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(parent_entry->type);
+ HDassert(parent_entry->type->id == H5AC_OHDR_PROXY_ID);
+ HDassert(hdr->parent == NULL || hdr->parent == parent_entry);
/*
- * Check arguments.
+ * Check to see if the flush dependency between the object header proxy
+ * and the v2 B-tree header has already been setup. If it hasn't, then
+ * set it up.
*/
- HDassert(bt2);
- HDassert(hdr);
+ if(NULL == hdr->parent) {
+ /* Set the shared v2 B-tree header's file context for this operation */
+ bt2->hdr->f = bt2->f;
- /* Set the shared v2 B-tree header's file context for this operation */
- bt2->hdr->f = bt2->f;
+ /* Set up flush dependency between parent entry and B-tree header */
+ if(H5B2__create_flush_depend(parent_entry, (H5AC_info_t *)hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency on file metadata")
- /* Remove flush dependency between parent entry and B-tree header */
- if(H5B2__destroy_flush_depend(parent_entry, (H5AC_info_t *)hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency on file metadata")
+ hdr->parent = parent_entry;
+ } /* end if */
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5B2_undepend() */
+} /* end H5B2_depend() */
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 58e76af..2c40761 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -328,7 +328,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len,
/* Initialize B-tree header info */
cparam.cls = H5B2_client_class_g[id];
- if(H5B2__hdr_init(hdr, &cparam, udata->ctx_udata, udata->parent, depth) < 0)
+ if(H5B2__hdr_init(hdr, &cparam, udata->ctx_udata, depth) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, NULL, "can't initialize B-tree header info")
/* Set the B-tree header's address */
@@ -501,23 +501,35 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
/* Check if the file was opened with SWMR-write access */
if(hdr->swmr_write) {
- HDassert(hdr->parent);
switch(action) {
case H5AC_NOTIFY_ACTION_AFTER_INSERT:
case H5AC_NOTIFY_ACTION_AFTER_LOAD:
- /* Create flush dependency on parent */
- if(H5B2__create_flush_depend((H5AC_info_t *)hdr->parent, (H5AC_info_t *)hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTDEPEND, FAIL, "unable to create flush dependency")
- break;
-
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
/* do nothing */
- break;
+ break;
- case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
- /* Destroy flush dependency on parent */
- if(H5B2__destroy_flush_depend((H5AC_info_t *)hdr->parent, (H5AC_info_t *)hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
+ case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
+ /* If hdr->parent != NULL, the v2 B-tree header
+ * must be employed as the index for a chunked
+ * data set which has been modified by the SWMR writer.
+ *
+ * In this case, hdr->parent must contain a
+ * pointer to the object header proxy which is the flush
+ * dependency parent of the v2 B-tree header.
+ *
+ * hdr->parent is used to destroy the flush dependency
+ * before the v2 B-tree header is evicted.
+ */
+ if(hdr->parent) {
+ /* Sanity checks */
+ HDassert(((H5AC_info_t *)hdr->parent)->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(((H5AC_info_t *)hdr->parent)->type);
+ HDassert(((H5AC_info_t *)hdr->parent)->type->id == H5AC_OHDR_PROXY_ID);
+
+ /* Destroy flush dependency on object header proxy */
+ if(H5B2__destroy_flush_depend((H5AC_info_t *)hdr->parent, (H5AC_info_t *)hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
+ } /* end if */
break;
default:
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 05fa1d8..b0e9ba2 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -119,7 +119,7 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
/* Load the B-tree header */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, addr, dbg_ctx, NULL, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
/* Set file pointer for this B-tree operation */
@@ -229,7 +229,7 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
} /* end if */
/* Load the B-tree header */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, NULL, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load v2 B-tree header")
/* Set file pointer for this B-tree operation */
@@ -350,7 +350,7 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
/* Load the B-tree header */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, NULL, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")
/* Set file pointer for this B-tree operation */
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index c91723d..414d3c3 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -109,7 +109,7 @@ H5FL_SEQ_DEFINE(H5B2_node_info_t);
*/
herr_t
H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
- void *parent, uint16_t depth)
+ uint16_t depth)
{
size_t sz_max_nrec; /* Temporary variable for range checking */
unsigned u_max_nrec_size; /* Temporary variable for range checking */
@@ -133,7 +133,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
HDassert(cparam->merge_percent < (cparam->split_percent / 2));
/* Initialize basic information */
- hdr->parent = parent;
+ hdr->parent = NULL;
hdr->rc = 0;
hdr->pending_delete = FALSE;
@@ -294,7 +294,7 @@ done:
*/
haddr_t
H5B2__hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
- void *ctx_udata, void *parent)
+ void *ctx_udata)
{
H5B2_hdr_t *hdr = NULL; /* The new v2 B-tree header information */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
@@ -312,7 +312,7 @@ H5B2__hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam,
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "allocation failed for B-tree header")
/* Initialize shared B-tree info */
- if(H5B2__hdr_init(hdr, cparam, ctx_udata, parent, (uint16_t)0) < 0)
+ if(H5B2__hdr_init(hdr, cparam, ctx_udata, (uint16_t)0) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, HADDR_UNDEF, "can't create shared B-tree info")
/* Allocate space for the header on disk */
@@ -512,7 +512,7 @@ done:
*/
H5B2_hdr_t *
H5B2__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t hdr_addr, void *ctx_udata,
- void *parent, unsigned flags)
+ unsigned flags)
{
H5B2_hdr_cache_ud_t udata; /* User data for cache callbacks */
H5B2_hdr_t *ret_value = NULL; /* Return value */
@@ -528,7 +528,6 @@ H5B2__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t hdr_addr, void *ctx_udata,
/* Set up user data for cache callbacks */
udata.f = f;
- udata.parent = parent;
udata.addr = hdr_addr;
udata.ctx_udata = ctx_udata;
diff --git a/src/H5B2int.c b/src/H5B2int.c
index f7927db..a33b8c3 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -3410,7 +3410,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
hbool_t *depth_decreased, void *swap_loc, void *swap_parent, uint16_t depth,
H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n,
- void *udata, H5B2_remove_t op, void *op_data)
+ H5B2_remove_t op, void *op_data)
{
H5AC_info_t *new_cache_info; /* Pointer to new cache info */
unsigned *new_cache_info_flags_ptr = NULL;
@@ -3702,7 +3702,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
/* Attempt to remove record from child node */
if(depth > 1) {
if(H5B2__remove_internal_by_idx(hdr, dxpl_id, depth_decreased, swap_loc, swap_parent, (uint16_t)(depth - 1),
- new_cache_info, new_cache_info_flags_ptr, new_node_ptr, next_pos, n, udata, op, op_data) < 0)
+ new_cache_info, new_cache_info_flags_ptr, new_node_ptr, next_pos, n, op, op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to remove record from B-tree internal node")
} /* end if */
else {
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index 6124ec4..5691d5f 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -241,7 +241,6 @@ typedef enum H5B2_nodepos_t {
/* Callback info for loading a free space header into the cache */
typedef struct H5B2_hdr_cache_ud_t {
H5F_t *f; /* File that v2 b-tree header is within */
- void *parent; /* Flush dependency parent */
haddr_t addr; /* Address of B-tree header in the file */
void *ctx_udata; /* User-data for protecting */
} H5B2_hdr_cache_ud_t;
@@ -313,16 +312,16 @@ H5_DLL herr_t H5B2__destroy_flush_depend(H5AC_info_t *parent_entry,
/* Routines for managing B-tree header info */
H5_DLL H5B2_hdr_t *H5B2__hdr_alloc(H5F_t *f);
H5_DLL haddr_t H5B2__hdr_create(H5F_t *f, hid_t dxpl_id,
- const H5B2_create_t *cparam, void *ctx_udata, void *parent);
+ const H5B2_create_t *cparam, void *ctx_udata);
H5_DLL herr_t H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam,
- void *ctx_udata, void *parent, uint16_t depth);
+ void *ctx_udata, uint16_t depth);
H5_DLL herr_t H5B2__hdr_incr(H5B2_hdr_t *hdr);
H5_DLL herr_t H5B2__hdr_decr(H5B2_hdr_t *hdr);
H5_DLL herr_t H5B2__hdr_fuse_incr(H5B2_hdr_t *hdr);
H5_DLL size_t H5B2__hdr_fuse_decr(H5B2_hdr_t *hdr);
H5_DLL herr_t H5B2__hdr_dirty(H5B2_hdr_t *hdr);
H5_DLL H5B2_hdr_t *H5B2__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t hdr_addr,
- void *ctx_udata, void *parent, unsigned flags);
+ void *ctx_udata, unsigned flags);
H5_DLL herr_t H5B2__hdr_unprotect(H5B2_hdr_t *hdr, hid_t dxpl_id,
unsigned cache_flags);
H5_DLL herr_t H5B2__hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id);
@@ -383,7 +382,7 @@ H5_DLL herr_t H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
hbool_t *depth_decreased, void *swap_loc, void *swap_parent, uint16_t depth,
H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n,
- void *udata, H5B2_remove_t op, void *op_data);
+ H5B2_remove_t op, void *op_data);
H5_DLL herr_t H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *parent,
unsigned idx, H5B2_remove_t op, void *op_data);
diff --git a/src/H5B2private.h b/src/H5B2private.h
index 1047a29..cc60c9b 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -129,9 +129,8 @@ 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, void *parent);
-H5_DLL H5B2_t *H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata,
- void *parent);
+ void *ctx_udata);
+H5_DLL H5B2_t *H5B2_open(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *ctx_udata);
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,
@@ -147,20 +146,19 @@ 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, void *udata, H5B2_remove_t op,
+ H5_iter_order_t order, hsize_t idx, 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, void *parent, H5B2_remove_t op, void *op_data);
+ void *ctx_udata, H5B2_remove_t op, void *op_data);
H5_DLL htri_t H5B2_support(H5B2_t *bt2, hid_t dxpl_id, void *udata,
H5AC_info_t *child);
H5_DLL herr_t H5B2_unsupport(H5B2_t *bt2, hid_t dxpl_id, void *udata,
H5AC_info_t *child);
H5_DLL herr_t H5B2_depend(H5AC_info_t *parent_entry, H5B2_t *bt2);
-H5_DLL herr_t H5B2_undepend(H5AC_info_t *parent_entry, H5B2_t *bt2);
/* Statistics routines */
H5_DLL herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info);
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index 5ff174d..f286db2 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -107,6 +107,7 @@ static herr_t H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth,
/* Helper routine */
static herr_t H5D__bt2_idx_open(const H5D_chk_idx_info_t *idx_info);
+static herr_t H5D__btree2_idx_depend(const H5D_chk_idx_info_t *idx_info);
/* Callback for H5B2_iterate() which is called in H5D__bt2_idx_iterate() */
static int H5D__bt2_idx_iterate_cb(const void *_record, void *_udata);
@@ -735,6 +736,63 @@ H5D__bt2_idx_init(const H5D_chk_idx_info_t H5_ATTR_UNUSED *idx_info,
/*-------------------------------------------------------------------------
+ * Function: H5D__btree2_idx_depend
+ *
+ * Purpose: Create flush dependency between v2 B-tree and dataset's
+ * object header.
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 18, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5D__btree2_idx_depend(const H5D_chk_idx_info_t *idx_info)
+{
+ H5O_loc_t oloc; /* Temporary object header location for dataset */
+ H5O_proxy_t *oh_proxy = NULL; /* Dataset's object header proxy */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check args */
+ HDassert(idx_info);
+ HDassert(idx_info->f);
+ HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
+ HDassert(idx_info->pline);
+ HDassert(idx_info->layout);
+ HDassert(H5D_CHUNK_IDX_BT2 == idx_info->layout->idx_type);
+ HDassert(idx_info->storage);
+ HDassert(H5D_CHUNK_IDX_BT2 == idx_info->storage->idx_type);
+ HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
+ HDassert(idx_info->storage->u.btree2.bt2);
+
+ /* Set up object header location for dataset */
+ H5O_loc_reset(&oloc);
+ oloc.file = idx_info->f;
+ oloc.addr = idx_info->storage->u.btree.dset_ohdr_addr;
+
+ /* Pin the dataset's object header proxy */
+ if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&oloc, idx_info->dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header proxy")
+
+ /* Make the v2 B-tree a child flush dependency of the dataset's object header */
+ if(H5B2_depend((H5AC_info_t *)oh_proxy, idx_info->storage->u.btree2.bt2) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, "unable to create flush dependency on object header")
+
+done:
+ /* Unpin the dataset's object header proxy */
+ if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header proxy")
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__btree2_idx_depend() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D__bt2_idx_open()
*
* Purpose: Opens an existing v2 B-tree.
@@ -755,8 +813,6 @@ static herr_t
H5D__bt2_idx_open(const H5D_chk_idx_info_t *idx_info)
{
H5D_bt2_ctx_ud_t u_ctx; /* user data for creating context */
- H5O_loc_t oloc; /* Temporary object header location for dataset */
- H5O_proxy_t *oh_proxy = NULL; /* Dataset's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -777,26 +833,16 @@ H5D__bt2_idx_open(const H5D_chk_idx_info_t *idx_info)
u_ctx.chunk_size = idx_info->layout->size;
u_ctx.dim = idx_info->layout->dim;
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) {
- /* Set up object header location for dataset */
- H5O_loc_reset(&oloc);
- oloc.file = idx_info->f;
- oloc.addr = idx_info->storage->u.btree.dset_ohdr_addr;
-
- /* Pin the dataset's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&oloc, idx_info->dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header proxy")
- } /* end if */
-
/* Open v2 B-tree for the chunk index */
- if(NULL == (idx_info->storage->u.btree2.bt2 = H5B2_open(idx_info->f, idx_info->dxpl_id, idx_info->storage->idx_addr , &u_ctx, oh_proxy)))
+ if(NULL == (idx_info->storage->u.btree2.bt2 = H5B2_open(idx_info->f, idx_info->dxpl_id, idx_info->storage->idx_addr, &u_ctx)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't open v2 B-tree for tracking chunked dataset")
-done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header proxy")
+ /* Check for SWMR writes to the file */
+ if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
+ if(H5D__btree2_idx_depend(idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, "unable to create flush dependency on object header")
+done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__bt2_idx_open() */
@@ -817,8 +863,6 @@ H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info)
{
H5B2_create_t bt2_cparam; /* v2 B-tree creation parameters */
H5D_bt2_ctx_ud_t u_ctx; /* data for context call */
- H5O_loc_t oloc; /* Temporary object header location for dataset */
- H5O_proxy_t *oh_proxy = NULL; /* Dataset's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -861,30 +905,20 @@ H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info)
u_ctx.chunk_size = idx_info->layout->size;
u_ctx.dim = idx_info->layout->dim;
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) {
- /* Set up object header location for dataset */
- H5O_loc_reset(&oloc);
- oloc.file = idx_info->f;
- oloc.addr = idx_info->storage->u.btree.dset_ohdr_addr;
-
- /* Pin the dataset's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&oloc, idx_info->dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header proxy")
- } /* end if */
-
/* Create the v2 B-tree for the chunked dataset */
- if(NULL == (idx_info->storage->u.btree2.bt2 = H5B2_create(idx_info->f, idx_info->dxpl_id, &bt2_cparam, &u_ctx, oh_proxy)))
+ if(NULL == (idx_info->storage->u.btree2.bt2 = H5B2_create(idx_info->f, idx_info->dxpl_id, &bt2_cparam, &u_ctx)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking chunked dataset")
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(idx_info->storage->u.btree2.bt2, &(idx_info->storage->idx_addr)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get v2 B-tree address for tracking chunked dataset")
-done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header proxy")
+ /* Check for SWMR writes to the file */
+ if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE)
+ if(H5D__btree2_idx_depend(idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, "unable to create flush dependency on object header")
+done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__bt2_idx_create() */
@@ -1345,8 +1379,6 @@ H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info)
H5D_bt2_remove_ud_t remove_udata; /* User data for removal callback */
H5B2_remove_t remove_op; /* The removal callback */
H5D_bt2_ctx_ud_t u_ctx; /* data for context call */
- H5O_loc_t oloc; /* Temporary object header location for dataset */
- H5O_proxy_t *oh_proxy = NULL; /* Dataset's object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1376,30 +1408,15 @@ H5D__bt2_idx_delete(const H5D_chk_idx_info_t *idx_info)
else
remove_op = H5D__bt2_remove_cb;
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) {
- /* Set up object header location for dataset */
- H5O_loc_reset(&oloc);
- oloc.file = idx_info->f;
- oloc.addr = idx_info->storage->u.btree.dset_ohdr_addr;
-
- /* Pin the dataset's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&oloc, idx_info->dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header proxy")
- } /* end if */
-
/* Delete the v2 B-tree */
/*(space in the file for each object is freed in the 'remove' callback) */
- if(H5B2_delete(idx_info->f, idx_info->dxpl_id, idx_info->storage->idx_addr, &u_ctx, oh_proxy, remove_op, &remove_udata) < 0)
+ if(H5B2_delete(idx_info->f, idx_info->dxpl_id, idx_info->storage->idx_addr, &u_ctx, remove_op, &remove_udata) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
idx_info->storage->idx_addr = HADDR_UNDEF;
} /* end if */
done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header proxy")
-
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__bt2_idx_delete() */
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index 35de599..14aaade 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -149,7 +149,6 @@ static herr_t H5D__earray_idx_dest(const H5D_chk_idx_info_t *idx_info);
/* Generic extensible array routines */
static herr_t H5D__earray_idx_open(const H5D_chk_idx_info_t *idx_info);
static herr_t H5D__earray_idx_depend(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__earray_idx_undepend(const H5D_chk_idx_info_t *idx_info);
/*********************/
@@ -776,63 +775,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D__earray_idx_undepend
- *
- * Purpose: Remove flush dependency between extensible array and dataset's
- * object header.
- *
- * Return: Success: non-negative
- * Failure: negative
- *
- * Programmer: Quincey Koziol
- * Tuesday, June 2, 2009
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5D__earray_idx_undepend(const H5D_chk_idx_info_t *idx_info)
-{
- H5O_loc_t oloc; /* Temporary object header location for dataset */
- H5O_proxy_t *oh_proxy = NULL; /* Dataset's object header proxy */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_STATIC
-
- /* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_EARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(idx_info->storage->u.earray.ea);
-
- /* Set up object header location for dataset */
- H5O_loc_reset(&oloc);
- oloc.file = idx_info->f;
- oloc.addr = idx_info->storage->u.earray.dset_ohdr_addr;
-
- /* Pin the dataset's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&oloc, idx_info->dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header proxy")
-
- /* Remove the extensible array as a child flush dependency of the dataset's object header */
- if(H5EA_undepend((H5AC_info_t *)oh_proxy, idx_info->storage->u.earray.ea) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTUNDEPEND, FAIL, "unable to remove flush dependency on object header")
-
-done:
- /* Unpin the dataset's object header proxy */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header proxy")
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__earray_idx_undepend() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5D__earray_idx_open
*
* Purpose: Opens an existing extensible array.
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index a1dc23b..af151a8 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -150,7 +150,6 @@ static herr_t H5D__farray_idx_dest(const H5D_chk_idx_info_t *idx_info);
/* Generic extensible array routines */
static herr_t H5D__farray_idx_open(const H5D_chk_idx_info_t *idx_info);
static herr_t H5D__farray_idx_depend(const H5D_chk_idx_info_t *idx_info);
-static herr_t H5D__farray_idx_undepend(const H5D_chk_idx_info_t *idx_info);
/*********************/
/* Package Variables */
@@ -777,61 +776,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D__farray_idx_undepend
- *
- * Purpose: Remove flush dependency between fixed array and dataset's
- * object header.
- *
- * Return: Success: non-negative
- * Failure: negative
- *
- * Programmer: Copied and modified from H5Dearray.c
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5D__farray_idx_undepend(const H5D_chk_idx_info_t *idx_info)
-{
- H5O_loc_t oloc; /* Temporary object header location for dataset */
- H5O_proxy_t *oh_proxy = NULL; /* Dataset's object header proxy */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_STATIC
-
- /* Check args */
- HDassert(idx_info);
- HDassert(idx_info->f);
- HDassert(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE);
- HDassert(idx_info->pline);
- HDassert(idx_info->layout);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->layout->idx_type);
- HDassert(idx_info->storage);
- HDassert(H5D_CHUNK_IDX_FARRAY == idx_info->storage->idx_type);
- HDassert(H5F_addr_defined(idx_info->storage->idx_addr));
- HDassert(idx_info->storage->u.farray.fa);
-
- /* Set up object header location for dataset */
- H5O_loc_reset(&oloc);
- oloc.file = idx_info->f;
- oloc.addr = idx_info->storage->u.farray.dset_ohdr_addr;
-
- /* Pin the dataset's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&oloc, idx_info->dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header proxy")
-
- /* Remove the extensible array as a child flush dependency of the dataset's object header */
- if(H5FA_undepend((H5AC_info_t *)oh_proxy, idx_info->storage->u.farray.fa) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTUNDEPEND, FAIL, "unable to remove flush dependency on object header")
-
-done:
- /* Unpin the dataset's object header proxy */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header proxy")
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D__farray_idx_undepend() */
-
-/*-------------------------------------------------------------------------
* Function: H5D__farray_idx_init
*
* Purpose: Initialize the indexing information for a dataset.
diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h
index 5203af7..c00e118 100644
--- a/src/H5EAprivate.h
+++ b/src/H5EAprivate.h
@@ -143,7 +143,6 @@ H5_DLL herr_t H5EA_get_addr(const H5EA_t *ea, haddr_t *addr);
H5_DLL herr_t H5EA_set(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, const void *elmt);
H5_DLL herr_t H5EA_get(const H5EA_t *ea, hid_t dxpl_id, hsize_t idx, void *elmt);
H5_DLL herr_t H5EA_depend(H5AC_info_t *parent_entry, H5EA_t *ea);
-H5_DLL herr_t H5EA_undepend(H5AC_info_t *parent_entry, H5EA_t *ea);
H5_DLL herr_t H5EA_iterate(H5EA_t *fa, hid_t dxpl_id, H5EA_operator_t op, void *udata);
H5_DLL herr_t H5EA_close(H5EA_t *ea, hid_t dxpl_id);
H5_DLL herr_t H5EA_delete(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata);
diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h
index 2ce4a1d..b7c141a 100644
--- a/src/H5FAprivate.h
+++ b/src/H5FAprivate.h
@@ -128,7 +128,6 @@ H5_DLL herr_t H5FA_get_addr(const H5FA_t *fa, haddr_t *addr);
H5_DLL herr_t H5FA_set(const H5FA_t *fa, hid_t dxpl_id, hsize_t idx, const void *elmt);
H5_DLL herr_t H5FA_get(const H5FA_t *fa, hid_t dxpl_id, hsize_t idx, void *elmt);
H5_DLL herr_t H5FA_depend(H5AC_info_t *parent_entry, H5FA_t *fa);
-H5_DLL herr_t H5FA_undepend(H5AC_info_t *parent_entry, H5FA_t *fa);
H5_DLL herr_t H5FA_iterate(H5FA_t *fa, hid_t dxpl_id, H5FA_operator_t op, void *udata);
H5_DLL herr_t H5FA_close(H5FA_t *fa, hid_t dxpl_id);
H5_DLL herr_t H5FA_delete(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata);
diff --git a/src/H5FS.c b/src/H5FS.c
index 30ea330..bb45c75 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -1045,7 +1045,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FA_undepend
+ * Function: H5FS_undepend
*
* Purpose: Remove a child flush dependency between the free space
* manager's and another piece of metadata in the file.
diff --git a/src/H5Gdense.c b/src/H5Gdense.c
index 9f3a556..e8fa237 100644
--- a/src/H5Gdense.c
+++ b/src/H5Gdense.c
@@ -327,7 +327,7 @@ HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
(uint32_t)fheap_id_len; /* Fractal heap ID */
bt2_cparam.split_percent = H5G_NAME_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5G_NAME_BT2_MERGE_PERC;
- if(NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL, NULL)))
+ if(NULL == (bt2_name = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for name index")
/* Retrieve the v2 B-tree's address in the file */
@@ -348,7 +348,7 @@ HDfprintf(stderr, "%s: linfo->name_bt2_addr = %a\n", FUNC, linfo->name_bt2_addr)
(uint32_t)fheap_id_len; /* Fractal heap ID */
bt2_cparam.split_percent = H5G_CORDER_BT2_SPLIT_PERC;
bt2_cparam.merge_percent = H5G_CORDER_BT2_MERGE_PERC;
- if(NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL, NULL)))
+ if(NULL == (bt2_corder = H5B2_create(f, dxpl_id, &bt2_cparam, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create v2 B-tree for creation order index")
/* Retrieve the v2 B-tree's address in the file */
@@ -440,7 +440,7 @@ HDfprintf(stderr, "%s: HDstrlen(lnk->name) = %Zu, link_size = %Zu\n", FUNC, HDst
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Create the callback information for v2 B-tree record insertion */
@@ -462,7 +462,7 @@ HDfprintf(stderr, "%s: HDstrlen(lnk->name) = %Zu, link_size = %Zu\n", FUNC, HDst
if(linfo->index_corder) {
/* Open the creation order index v2 B-tree */
HDassert(H5F_addr_defined(linfo->corder_bt2_addr));
- if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, linfo->corder_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, linfo->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Insert the record into the creation order index v2 B-tree */
@@ -559,7 +559,7 @@ H5G__dense_lookup(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Construct the user data for v2 B-tree callback */
@@ -735,7 +735,7 @@ H5G__dense_lookup_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Construct the user data for v2 B-tree callback */
@@ -1044,7 +1044,7 @@ H5G__dense_iterate(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Construct the user data for v2 B-tree iterator callback */
@@ -1246,7 +1246,7 @@ H5G__dense_get_name_by_idx(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo,
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
@@ -1328,7 +1328,7 @@ H5G_dense_remove_fh_cb(const void *obj, size_t H5_ATTR_UNUSED obj_len, void *_ud
H5G_bt2_ud_common_t bt2_udata; /* Info for B-tree callbacks */
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(udata->f, udata->dxpl_id, udata->corder_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2 = H5B2_open(udata->f, udata->dxpl_id, udata->corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
@@ -1442,7 +1442,7 @@ H5G__dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the name index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, linfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Set up the user data for the v2 B-tree 'record remove' callback */
@@ -1579,7 +1579,7 @@ H5G_dense_remove_by_idx_bt2_cb(const void *_record, void *_bt2_udata)
} /* end else */
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->other_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2 = H5B2_open(bt2_udata->f, bt2_udata->dxpl_id, bt2_udata->other_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for 'other' index")
/* Set the common information for the v2 B-tree remove operation */
@@ -1684,7 +1684,7 @@ H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for index")
/* Set up the user data for the v2 B-tree 'remove by index' callback */
@@ -1696,7 +1696,7 @@ H5G__dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_linfo_t *linfo,
udata.grp_full_path_r = grp_full_path_r;
/* Remove the record from the name index v2 B-tree */
- if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, NULL, H5G_dense_remove_by_idx_bt2_cb, &udata) < 0)
+ if(H5B2_remove_by_idx(bt2, dxpl_id, order, n, H5G_dense_remove_by_idx_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTREMOVE, FAIL, "unable to remove link from indexed v2 B-tree")
} /* end if */
else { /* Otherwise, we need to build a table of the links and sort it */
@@ -1778,7 +1778,7 @@ H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
udata.replace_names = FALSE;
/* Delete the name index, adjusting the ref. count on links removed */
- if(H5B2_delete(f, dxpl_id, linfo->name_bt2_addr, NULL, NULL, H5G_dense_remove_bt2_cb, &udata) < 0)
+ if(H5B2_delete(f, dxpl_id, linfo->name_bt2_addr, NULL, H5G_dense_remove_bt2_cb, &udata) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index")
/* Close the fractal heap */
@@ -1787,7 +1787,7 @@ H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
} /* end if */
else {
/* Delete the name index, without adjusting the ref. count on the links */
- if(H5B2_delete(f, dxpl_id, linfo->name_bt2_addr, NULL, NULL, NULL, NULL) < 0)
+ if(H5B2_delete(f, dxpl_id, linfo->name_bt2_addr, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for name index")
} /* end else */
linfo->name_bt2_addr = HADDR_UNDEF;
@@ -1796,7 +1796,7 @@ H5G__dense_delete(H5F_t *f, hid_t dxpl_id, H5O_linfo_t *linfo, hbool_t adj_link)
if(linfo->index_corder) {
/* Delete the creation order index, without adjusting the ref. count on the links */
HDassert(H5F_addr_defined(linfo->corder_bt2_addr));
- if(H5B2_delete(f, dxpl_id, linfo->corder_bt2_addr, NULL, NULL, NULL, NULL) < 0)
+ if(H5B2_delete(f, dxpl_id, linfo->corder_bt2_addr, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete v2 B-tree for creation order index")
linfo->corder_bt2_addr = HADDR_UNDEF;
} /* end if */
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 4991967..92ad0af 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -342,7 +342,7 @@ H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo, hid_t dxpl_id)
/* Check if we are using "dense" link storage */
if(H5F_addr_defined(linfo->fheap_addr)) {
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(grp_oloc->file, dxpl_id, linfo->name_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2_name = H5B2_open(grp_oloc->file, dxpl_id, linfo->name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in "name" B-tree */
diff --git a/src/H5Goh.c b/src/H5Goh.c
index dc6083c..bde540c 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -363,7 +363,7 @@ H5O_group_bh_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *
/* Check if name index available */
if(H5F_addr_defined(linfo.name_bt2_addr)) {
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, dxpl_id, linfo.name_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2_name = H5B2_open(loc->file, dxpl_id, linfo.name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Get name index B-tree size */
@@ -374,7 +374,7 @@ H5O_group_bh_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *
/* Check if creation order index available */
if(H5F_addr_defined(linfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(loc->file, dxpl_id, linfo.corder_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2_corder = H5B2_open(loc->file, dxpl_id, linfo.corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Get creation order index B-tree size */
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index f7ca0f1..a8796fb 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -413,7 +413,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
HGOTO_DONE_TAG(FAIL, FAIL)
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(grp->oloc.file, dxpl_id, linfo.name_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2_name = H5B2_open(grp->oloc.file, dxpl_id, linfo.name_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in name index */
@@ -423,7 +423,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
/* Check if there is a creation order index */
if(H5F_addr_defined(linfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(grp->oloc.file, dxpl_id, linfo.corder_bt2_addr, NULL, NULL)))
+ if(NULL == (bt2_corder = H5B2_open(grp->oloc.file, dxpl_id, linfo.corder_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Retrieve # of records in creation order index */
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index d1426c6..42857c0 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -126,7 +126,6 @@ H5HF_hdr_alloc(H5F_t *f)
/* Set the internal parameters for the heap */
hdr->f = f;
- hdr->swmr_write = (H5F_INTENT(f) & H5F_ACC_SWMR_WRITE) > 0;
hdr->sizeof_size = H5F_SIZEOF_SIZE(f);
hdr->sizeof_addr = H5F_SIZEOF_ADDR(f);
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index 95095e9..2b01a74 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -157,16 +157,13 @@ H5HF_huge_bt2_create(H5HF_hdr_t *hdr, hid_t dxpl_id)
bt2_cparam.merge_percent = H5HF_HUGE_BT2_MERGE_PERC;
/* Create v2 B-tree for tracking 'huge' objects */
- if(NULL == (hdr->huge_bt2 = H5B2_create(hdr->f, dxpl_id, &bt2_cparam, hdr->f, NULL)))
+ if(NULL == (hdr->huge_bt2 = H5B2_create(hdr->f, dxpl_id, &bt2_cparam, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCREATE, FAIL, "can't create v2 B-tree for tracking 'huge' heap objects")
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(hdr->huge_bt2, &hdr->huge_bt2_addr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get v2 B-tree address for tracking 'huge' heap objects")
- /* Create a flush dependency between the 'huge' v2 B-tree and the fractal heap */
- if(hdr->swmr_write && H5B2_depend((H5AC_info_t *)hdr, hdr->huge_bt2) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "can't create flush dependency between fractal heap and 'huge' v2 B-tree")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_huge_bt2_create() */
@@ -342,7 +339,7 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
} /* end else */
@@ -548,7 +545,7 @@ H5HF_huge_get_obj_len(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -632,7 +629,7 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -726,7 +723,7 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -874,7 +871,7 @@ H5HF_huge_write(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -1004,7 +1001,7 @@ H5HF_huge_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
/* Check if v2 B-tree is open yet */
if(NULL == hdr->huge_bt2) {
/* Open existing v2 B-tree */
- if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL)))
+ if(NULL == (hdr->huge_bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' heap objects")
} /* end if */
@@ -1125,13 +1122,9 @@ H5HF_huge_term(H5HF_hdr_t *hdr, hid_t dxpl_id)
/* Sanity check */
HDassert(hdr->huge_size == 0);
- /* Destroy the flush dependency between the 'huge' v2 B-tree and the fractal heap */
- if(hdr->swmr_write && H5B2_undepend((H5AC_info_t *)hdr, hdr->huge_bt2) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "can't destroy flush dependency between fractal heap and 'huge' v2 B-tree")
-
/* Delete the v2 B-tree */
/* (any v2 B-tree class will work here) */
- if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL, NULL, NULL) < 0)
+ if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL, NULL) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
/* Reset the information about 'huge' objects in the file */
@@ -1199,7 +1192,7 @@ H5HF_huge_delete(H5HF_hdr_t *hdr, hid_t dxpl_id)
} /* end else */
/* Delete the v2 B-tree */
- if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL, op, &udata) < 0)
+ if(H5B2_delete(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, op, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "can't delete v2 B-tree")
done:
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index b4e6558..15b62e2 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -360,7 +360,6 @@ typedef struct H5HF_hdr_t {
uint8_t heap_off_size; /* Size of heap offsets (in bytes) */
uint8_t heap_len_size; /* Size of heap ID lengths (in bytes) */
hbool_t checked_filters; /* TRUE if pipeline passes can_apply checks */
- hbool_t swmr_write; /* Flag indicating the file is opened with SWMR-write access */
} H5HF_hdr_t;
/* Common indirect block doubling table entry */
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index b54a191..303b1f4 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -156,7 +156,7 @@ H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size)
/* Check for B-tree storage of huge objects in fractal heap */
if(H5F_addr_defined(hdr->huge_bt2_addr)) {
/* Open the huge object index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f, NULL)))
+ if(NULL == (bt2 = H5B2_open(hdr->f, dxpl_id, hdr->huge_bt2_addr, hdr->f)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for tracking 'huge' objects")
/* Get the B-tree storage */
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 9e32af4..44c6611 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -339,7 +339,6 @@ static herr_t
H5O_ainfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
{
H5O_ainfo_t *ainfo = (H5O_ainfo_t *)_mesg;
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -351,22 +350,12 @@ H5O_ainfo_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
/* If the object is using "dense" attribute storage, delete it */
if(H5F_addr_defined(ainfo->fheap_addr)) {
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(f, dxpl_id, open_oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Delete the attribute */
- if(H5A_dense_delete(f, dxpl_id, ainfo, oh_proxy) < 0)
+ if(H5A_dense_delete(f, dxpl_id, ainfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free dense attribute storage")
} /* end if */
done:
- /* Release resources */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
-
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_ainfo_delete() */
@@ -449,9 +438,7 @@ H5O_ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
/* Set copied metadata tag */
H5_BEGIN_TAG(dxpl_id, H5AC__COPIED_TAG, NULL);
- /*!FIXME Must pass something for the parent, once we have a way to
- * depend on an object being copied (ohdr proxy?) -NAF */
- if(H5A_dense_create(file_dst, dxpl_id, ainfo_dst, NULL) < 0)
+ if(H5A_dense_create(file_dst, dxpl_id, ainfo_dst) < 0)
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTINIT, NULL, "unable to create dense storage for attributes")
/* Reset metadata tag */
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index a11e6dc..9b494a1 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -220,7 +220,6 @@ herr_t
H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5O_ainfo_t ainfo; /* Attribute information for object */
htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
herr_t ret_value = SUCCEED; /* Return value */
@@ -281,14 +280,8 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
H5O_iter_cvt_t udata; /* User data for callback */
H5O_mesg_operator_t op; /* Wrapper for operator */
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Create dense storage for attributes */
- if(H5A_dense_create(loc->file, dxpl_id, &ainfo, oh_proxy) < 0)
+ if(H5A_dense_create(loc->file, dxpl_id, &ainfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to create dense storage for attributes")
/* Set up user data for callback */
@@ -401,8 +394,6 @@ H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
@@ -480,7 +471,6 @@ H5A_t *
H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5O_ainfo_t ainfo; /* Attribute information for object */
H5A_t *exist_attr = NULL; /* Existing opened attribute object */
H5A_t *opened_attr = NULL; /* Newly opened attribute object */
@@ -517,14 +507,8 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
else {
/* Check for attributes in dense storage */
if(H5F_addr_defined(ainfo.fheap_addr)) {
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, NULL, "unable to pin object header proxy")
-
/* Open attribute with dense storage */
- if(NULL == (opened_attr = H5A_dense_open(loc->file, dxpl_id, &ainfo, name, oh_proxy)))
+ if(NULL == (opened_attr = H5A_dense_open(loc->file, dxpl_id, &ainfo, name)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, NULL, "can't open attribute")
} /* end if */
else {
@@ -559,8 +543,6 @@ H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
ret_value = opened_attr;
done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, NULL, "unable to unpin attribute object header proxy")
if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
@@ -1199,7 +1181,6 @@ H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name,
const char *new_name)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_proxy_t *oh_proxy = NULL; /* Attribute's object header proxy */
H5O_ainfo_t ainfo; /* Attribute information for object */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1224,14 +1205,8 @@ H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name,
/* Check for attributes stored densely */
if(H5F_addr_defined(ainfo.fheap_addr)) {
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin attribute object header proxy")
-
/* Rename the attribute data in dense storage */
- if(H5A_dense_rename(loc->file, dxpl_id, &ainfo, old_name, new_name, oh_proxy) < 0)
+ if(H5A_dense_rename(loc->file, dxpl_id, &ainfo, old_name, new_name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "error updating attribute")
} /* end if */
else {
@@ -1271,8 +1246,6 @@ H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id, const char *old_name,
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
@@ -1298,7 +1271,6 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id,
hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op, void *op_data)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5O_ainfo_t ainfo; /* Attribute information for object */
H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
herr_t ret_value = FAIL; /* Return value */
@@ -1329,19 +1301,13 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id,
if(skip > 0 && skip >= ainfo.nattrs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified")
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Release the object header */
if(H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
oh = NULL;
/* Iterate over attributes in dense storage */
- if((ret_value = H5A_dense_iterate(loc->file, dxpl_id, loc_id, &ainfo, idx_type, order, skip, oh_proxy, last_attr, attr_op, op_data)) < 0)
+ if((ret_value = H5A_dense_iterate(loc->file, dxpl_id, loc_id, &ainfo, idx_type, order, skip, last_attr, attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
} /* end if */
else {
@@ -1365,8 +1331,6 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id,
done:
/* Release resources */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
if(atable.attrs && H5A_attr_release_table(&atable) < 0)
@@ -1439,7 +1403,6 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo,
hid_t dxpl_id)
{
H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1457,14 +1420,8 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo,
hbool_t can_convert = TRUE; /* Whether converting to attribute messages is possible */
size_t u; /* Local index */
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Build the table of attributes for this object */
- if(H5A_dense_build_table(loc->file, dxpl_id, ainfo, H5_INDEX_NAME, H5_ITER_NATIVE, oh_proxy, &atable) < 0)
+ if(H5A_dense_build_table(loc->file, dxpl_id, ainfo, H5_INDEX_NAME, H5_ITER_NATIVE, &atable) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
/* Inspect attributes in table for ones that can't be converted back
@@ -1519,7 +1476,7 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo,
} /* end for */
/* Remove the dense storage */
- if(H5A_dense_delete(loc->file, dxpl_id, ainfo, oh_proxy) < 0)
+ if(H5A_dense_delete(loc->file, dxpl_id, ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete dense attribute storage")
} /* end if */
} /* end if */
@@ -1538,8 +1495,6 @@ H5O_attr_remove_update(const H5O_loc_t *loc, H5O_t *oh, H5O_ainfo_t *ainfo,
done:
/* Release resources */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(atable.attrs && H5A_attr_release_table(&atable) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "unable to release attribute table")
@@ -1612,7 +1567,6 @@ herr_t
H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5O_ainfo_t ainfo; /* Attribute information for object */
htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1637,14 +1591,8 @@ H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
/* Check for attributes stored densely */
if(H5F_addr_defined(ainfo.fheap_addr)) {
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Delete attribute from dense storage */
- if(H5A_dense_remove(loc->file, dxpl_id, &ainfo, name, oh_proxy) < 0)
+ if(H5A_dense_remove(loc->file, dxpl_id, &ainfo, name) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage")
} /* end if */
else {
@@ -1678,8 +1626,6 @@ H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
@@ -1705,7 +1651,6 @@ H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n, hid_t dxpl_id)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5O_ainfo_t ainfo; /* Attribute information for object */
htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
H5A_attr_table_t atable = {0, NULL}; /* Table of attributes */
@@ -1730,14 +1675,8 @@ H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
/* Check for attributes stored densely */
if(H5F_addr_defined(ainfo.fheap_addr)) {
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Delete attribute from dense storage */
- if(H5A_dense_remove_by_idx(loc->file, dxpl_id, &ainfo, idx_type, order, n, oh_proxy) < 0)
+ if(H5A_dense_remove_by_idx(loc->file, dxpl_id, &ainfo, idx_type, order, n) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute in dense storage")
} /* end if */
else {
@@ -1779,8 +1718,6 @@ H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unpin(oh) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin object header")
if(atable.attrs && H5A_attr_release_table(&atable) < 0)
@@ -1900,7 +1837,6 @@ htri_t
H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
{
H5O_t *oh = NULL; /* Pointer to actual object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5O_ainfo_t ainfo; /* Attribute information for object */
htri_t ret_value = FAIL; /* Return value */
@@ -1924,14 +1860,8 @@ H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
/* Check for attributes stored densely */
if(H5F_addr_defined(ainfo.fheap_addr)) {
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Check if attribute exists in dense storage */
- if((ret_value = H5A_dense_exists(loc->file, dxpl_id, &ainfo, name, oh_proxy)) < 0)
+ if((ret_value = H5A_dense_exists(loc->file, dxpl_id, &ainfo, name)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error checking for existence of attribute")
} /* end if */
else {
@@ -1955,8 +1885,6 @@ H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
} /* end else */
done:
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
@@ -1982,7 +1910,6 @@ H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
H5HF_t *fheap = NULL; /* Fractal heap handle */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2000,16 +1927,10 @@ H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
if((ainfo_exists = H5A_get_ainfo(f, dxpl_id, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
else if(ainfo_exists > 0) {
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(f, dxpl_id, oh)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Check if name index available */
if(H5F_addr_defined(ainfo.name_bt2_addr)) {
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo.name_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_name = H5B2_open(f, dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Get name index B-tree size */
@@ -2020,7 +1941,7 @@ H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
/* Check if creation order index available */
if(H5F_addr_defined(ainfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo.corder_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_corder = H5B2_open(f, dxpl_id, ainfo.corder_bt2_addr, NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Get creation order index B-tree size */
@@ -2043,8 +1964,6 @@ H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
done:
/* Release resources */
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(fheap && H5HF_close(fheap, dxpl_id) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "can't close fractal heap")
if(bt2_name && H5B2_close(bt2_name, dxpl_id) < 0)
diff --git a/src/H5Otest.c b/src/H5Otest.c
index a911469..1c149e3 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -159,7 +159,6 @@ htri_t
H5O_is_attr_empty_test(hid_t oid)
{
H5O_t *oh = NULL; /* Object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
H5O_ainfo_t ainfo; /* Attribute information for object */
htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
@@ -195,17 +194,11 @@ H5O_is_attr_empty_test(hid_t oid)
/* Check for any messages in object header */
HDassert(nattrs == 0);
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, H5AC_ind_dxpl_id, oh)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Set metadata tag in dxpl_id */
H5_BEGIN_TAG(H5AC_ind_dxpl_id, loc->addr, FAIL);
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Reset metadata tag in dxpl_id */
@@ -230,8 +223,6 @@ done:
/* Release resources */
if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
@@ -262,7 +253,6 @@ herr_t
H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
{
H5O_t *oh = NULL; /* Object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
H5O_ainfo_t ainfo; /* Attribute information for object */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -297,17 +287,11 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
/* Check for any messages in object header */
HDassert(obj_nattrs == 0);
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, H5AC_ind_dxpl_id, oh)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Set metadata tag in dxpl_id */
H5_BEGIN_TAG(H5AC_ind_dxpl_id, loc->addr, FAIL);
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Reset metadata tag in dxpl_id */
@@ -329,8 +313,6 @@ done:
/* Release resources */
if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
@@ -363,7 +345,6 @@ herr_t
H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
{
H5O_t *oh = NULL; /* Object header */
- H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
H5O_ainfo_t ainfo; /* Attribute information for object */
@@ -391,12 +372,6 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
HGOTO_ERROR_TAG(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
- /* Check for SWMR writes to the file */
- if(H5F_INTENT(loc->file) & H5F_ACC_SWMR_WRITE)
- /* Pin the attribute's object header proxy */
- if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy_oh(loc->file, H5AC_ind_dxpl_id, oh)))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTPIN, FAIL, "unable to pin object header proxy")
-
/* Check for 'dense' attribute storage file addresses being defined */
if(!H5F_addr_defined(ainfo.fheap_addr))
HGOTO_DONE_TAG(FAIL, FAIL)
@@ -404,7 +379,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
HGOTO_DONE_TAG(FAIL, FAIL)
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in name index */
@@ -414,7 +389,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
/* Check if there is a creation order index */
if(H5F_addr_defined(ainfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.corder_bt2_addr, NULL, oh_proxy)))
+ if(NULL == (bt2_corder = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.corder_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Retrieve # of records in creation order index */
@@ -433,8 +408,6 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
if(bt2_corder && H5B2_close(bt2_corder, H5AC_ind_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
- if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTUNPIN, FAIL, "unable to unpin attribute object header proxy")
if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
diff --git a/src/H5SM.c b/src/H5SM.c
index 908463e..4a562dd 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -500,7 +500,7 @@ H5SM_create_index(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id)
bt2_cparam.rrec_size = (uint32_t)H5SM_SOHM_ENTRY_SIZE(f);
bt2_cparam.split_percent = H5SM_B2_SPLIT_PERCENT;
bt2_cparam.merge_percent = H5SM_B2_MERGE_PERCENT;
- if(NULL == (bt2 = H5B2_create(f, dxpl_id, &bt2_cparam, f, NULL)))
+ if(NULL == (bt2 = H5B2_create(f, dxpl_id, &bt2_cparam, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTCREATE, FAIL, "B-tree creation failed for SOHM index")
/* Retrieve the v2 B-tree's address in the file */
@@ -600,7 +600,7 @@ H5SM_delete_index(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id,
HDassert(header->index_type == H5SM_BTREE);
/* Delete the B-tree. */
- if(H5B2_delete(f, dxpl_id, header->index_addr, f, NULL, NULL, NULL) < 0)
+ if(H5B2_delete(f, dxpl_id, header->index_addr, f, NULL, NULL) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete B-tree")
/* Revert to list unless B-trees can have zero records */
@@ -743,7 +743,7 @@ H5SM_convert_list_to_btree(H5F_t *f, H5SM_index_header_t *header,
bt2_cparam.rrec_size = (uint32_t)H5SM_SOHM_ENTRY_SIZE(f);
bt2_cparam.split_percent = H5SM_B2_SPLIT_PERCENT;
bt2_cparam.merge_percent = H5SM_B2_MERGE_PERCENT;
- if(NULL == (bt2 = H5B2_create(f, dxpl_id, &bt2_cparam, f, NULL)))
+ if(NULL == (bt2 = H5B2_create(f, dxpl_id, &bt2_cparam, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTCREATE, FAIL, "B-tree creation failed for SOHM index")
/* Retrieve the v2 B-tree's address in the file */
@@ -856,7 +856,7 @@ H5SM_convert_btree_to_list(H5F_t * f, H5SM_index_header_t * header, hid_t dxpl_i
/* Delete the B-tree and have messages copy themselves to the
* list as they're deleted
*/
- if(H5B2_delete(f, dxpl_id, btree_addr, f, NULL, H5SM_bt2_convert_to_list_op, list) < 0)
+ if(H5B2_delete(f, dxpl_id, btree_addr, f, H5SM_bt2_convert_to_list_op, list) < 0)
HGOTO_ERROR(H5E_SOHM, H5E_CANTDELETE, FAIL, "unable to delete B-tree")
done:
@@ -1339,7 +1339,7 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
HDassert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
if(defer) {
@@ -1467,7 +1467,7 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
/* Open the index v2 B-tree, if it isn't already */
if(NULL == bt2) {
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
} /* end if */
@@ -1836,7 +1836,7 @@ H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
HDassert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
/* If this returns failure, it means that the message wasn't found.
@@ -1866,7 +1866,7 @@ H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
else {
/* Open the index v2 B-tree, if it isn't already */
if(NULL == bt2) {
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
} /* end if */
@@ -2218,7 +2218,7 @@ H5SM_get_refcount(H5F_t *f, hid_t dxpl_id, unsigned type_id,
HDassert(header->index_type == H5SM_BTREE);
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, header->index_addr, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
/* Look up the message in the v2 B-tree */
@@ -2752,7 +2752,7 @@ H5SM_ih_size(H5F_t *f, hid_t dxpl_id, hsize_t *hdr_size, H5_ih_info_t *ih_info)
if(table->indexes[u].index_type == H5SM_BTREE) {
if(H5F_addr_defined(table->indexes[u].index_addr)) {
/* Open the index v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl_id, table->indexes[u].index_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl_id, table->indexes[u].index_addr, f)))
HGOTO_ERROR(H5E_SOHM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for SOHM index")
if(H5B2_size(bt2, dxpl_id, &(ih_info->index_size)) < 0)
diff --git a/test/btree2.c b/test/btree2.c
index c367779..7a2432c 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -138,7 +138,7 @@ create_btree(H5F_t *f, hid_t dxpl, const H5B2_create_t *cparam,
H5B2_t **bt2, haddr_t *bt2_addr)
{
/* Create the v2 B-tree & get its address */
- if(NULL == (*bt2 = H5B2_create(f, dxpl, cparam, f, NULL)))
+ if(NULL == (*bt2 = H5B2_create(f, dxpl, cparam, f)))
FAIL_STACK_ERROR
if(H5B2_get_addr(*bt2, bt2_addr/*out*/) < 0)
FAIL_STACK_ERROR
@@ -177,7 +177,7 @@ reopen_btree(H5F_t *f, hid_t dxpl, H5B2_t **bt2, haddr_t bt2_addr,
FAIL_STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (*bt2 = H5B2_open(f, dxpl, bt2_addr, f, NULL)))
+ if(NULL == (*bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
FAIL_STACK_ERROR
} /* end if */
@@ -2852,7 +2852,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
FAIL_STACK_ERROR
/* Check up on B-tree after re-open */
@@ -6547,7 +6547,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
} /* end for */
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
FAIL_STACK_ERROR
/* Remove all records */
@@ -6631,7 +6631,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
FAIL_STACK_ERROR
/* Remove all records */
@@ -6641,7 +6641,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
rrecord = HSIZET_MAX;
/* Remove random record */
- if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)rem_idx, NULL, remove_cb, &rrecord) < 0)
+ if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)rem_idx, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6719,14 +6719,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
FAIL_STACK_ERROR
/* Remove all records */
for(u = 0; u < INSERT_MANY; u++) {
/* Remove first record */
rrecord = HSIZET_MAX;
- if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)0, NULL, remove_cb, &rrecord) < 0)
+ if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)0, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6804,14 +6804,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f, NULL)))
+ if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
FAIL_STACK_ERROR
/* Remove all records */
for(u = 0; u < INSERT_MANY; u++) {
/* Remove last record */
rrecord = HSIZET_MAX;
- if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_DEC, (hsize_t)0, NULL, remove_cb, &rrecord) < 0)
+ if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_DEC, (hsize_t)0, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7165,7 +7165,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL, NULL) < 0)
+ if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -7222,7 +7222,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, H5P_DATASET_XFER_DEFAULT, bt2_addr, f, NULL, NULL, NULL) < 0)
+ if(H5B2_delete(f, H5P_DATASET_XFER_DEFAULT, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -7279,7 +7279,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL, NULL) < 0)
+ if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -7336,7 +7336,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL, NULL) < 0)
+ if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -7648,7 +7648,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
TEST_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2_2 = H5B2_open(f, dxpl, bt2_addr, f, NULL)))
+ if(NULL == (bt2_2 = H5B2_open(f, dxpl, bt2_addr, f)))
FAIL_STACK_ERROR
/* Close the second v2 B-tree wrapper */
@@ -7694,7 +7694,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
FAIL_STACK_ERROR
/* Open the B-tree through the second file handle */
- if(NULL == (bt2_2 = H5B2_open(f2, dxpl, bt2_addr, f2, NULL)))
+ if(NULL == (bt2_2 = H5B2_open(f2, dxpl, bt2_addr, f2)))
FAIL_STACK_ERROR
/* Close the extra file handles */