summaryrefslogtreecommitdiffstats
path: root/src/H5Oshared.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-04-06 02:57:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-04-06 02:57:06 (GMT)
commitd5a62239587f7cc5de301fa5c6b0919807689818 (patch)
tree40a36d60dd8ac2d10a45886869cc53d3fdc9181e /src/H5Oshared.c
parentebf3d99b955c705217227fb7f8ae4405e941399a (diff)
downloadhdf5-d5a62239587f7cc5de301fa5c6b0919807689818.zip
hdf5-d5a62239587f7cc5de301fa5c6b0919807689818.tar.gz
hdf5-d5a62239587f7cc5de301fa5c6b0919807689818.tar.bz2
[svn-r22254] Description:
Bring r22085:22251 from trunk to revise_chunks branch. Also tackle some testing issues in test/objcopy.c test and clean up some warnings. Tested on: FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (ostrich) w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-ia64 2.6 (ember) w/Intel compilers, w/paralle, C++ & FORTRAN, in production mode Mac OS X/32 10.7.3 (amazon) in debug mode Mac OS X/32 10.7.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode Mac OS X/32 10.7.3 (amazon) w/parallel, in debug mode
Diffstat (limited to 'src/H5Oshared.c')
-rw-r--r--src/H5Oshared.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 4cc30e8..c29e2c7 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 */
@@ -621,16 +621,18 @@ H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
/* Set copied metadata tag */
H5_BEGIN_TAG(dxpl_id, H5AC__COPIED_TAG, FAIL);
- 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")
/* Reset metadata tag */
H5_END_TAG(FAIL);
} /* 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)
@@ -657,8 +659,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 */
@@ -675,6 +677,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;
@@ -688,7 +691,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: