diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-22 22:07:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-22 22:07:35 (GMT) |
commit | 40c757d48b5fcdf0c217ae6392fb111b1a4acc91 (patch) | |
tree | 47e0f8d65be066d01c93ea7701d0632768aa8673 /src/H5Dint.c | |
parent | 683d60460a94869225094b4efc824258c5b0dcd3 (diff) | |
download | hdf5-40c757d48b5fcdf0c217ae6392fb111b1a4acc91.zip hdf5-40c757d48b5fcdf0c217ae6392fb111b1a4acc91.tar.gz hdf5-40c757d48b5fcdf0c217ae6392fb111b1a4acc91.tar.bz2 |
[svn-r18619] Description:
Bring r18618 from trunk to 1.8 branch:
Add new internal object header routines to query the header chunk that
a message is in, and to lock/unlock a message into a chunk (so it doesn't get
moved into another chunk during allocation/free events).
Also, move dataspace message to beginning of object header messages
added to a dataset's object header, so it can be locked into chunk #0 (when
performing SWMR operations).
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
(h5committested on trunk)
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r-- | src/H5Dint.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c index 2718aa6..cef551a 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -797,6 +797,12 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id) if(NULL == (oh = H5O_pin(oloc, dxpl_id))) HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header") + /* Update the datatype and dataspace header messages */ + if(H5S_append(file, dxpl_id, oh, dset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update dataspace header message") + if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_DTYPE_ID, H5O_MSG_FLAG_CONSTANT, 0, type) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update datatype header message") + /* Write new fill value message */ if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_FILL_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, fill_prop) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update new fill value header message") @@ -818,12 +824,6 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update old fill value header message") } /* end if */ - /* Update the datatype and dataspace header messages */ - if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_DTYPE_ID, H5O_MSG_FLAG_CONSTANT, 0, type) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update datatype header message") - if(H5S_append(file, dxpl_id, oh, dset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update dataspace header message") - /* Update/create the layout (and I/O pipeline & EFL) messages */ if(H5D_layout_oh_create(file, dxpl_id, oh, dset, dapl_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout/pline/efl header message") @@ -1044,7 +1044,6 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, HGOTO_ERROR(H5E_DATASET, H5E_CANTINC, NULL, "can't incr object ref. count") if(H5FO_insert(new_dset->oloc.file, new_dset->oloc.addr, new_dset->shared, TRUE) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, NULL, "can't insert dataset into list of open objects") - new_dset->shared->fo_count = 1; /* Success */ @@ -1357,7 +1356,7 @@ H5D_close(H5D_t *dataset) /* check args */ HDassert(dataset && dataset->oloc.file && dataset->shared); - HDassert(dataset->shared->fo_count >0); + HDassert(dataset->shared->fo_count > 0); /* Dump debugging info */ #ifdef H5D_CHUNK_DEBUG |