diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2011-10-05 15:52:12 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2011-10-05 15:52:12 (GMT) |
commit | 3f4b1f3b7402a83eade18efebaf8f6d0ee0c94a1 (patch) | |
tree | 82d811c89f78bf8de9d3a6222ca915e90bd191e8 /src/H5Oattribute.c | |
parent | 817bfb6499f266113fa8146b980e065a133b1374 (diff) | |
download | hdf5-3f4b1f3b7402a83eade18efebaf8f6d0ee0c94a1.zip hdf5-3f4b1f3b7402a83eade18efebaf8f6d0ee0c94a1.tar.gz hdf5-3f4b1f3b7402a83eade18efebaf8f6d0ee0c94a1.tar.bz2 |
[svn-r21476] The first part fix for bug HDFFV-7640: does not need to do H5O_move_msgs_forward() when writing attributes. h5committested.
Tests are checked into the performance suite.
Diffstat (limited to 'src/H5Oattribute.c')
-rw-r--r-- | src/H5Oattribute.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index cafc664..82d832b 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -173,7 +173,7 @@ static htri_t H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, */ static herr_t H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/) { H5O_iter_cvt_t *udata = (H5O_iter_cvt_t *)_udata; /* Operator user data */ H5A_t *attr = (H5A_t *)mesg->native; /* Pointer to attribute to insert */ @@ -199,7 +199,7 @@ H5O_attr_to_dense_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message") /* Indicate that the object header was modified */ - *oh_modified = TRUE; + *oh_modified = H5O_MODIFY_CONDENSE; done: FUNC_LEAVE_NOAPI(ret_value) @@ -419,7 +419,7 @@ done: */ static herr_t H5O_attr_open_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence, - hbool_t UNUSED *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED *oh_modified, void *_udata/*in,out*/) { H5O_iter_opn_t *udata = (H5O_iter_opn_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ @@ -846,7 +846,7 @@ done: */ static herr_t H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/) { H5O_iter_wrt_t *udata = (H5O_iter_wrt_t *)_udata; /* Operator user data */ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */ @@ -895,7 +895,7 @@ H5O_attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, HGOTO_ERROR(H5E_ATTR, H5E_CANTUPDATE, H5_ITER_ERROR, "unable to update attribute in shared storage") /* Indicate that the object header was modified */ - *oh_modified = TRUE; + *oh_modified = H5O_MODIFY; /* Indicate that the attribute was found */ udata->found = TRUE; @@ -1005,7 +1005,7 @@ done: */ static herr_t H5O_attr_rename_chk_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t UNUSED *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned UNUSED *oh_modified, void *_udata/*in,out*/) { H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ @@ -1051,7 +1051,7 @@ H5O_attr_rename_chk_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, */ static herr_t H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/) { H5O_iter_ren_t *udata = (H5O_iter_ren_t *)_udata; /* Operator user data */ H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */ @@ -1125,6 +1125,8 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, if(H5O_release_mesg(udata->f, udata->dxpl_id, oh, mesg, FALSE) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to release previous attribute") + *oh_modified = H5O_MODIFY_CONDENSE; + /* Append renamed attribute to object header */ /* (Don't let it become shared) */ if(H5O_msg_append_real(udata->f, udata->dxpl_id, oh, H5O_MSG_ATTR, (mesg->flags | H5O_MSG_FLAG_DONTSHARE), 0, attr) < 0) @@ -1139,7 +1141,7 @@ H5O_attr_rename_mod_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, } /* end else */ /* Indicate that the object header was modified */ - *oh_modified = TRUE; + *oh_modified |= H5O_MODIFY; /* Indicate that we found an existing attribute with the old name */ udata->found = TRUE; @@ -1511,7 +1513,7 @@ done: */ static herr_t H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned *oh_modified, void *_udata/*in,out*/) { H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ @@ -1530,7 +1532,7 @@ H5O_attr_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, H5_ITER_ERROR, "unable to convert into null message") /* Indicate that the object header was modified */ - *oh_modified = TRUE; + *oh_modified = H5O_MODIFY_CONDENSE; /* Indicate that this message is the attribute to be deleted */ udata->found = TRUE; @@ -1790,7 +1792,7 @@ done: */ static herr_t H5O_attr_exists_cb(H5O_t UNUSED *oh, H5O_mesg_t *mesg/*in,out*/, - unsigned UNUSED sequence, hbool_t UNUSED *oh_modified, void *_udata/*in,out*/) + unsigned UNUSED sequence, unsigned UNUSED *oh_modified, void *_udata/*in,out*/) { H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */ herr_t ret_value = H5_ITER_CONT; /* Return value */ |