diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2010-06-15 19:58:26 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2010-06-15 19:58:26 (GMT) |
commit | 9b4163af53d4d4c463a4a3b25c220ea9454f9651 (patch) | |
tree | cb9689131fdd3cdad9eeaba77d262a465557b1a1 /src/H5Otest.c | |
parent | ca7fc8e96a70b06b08e1db21040056ae17a51906 (diff) | |
download | hdf5-9b4163af53d4d4c463a4a3b25c220ea9454f9651.zip hdf5-9b4163af53d4d4c463a4a3b25c220ea9454f9651.tar.gz hdf5-9b4163af53d4d4c463a4a3b25c220ea9454f9651.tar.bz2 |
[svn-r19004] 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.c | 18 |
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() */ |