summaryrefslogtreecommitdiffstats
path: root/src/H5Gtraverse.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/H5Gtraverse.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/H5Gtraverse.c')
-rw-r--r--src/H5Gtraverse.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 0779c89..5b1f71c 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -946,11 +946,22 @@ H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traver
if(H5P_get(lapl, H5L_ACS_NLINKS_NAME, &nlinks) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get number of links")
} /* end else */
+
+ /* Set up invalid tag. This is a precautionary step only. Setting an invalid
+ tag here will ensure that no metadata accessed while doing the traversal
+ is given an improper tag, unless another one is specifically set up
+ first. This will ensure we're not accidentally tagging something we
+ shouldn't be during the traversal. Note that for best tagging assertion
+ coverage, setting H5C_DO_TAGGING_SANITY_CHECKS is advised. */
+ H5_BEGIN_TAG(dxpl_id, H5AC__INVALID_TAG, FAIL);
/* Go perform "real" traversal */
if(H5G_traverse_real(loc, name, target, &nlinks, op, op_data, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "internal path traversal failed")
+ /* Reset tag after traversal */
+ H5_END_TAG(FAIL);
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_traverse() */