summaryrefslogtreecommitdiffstats
path: root/src/H5Oshared.h
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2011-10-14 00:03:09 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2011-10-14 00:03:09 (GMT)
commit363988bd77243b36c6324734b3a985c4fe07f650 (patch)
treefb23cc6accc028589d934362d56fad83a7e3b947 /src/H5Oshared.h
parent682a4f2b5d383d6abf6741a4a5a573f1c67e668e (diff)
downloadhdf5-363988bd77243b36c6324734b3a985c4fe07f650.zip
hdf5-363988bd77243b36c6324734b3a985c4fe07f650.tar.gz
hdf5-363988bd77243b36c6324734b3a985c4fe07f650.tar.bz2
[svn-r21557] Port r21556 to 1.8 branch
Purpose: Fix bug in H5Ocopy Description: H5Ocopy could get confused when copying a named datatype containing an attribute which used that named datatype as its datatype. This happened because H5Ocopy would recurse into the attribute's datatype before the object the attribute was in was fully copied (i.e. before the "post-copy" pass). Modified H5Ocopy to avoid recursing before the post-copy step in this case. Required many changes, including to how non-committed shared messages are copied. Tested: jam, koala, heiwa (h5committest); durandal
Diffstat (limited to 'src/H5Oshared.h')
-rw-r--r--src/H5Oshared.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5Oshared.h b/src/H5Oshared.h
index c0f5cd6..569889d 100644
--- a/src/H5Oshared.h
+++ b/src/H5Oshared.h
@@ -408,11 +408,14 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src,
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy native message to another file")
#endif /* H5O_SHARED_POST_COPY_FILE_REAL */
- /* update only shared message after the post copy */
- if(H5O_msg_is_shared(shared_dst->msg_type_id, mesg_dst)) {
+ /* Update only shared message after the post copy. Do not update committed
+ * messages as they have already been dealt with in the copy pass.
+ * (Move copy of target of committed messages to post copy? -NAF) */
+ if(shared_dst->type == H5O_SHARE_TYPE_SOHM
+ || shared_dst->type == H5O_SHARE_TYPE_HERE) {
if(H5O_shared_post_copy_file(oloc_dst->file, dxpl_id, cpy_info->oh_dst, mesg_dst) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to fix shared message in post copy")
- }
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)