summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-07-31 03:08:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-07-31 03:08:12 (GMT)
commit0eb775f3583f05b41fdab359d53bbc70c9a13db0 (patch)
tree0bb23f0ad2a9e5f6bf620b991d655bd380c979a7 /src/H5Dint.c
parent361586a90e00fb4f13fcb85dff669f13ff872b94 (diff)
downloadhdf5-0eb775f3583f05b41fdab359d53bbc70c9a13db0.zip
hdf5-0eb775f3583f05b41fdab359d53bbc70c9a13db0.tar.gz
hdf5-0eb775f3583f05b41fdab359d53bbc70c9a13db0.tar.bz2
[svn-r17281] Description:
Further refactoring of the dataset layout information, to separate the storage information from the layout info. 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/H5Dint.c')
-rw-r--r--src/H5Dint.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index bfa4d02..7bdf75d 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1299,7 +1299,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dapl_id, hid_t dxpl_id)
* be fully allocated before I/O can happen.
*/
if((H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR)
- && !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout)
+ && !(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)
&& IS_H5FD_MPI(dataset->oloc.file)) {
if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_OPEN, FALSE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize file storage")
@@ -1580,9 +1580,9 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
switch(layout->type) {
case H5D_CONTIGUOUS:
- if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout)) {
+ if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
/* Reserve space in the file for the entire array */
- if(H5D_contig_alloc(f, dxpl_id, layout/*out*/) < 0)
+ if(H5D_contig_alloc(f, dxpl_id, &layout->storage.u.contig/*out*/) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize contiguous storage")
/* Indicate that we set the storage addr */
@@ -1594,7 +1594,7 @@ H5D_alloc_storage(H5D_t *dset/*in,out*/, hid_t dxpl_id, H5D_time_alloc_t time_al
break;
case H5D_CHUNKED:
- if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout)) {
+ if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
/* Create the root of the B-tree that describes chunked storage */
if(H5D_chunk_create(dset /*in,out*/, dxpl_id) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
@@ -1773,7 +1773,7 @@ H5D_get_storage_size(H5D_t *dset, hid_t dxpl_id)
switch(dset->shared->layout.type) {
case H5D_CHUNKED:
- if((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout)) {
+ if((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
if(H5D_chunk_allocated(dset, dxpl_id, &ret_value) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't retrieve chunked dataset allocated size")
} /* end if */
@@ -1783,7 +1783,7 @@ H5D_get_storage_size(H5D_t *dset, hid_t dxpl_id)
case H5D_CONTIGUOUS:
/* Datasets which are not allocated yet are using no space on disk */
- if((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout))
+ if((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage))
ret_value = dset->shared->layout.storage.u.contig.size;
else
ret_value = 0;
@@ -2164,7 +2164,7 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
*-------------------------------------------------------------------------
*/
if(shrink && H5D_CHUNKED == dset->shared->layout.type &&
- (*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout)) {
+ (*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
/* Remove excess chunks */
if(H5D_chunk_prune_by_extent(dset, dxpl_id, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to remove chunks ")