diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2012-12-14 17:33:18 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2012-12-14 17:33:18 (GMT) |
commit | ebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e (patch) | |
tree | f4d06a33ba454171d91874957def4cec18ea4924 /src/H5Dearray.c | |
parent | cec83436f2abbe52e15c76a53703d5a10b237470 (diff) | |
download | hdf5-ebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e.zip hdf5-ebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e.tar.gz hdf5-ebebe2dd934b0b0211ee3be28e5b2f9bb9f7f14e.tar.bz2 |
[svn-r23104] Purpose: Add object header flush dependencies
Description:
Added flush dependencies between object header chunks. Also added a new object
header proxy object, which is a child dependency of all object header chunks.
All objects which are child dependencies of an object header should set up a
flush dependency on the object header proxy, so the dependency applies to all
object header chunks.
Tested: ummon; jam (fails ph5diff -v, unrelated), koala, ostrich (h5committest)
Diffstat (limited to 'src/H5Dearray.c')
-rw-r--r-- | src/H5Dearray.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/H5Dearray.c b/src/H5Dearray.c index 215eef8..e05a17a 100644 --- a/src/H5Dearray.c +++ b/src/H5Dearray.c @@ -720,7 +720,7 @@ static herr_t H5D_earray_idx_depend(const H5D_chk_idx_info_t *idx_info) { H5O_loc_t oloc; /* Temporary object header location for dataset */ - H5O_t *oh = NULL; /* Dataset's object header */ + H5O_proxy_t *oh_proxy = NULL; /* Dataset's object header proxy */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -742,18 +742,18 @@ H5D_earray_idx_depend(const H5D_chk_idx_info_t *idx_info) oloc.file = idx_info->f; oloc.addr = idx_info->storage->u.earray.dset_ohdr_addr; - /* Pin the dataset's object header */ - if(NULL == (oh = H5O_pin(&oloc, idx_info->dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header") + /* Pin the dataset's object header proxy */ + if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&oloc, idx_info->dxpl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header proxy") /* Make the extensible array a child flush dependency of the dataset's object header */ - if(H5EA_depend((H5AC_info_t *)oh, idx_info->storage->u.earray.ea) < 0) + if(H5EA_depend((H5AC_info_t *)oh_proxy, idx_info->storage->u.earray.ea) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDEPEND, FAIL, "unable to create flush dependency on object header") done: - /* Unpin the dataset's object header */ - if(oh && H5O_unpin(oh) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header") + /* Unpin the dataset's object header proxy */ + if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header proxy") FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_earray_idx_depend() */ @@ -777,7 +777,7 @@ static herr_t H5D_earray_idx_undepend(const H5D_chk_idx_info_t *idx_info) { H5O_loc_t oloc; /* Temporary object header location for dataset */ - H5O_t *oh = NULL; /* Dataset's object header */ + H5O_proxy_t *oh_proxy = NULL; /* Dataset's object header proxy */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -799,18 +799,18 @@ H5D_earray_idx_undepend(const H5D_chk_idx_info_t *idx_info) oloc.file = idx_info->f; oloc.addr = idx_info->storage->u.earray.dset_ohdr_addr; - /* Pin the dataset's object header */ - if(NULL == (oh = H5O_pin(&oloc, idx_info->dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header") + /* Pin the dataset's object header proxy */ + if(NULL == (oh_proxy = H5O_pin_flush_dep_proxy(&oloc, idx_info->dxpl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header proxy") /* Remove the extensible array as a child flush dependency of the dataset's object header */ - if(H5EA_undepend((H5AC_info_t *)oh, idx_info->storage->u.earray.ea) < 0) + if(H5EA_undepend((H5AC_info_t *)oh_proxy, idx_info->storage->u.earray.ea) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTUNDEPEND, FAIL, "unable to remove flush dependency on object header") done: - /* Unpin the dataset's object header */ - if(oh && H5O_unpin(oh) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header") + /* Unpin the dataset's object header proxy */ + if(oh_proxy && H5O_unpin_flush_dep_proxy(oh_proxy) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header proxy") FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_earray_idx_undepend() */ |