diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-03-31 04:40:52 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-03-31 04:40:52 (GMT) |
commit | 0e573bd2406448e9380d15d17c41bb1d8b5300e7 (patch) | |
tree | 05e65759f44f60fe7b39067ac220654b53a20cff /src/H5Oshared.c | |
parent | d73d19fb0a4df62b8d0dcaa08e59f04904467c0a (diff) | |
download | hdf5-0e573bd2406448e9380d15d17c41bb1d8b5300e7.zip hdf5-0e573bd2406448e9380d15d17c41bb1d8b5300e7.tar.gz hdf5-0e573bd2406448e9380d15d17c41bb1d8b5300e7.tar.bz2 |
[svn-r22215] Description:
Bring r22171 from trunk to 1.8 branch:
Bring "merge committed datatypes during H5Ocopy" feature from branch to
trunk. (Also has some minor bugfixes with it)
Tested on:
Mac OSX/64 10.7.3 (amazon) w/debug
(h5committest coming up)
Diffstat (limited to 'src/H5Oshared.c')
-rw-r--r-- | src/H5Oshared.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c index 45c0a7d..8a18c4a 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -589,8 +589,8 @@ done: herr_t H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst, const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst, - hbool_t UNUSED *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata, - hid_t dxpl_id) + hbool_t UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, + void UNUSED *udata, hid_t dxpl_id) { const H5O_shared_t *shared_src = (const H5O_shared_t *)_native_src; /* Alias to shared info in native source */ H5O_shared_t *shared_dst = (H5O_shared_t *)_native_dst; /* Alias to shared info in native destination message */ @@ -618,13 +618,15 @@ H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst, */ if(shared_src->type != H5O_SHARE_TYPE_COMMITTED) { /* Simulate trying to share new message in the destination file. */ - if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, mesg_type->id, _native_dst, NULL) < 0) + if(H5SM_try_share(file_dst, dxpl_id, NULL, H5SM_DEFER, mesg_type->id, _native_dst, mesg_flags) < 0) HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to determine if message should be shared") } /* end if */ - else + else { /* Mark the message as committed - as it will be committed in post copy */ H5O_UPDATE_SHARED(shared_dst, H5O_SHARE_TYPE_COMMITTED, file_dst, mesg_type->id, 0, HADDR_UNDEF) + *mesg_flags |= H5O_MSG_FLAG_SHARED; + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -651,8 +653,8 @@ done: */ herr_t H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, - const H5O_shared_t *shared_src, H5O_shared_t *shared_dst, hid_t dxpl_id, - H5O_copy_t *cpy_info) + const H5O_shared_t *shared_src, H5O_shared_t *shared_dst, + unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info) { herr_t ret_value = SUCCEED; /* Return value */ @@ -669,6 +671,7 @@ H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, H5O_loc_t src_oloc; /* Copy the shared object from source to destination */ + H5O_loc_reset(&dst_oloc); dst_oloc.file = f; src_oloc.file = shared_src->file; src_oloc.addr = shared_src->u.loc.oh_addr; @@ -682,7 +685,7 @@ H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, else /* Share the message */ if(H5SM_try_share(f, dxpl_id, NULL, H5SM_WAS_DEFERRED, mesg_type->id, - shared_dst, NULL) < 0) + shared_dst, mesg_flags) < 0) HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message") done: |