summaryrefslogtreecommitdiffstats
path: root/src/H5Doh.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-07-02 21:10:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-07-02 21:10:35 (GMT)
commit47e4e67e3cd11f99ac417613eed9f47e65f55468 (patch)
treec58101c6d80e27b27255d6800a0f105999d758d6 /src/H5Doh.c
parentc4fc0074ae04fc2d0b9b0b92a6a214af612e8194 (diff)
downloadhdf5-47e4e67e3cd11f99ac417613eed9f47e65f55468.zip
hdf5-47e4e67e3cd11f99ac417613eed9f47e65f55468.tar.gz
hdf5-47e4e67e3cd11f99ac417613eed9f47e65f55468.tar.bz2
[svn-r17146] Description:
Bring a bunch of misc. improvements & tweaks from the revise_chunks branch back to the trunk, so that future merges won't be so painful. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.7 (amazon) in debug mode Mac OS X/32 10.5.7 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Doh.c')
-rw-r--r--src/H5Doh.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/H5Doh.c b/src/H5Doh.c
index 039f055..93fd21a 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -373,12 +373,26 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
/* Get the layout message from the object header */
if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find LAYOUT message")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message")
/* Check for chunked dataset storage */
- if(layout.type == H5D_CHUNKED && H5D_chunk_is_space_alloc(&layout))
- if(H5D_chunk_bh_info(f, dxpl_id, &layout, &(bh_info->index_size)) < 0)
+ if(layout.type == H5D_CHUNKED && H5D_chunk_is_space_alloc(&layout)) {
+ H5O_pline_t pline; /* I/O pipeline message */
+ htri_t exists; /* Flag if header message of interest exists */
+
+ /* Check for I/O pipeline message */
+ if((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header")
+ else if(exists) {
+ if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_PLINE_ID, &pline))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find I/O pipeline message")
+ } /* end else if */
+ else
+ HDmemset(&pline, 0, sizeof(pline));
+
+ if(H5D_chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info")
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)