diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2012-03-29 16:50:49 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2012-03-29 16:50:49 (GMT) |
commit | bd26865f7d69fed1e926e6a3ec5f8653ae0eb6da (patch) | |
tree | a789868314e2af8477afe93fbd8a9849cffa6d0a /src | |
parent | 5a722a152a68b27151bb96553b0b9cfbbc5cda4c (diff) | |
download | hdf5-bd26865f7d69fed1e926e6a3ec5f8653ae0eb6da.zip hdf5-bd26865f7d69fed1e926e6a3ec5f8653ae0eb6da.tar.gz hdf5-bd26865f7d69fed1e926e6a3ec5f8653ae0eb6da.tar.bz2 |
[svn-r22187] Purpose: Fix dsets failure on ostrich
Description:
The "support" and "unsupport" chunk index callbacks took H5D_chunk_common_ud_t
udata pointers, which seems reasonable because the udata is only needed to
locate the chunk, and does not need to return anything to the callers. However,
for v1 b-trees, H5D_btree_found must be called in order to locate the chunk, and
this function assumes that the udata is an H5D_chunk_ud_t and writes to fields
that are not in H5D_chunk_common_ud_t. Modified the support and unsupport
callbacks to take H5D_chunk_ud_t.
Note: h5watch still fails
Tested: durandal, ostrich
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Dbtree.c | 10 | ||||
-rw-r--r-- | src/H5Dearray.c | 16 | ||||
-rw-r--r-- | src/H5Dpkg.h | 4 | ||||
-rw-r--r-- | src/H5Dproxy.c | 13 |
4 files changed, 23 insertions, 20 deletions
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 8202408..eb6b2ac 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -151,9 +151,9 @@ static herr_t H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size); static herr_t H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr); static herr_t H5D_btree_idx_support(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry); + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry); static herr_t H5D_btree_idx_unsupport(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry); + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry); static herr_t H5D_btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream); static herr_t H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info); @@ -1614,8 +1614,8 @@ H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr) *------------------------------------------------------------------------- */ static htri_t -H5D_btree_idx_support(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry) +H5D_btree_idx_support(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata, + H5AC_info_t *child_entry) { H5O_loc_t oloc; /* Temporary object header location for dataset */ H5O_t *oh = NULL; /* Dataset's object header */ @@ -1671,7 +1671,7 @@ done: */ static herr_t H5D_btree_idx_unsupport(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry) + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry) { H5O_loc_t oloc; /* Temporary object header location for dataset */ H5O_t *oh = NULL; /* Dataset's object header */ diff --git a/src/H5Dearray.c b/src/H5Dearray.c index 40c5c5f..215eef8 100644 --- a/src/H5Dearray.c +++ b/src/H5Dearray.c @@ -128,9 +128,9 @@ static herr_t H5D_earray_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *size); static herr_t H5D_earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr); static herr_t H5D_earray_idx_support(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry); + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry); static herr_t H5D_earray_idx_unsupport(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry); + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry); static herr_t H5D_earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream); static herr_t H5D_earray_idx_dest(const H5D_chk_idx_info_t *idx_info); @@ -1886,7 +1886,7 @@ H5D_earray_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr) */ static htri_t H5D_earray_idx_support(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry) + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry) { H5EA_t *ea; /* Pointer to extensible array structure */ hsize_t idx; /* Array index of chunk */ @@ -1917,7 +1917,7 @@ H5D_earray_idx_support(const H5D_chk_idx_info_t *idx_info, unsigned ndims = (idx_info->layout->ndims - 1); /* Number of dimensions */ /* Set up the swizzled chunk coordinates */ - HDmemcpy(swizzled_coords, udata->offset, ndims * sizeof(udata->offset[0])); + HDmemcpy(swizzled_coords, udata->common.offset, ndims * sizeof(udata->common.offset[0])); H5V_swizzle_coords(hsize_t, swizzled_coords, idx_info->layout->u.earray.unlim_dim); /* Calculate the index of this chunk */ @@ -1926,7 +1926,7 @@ H5D_earray_idx_support(const H5D_chk_idx_info_t *idx_info, } /* end if */ else { /* Calculate the index of this chunk */ - if(H5V_chunk_index((idx_info->layout->ndims - 1), udata->offset, idx_info->layout->dim, idx_info->layout->down_chunks, &idx) < 0) + if(H5V_chunk_index((idx_info->layout->ndims - 1), udata->common.offset, idx_info->layout->dim, idx_info->layout->down_chunks, &idx) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") } /* end else */ @@ -1956,7 +1956,7 @@ done: */ static herr_t H5D_earray_idx_unsupport(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry) + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry) { H5EA_t *ea; /* Pointer to extensible array structure */ hsize_t idx; /* Array index of chunk */ @@ -1987,7 +1987,7 @@ H5D_earray_idx_unsupport(const H5D_chk_idx_info_t *idx_info, unsigned ndims = (idx_info->layout->ndims - 1); /* Number of dimensions */ /* Set up the swizzled chunk coordinates */ - HDmemcpy(swizzled_coords, udata->offset, ndims * sizeof(udata->offset[0])); + HDmemcpy(swizzled_coords, udata->common.offset, ndims * sizeof(udata->common.offset[0])); H5V_swizzle_coords(hsize_t, swizzled_coords, idx_info->layout->u.earray.unlim_dim); @@ -1997,7 +1997,7 @@ H5D_earray_idx_unsupport(const H5D_chk_idx_info_t *idx_info, } /* end if */ else { /* Calculate the index of this chunk */ - if(H5V_chunk_index((idx_info->layout->ndims - 1), udata->offset, idx_info->layout->dim, idx_info->layout->down_chunks, &idx) < 0) + if(H5V_chunk_index((idx_info->layout->ndims - 1), udata->common.offset, idx_info->layout->dim, idx_info->layout->down_chunks, &idx) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") } /* end else */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index faafd4d..b71ad6a 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -323,9 +323,9 @@ typedef herr_t (*H5D_chunk_size_func_t)(const H5D_chk_idx_info_t *idx_info, hsize_t *idx_size); typedef herr_t (*H5D_chunk_reset_func_t)(H5O_storage_chunk_t *storage, hbool_t reset_addr); typedef htri_t (*H5D_chunk_support_func_t)(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry); + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry); typedef herr_t (*H5D_chunk_unsupport_func_t)(const H5D_chk_idx_info_t *idx_info, - H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry); + H5D_chunk_ud_t *udata, H5AC_info_t *child_entry); typedef herr_t (*H5D_chunk_dump_func_t)(const H5O_storage_chunk_t *storage, FILE *stream); typedef herr_t (*H5D_chunk_dest_func_t)(const H5D_chk_idx_info_t *idx_info); diff --git a/src/H5Dproxy.c b/src/H5Dproxy.c index 7f3a566..3cf0146 100644 --- a/src/H5Dproxy.c +++ b/src/H5Dproxy.c @@ -397,7 +397,7 @@ herr_t H5D_chunk_proxy_remove(const H5D_t *dset, hid_t dxpl_id, H5D_rdcc_ent_t *ent) { H5D_chk_idx_info_t idx_info; /* Chunked index info */ - H5D_chunk_common_ud_t udata; /* User-data for chunk */ + H5D_chunk_ud_t udata; /* User-data for chunk */ H5D_chunk_proxy_t *proxy = NULL; /* Chunk proxy */ herr_t ret_value = SUCCEED; /* Return value */ @@ -422,10 +422,13 @@ HDfprintf(stderr, "%s: ent->proxy_addr = %a\n", FUNC, ent->proxy_addr); idx_info.storage = &(dset->shared->layout.storage.u.chunk); /* Compose user-data for chunk */ - udata.layout = &(dset->shared->layout.u.chunk); - udata.storage = &(dset->shared->layout.storage.u.chunk); - udata.offset = ent->offset; - udata.rdcc = &(dset->shared->cache.chunk); + udata.common.layout = &(dset->shared->layout.u.chunk); + udata.common.storage = &(dset->shared->layout.storage.u.chunk); + udata.common.offset = ent->offset; + udata.common.rdcc = &(dset->shared->cache.chunk); + /* Non-"common" data is not actually needed, except to provide a space to + * store this information if it is to be filled in as a side-effect of the + * unsupport callback (i.e. in H5D_btree_found) */ /* Remove flush dependency between the proxy (as the child) and the * metadata object in the index (as the parent). |