summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-07-31 03:36:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-07-31 03:36:04 (GMT)
commit92b1407a53c1de3a1ec2fdc19fc3f40b6b8c2483 (patch)
tree90767c436eed551800a0053c6b301d715c1f0763 /src/H5Dint.c
parentd96e6789c0be7046b1f191864efc02a2aeed645e (diff)
downloadhdf5-92b1407a53c1de3a1ec2fdc19fc3f40b6b8c2483.zip
hdf5-92b1407a53c1de3a1ec2fdc19fc3f40b6b8c2483.tar.gz
hdf5-92b1407a53c1de3a1ec2fdc19fc3f40b6b8c2483.tar.bz2
[svn-r17282] Description:
Bring r17281 from trunk to 1.8 branch: Further refactoring of the dataset layout information, to separate the storage information from the layout info. Tested on: Mac OS X/32 10.5.7 (amazon) debug & production h5committested on trunk
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 ")