diff options
author | Mike McGreevy <mamcgree@hdfgroup.org> | 2010-06-15 20:00:22 (GMT) |
---|---|---|
committer | Mike McGreevy <mamcgree@hdfgroup.org> | 2010-06-15 20:00:22 (GMT) |
commit | 60ecd356b2e24f125a5fd7abbdb57569af76f3ba (patch) | |
tree | d5f77e77b2f5d62529e98101ed7af65d0dcd3650 /src/H5Ocopy.c | |
parent | 84f6de6f28553171029bc61560eb869bc2207fa2 (diff) | |
download | hdf5-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/H5Ocopy.c')
-rw-r--r-- | src/H5Ocopy.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 08ee56b..94f7d9a 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -307,7 +307,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, size_t msghdr_size; herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT(H5O_copy_header_real) + FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_copy_header_real, dxpl_id, oloc_src->addr, FAIL) HDassert(oloc_src); HDassert(oloc_src->file); @@ -727,10 +727,20 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, oh_dst->nlink += (unsigned)addr_map->inc_ref_count; } /* end if */ + /* Set metadata tag for destination object's object header */ + H5_BEGIN_TAG(dxpl_id, oloc_dst->addr, FAIL); + /* Insert destination object header in cache */ if(H5AC_set(oloc_dst->file, dxpl_id, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header") oh_dst = NULL; + + /* Reset metadat tag */ + H5_END_TAG(FAIL); + + /* Retag all copied metadata to apply the destination object's tag */ + if(H5AC_retag_copied_metadata(oloc_dst->file, oloc_dst->addr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "unable to re-tag metadata entries") done: /* Free deleted array */ @@ -752,7 +762,7 @@ done: (obj_class->free_copy_file_udata)(udata); } /* end if */ - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL) } /* end H5O_copy_header_real() */ |