summaryrefslogtreecommitdiffstats
path: root/src/H5Otest.c
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2010-06-15 20:00:22 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2010-06-15 20:00:22 (GMT)
commit60ecd356b2e24f125a5fd7abbdb57569af76f3ba (patch)
treed5f77e77b2f5d62529e98101ed7af65d0dcd3650 /src/H5Otest.c
parent84f6de6f28553171029bc61560eb869bc2207fa2 (diff)
downloadhdf5-60ecd356b2e24f125a5fd7abbdb57569af76f3ba.zip
hdf5-60ecd356b2e24f125a5fd7abbdb57569af76f3ba.tar.gz
hdf5-60ecd356b2e24f125a5fd7abbdb57569af76f3ba.tar.bz2
[svn-r19005] Purpose:
Commit metadata tagging framework. Description: This check-in contains a new framework whose goal is to apply a tag value to each new entry in the metadata cache as it is created. This tag value is such that it relates each piece of metadata to the HDF5 object that it belongs to (dataset, group, et cetera). This changeset includes the framework that applies the tags as well as a suite of tests to verify correct tag application, though does not yet make use of the tag values to flush/evict individual objects. Please refer to the "flush/evict individual objects" RFC for further discussion of these changes. Tested: jam, amani, linew (h5committest) liberty, abe, blue print
Diffstat (limited to 'src/H5Otest.c')
-rw-r--r--src/H5Otest.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 77b7540..557ac9e 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -193,11 +193,17 @@ H5O_is_attr_empty_test(hid_t oid)
if(H5F_addr_defined(ainfo.fheap_addr)) {
/* Check for any messages in object header */
HDassert(nattrs == 0);
+
+ /* 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)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
+ /* Reset metadata tag in dxpl_id */
+ H5_END_TAG(FAIL);
+
/* Retrieve # of records in name index */
if(H5B2_get_nrec(bt2_name, &nattrs) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from name index")
@@ -281,10 +287,16 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
/* Check for any messages in object header */
HDassert(obj_nattrs == 0);
+ /* 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)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
+ /* Reset metadata tag in dxpl_id */
+ H5_END_TAG(FAIL);
+
/* Retrieve # of records in name index */
if(H5B2_get_nrec(bt2_name, &obj_nattrs) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOUNT, FAIL, "unable to retrieve # of records from name index")
@@ -345,6 +357,9 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
if(NULL == (loc = H5O_get_loc(oid)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
+ /* Set metadata tag in dxpl_id */
+ H5_BEGIN_TAG(H5AC_ind_dxpl_id, loc->addr, FAIL);
+
/* Get the object header */
if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC_READ)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
@@ -393,6 +408,9 @@ done:
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")
+ /* Reset metadata tag in dxpl_id */
+ H5_END_TAG(FAIL);
+
FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_attr_dense_info_test() */