summaryrefslogtreecommitdiffstats
path: root/src/H5Omessage.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-09 04:24:00 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-09 04:24:00 (GMT)
commitee6036e0321ecbb5c4b87fa4fd01942360fbbd18 (patch)
tree7db1dc244e4d9e43d9bf593be7670afcf9d58477 /src/H5Omessage.c
parent2104bd1e0a85c01a871910803883637f48ac2573 (diff)
downloadhdf5-ee6036e0321ecbb5c4b87fa4fd01942360fbbd18.zip
hdf5-ee6036e0321ecbb5c4b87fa4fd01942360fbbd18.tar.gz
hdf5-ee6036e0321ecbb5c4b87fa4fd01942360fbbd18.tar.bz2
[svn-r13123] Description:
Fix object header message code to respect the "do not share" flag, so that committed datatypes used in attributes are handled properly. Add more tests for atttributes, checking that they handle shared attributes in compact & dense storage w/committed datatypes. Tested on: FreeBSD/32 6.1 (duty)
Diffstat (limited to 'src/H5Omessage.c')
-rw-r--r--src/H5Omessage.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index c7979d4..79631fe 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -215,11 +215,13 @@ H5O_msg_append(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id,
HDassert(oh_flags_ptr);
/* Should this message be written as a SOHM? */
- if((shared_mesg = H5SM_try_share(f, dxpl_id, type_id, mesg)) > 0)
- /* Mark the message as shared */
- mesg_flags |= H5O_MSG_FLAG_SHARED;
- else if(shared_mesg < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
+ if(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE)) {
+ if((shared_mesg = H5SM_try_share(f, dxpl_id, type_id, mesg)) > 0)
+ /* Mark the message as shared */
+ mesg_flags |= H5O_MSG_FLAG_SHARED;
+ else if(shared_mesg < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "error determining if message should be shared")
+ } /* end if */
/* Append new message to object header */
if(H5O_msg_append_real(f, dxpl_id, oh, type, mesg_flags, update_flags, mesg, oh_flags_ptr) < 0)
@@ -335,11 +337,13 @@ H5O_msg_write(H5O_loc_t *loc, unsigned type_id, unsigned overwrite,
HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Should this message be written as a SOHM? */
- if((shared_mesg = H5SM_try_share(loc->file, dxpl_id, type_id, mesg)) > 0)
- /* Mark the message as shared */
- mesg_flags |= H5O_MSG_FLAG_SHARED;
- else if(shared_mesg < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message")
+ if(!(mesg_flags & H5O_MSG_FLAG_DONTSHARE)) {
+ if((shared_mesg = H5SM_try_share(loc->file, dxpl_id, type_id, mesg)) > 0)
+ /* Mark the message as shared */
+ mesg_flags |= H5O_MSG_FLAG_SHARED;
+ else if(shared_mesg < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "error while trying to share message")
+ } /* end if */
/* Protect the object header */
if(NULL == (oh = H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, NULL, NULL, H5AC_WRITE)))