diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-07 13:32:32 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-07 13:32:32 (GMT) |
commit | bdbdbb9f89db8d3a76fc71705cdbbd89124f4687 (patch) | |
tree | 53d16d2097c591d2c7094da6b8e2b23ef5663a0f /src/H5Dint.c | |
parent | b256db872d5ce4f81c6486b60c4e29e8122b67c2 (diff) | |
download | hdf5-bdbdbb9f89db8d3a76fc71705cdbbd89124f4687.zip hdf5-bdbdbb9f89db8d3a76fc71705cdbbd89124f4687.tar.gz hdf5-bdbdbb9f89db8d3a76fc71705cdbbd89124f4687.tar.bz2 |
[svn-r15801] Description:
Bring r15800 back from trunk:
- File free space branch changes through r15794
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) 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 production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r-- | src/H5Dint.c | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c index bab3038..aa91db5 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1484,7 +1484,7 @@ H5D_open_oid(H5D_t *dataset, hid_t dxpl_id) * This is important only for parallel I/O where the space must * be fully allocated before I/O can happen. */ - if((H5F_get_intent(dataset->oloc.file) & H5F_ACC_RDWR) + if((H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR) && ((dataset->shared->layout.type == H5D_CONTIGUOUS && !H5F_addr_defined(dataset->shared->layout.u.contig.addr)) || (dataset->shared->layout.type == H5D_CHUNKED && !H5F_addr_defined(dataset->shared->layout.u.chunk.addr))) && IS_H5FD_MPI(dataset->oloc.file)) { @@ -1730,33 +1730,6 @@ H5D_typeof(const H5D_t *dset) /*------------------------------------------------------------------------- - * Function: H5D_get_file - * - * Purpose: Returns the dataset's file pointer. - * - * Return: Success: Ptr to the dataset's file pointer. - * - * Failure: NULL - * - * Programmer: Quincey Koziol - * Thursday, October 22, 1998 - * - *------------------------------------------------------------------------- - */ -static H5F_t * -H5D_get_file(const H5D_t *dset) -{ - /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_get_file) - - HDassert(dset); - HDassert(dset->oloc.file); - - FUNC_LEAVE_NOAPI(dset->oloc.file) -} /* end H5D_get_file() */ - - -/*------------------------------------------------------------------------- * Function: H5D_alloc_storage * * Purpose: Allocate storage for the raw data of a dataset. @@ -2036,8 +2009,6 @@ done: haddr_t H5D_get_offset(const H5D_t *dset) { - haddr_t base_addr; - H5F_t *f; haddr_t ret_value = HADDR_UNDEF; FUNC_ENTER_NOAPI_NOINIT(H5D_get_offset) @@ -2052,15 +2023,9 @@ H5D_get_offset(const H5D_t *dset) case H5D_CONTIGUOUS: /* If dataspace hasn't been allocated or dataset is stored in * an external file, the value will be HADDR_UNDEF. */ - f = H5D_get_file(dset); - base_addr = H5F_get_base_addr(f); - - /* If there's user block in file, returns the absolute dataset offset - * from the beginning of file. */ - if(base_addr != HADDR_UNDEF) - ret_value = dset->shared->layout.u.contig.addr + base_addr; - else - ret_value = dset->shared->layout.u.contig.addr; + if(dset->shared->dcpl_cache.efl.nused == 0 || H5F_addr_defined(dset->shared->layout.u.contig.addr)) + /* Return the absolute dataset offset from the beginning of file. */ + ret_value = dset->shared->layout.u.contig.addr + H5F_BASE_ADDR(dset->oloc.file); break; default: @@ -2325,7 +2290,7 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) HDassert(size); /* Check if we are allowed to modify this file */ - if(0 == (H5F_get_intent(dset->oloc.file) & H5F_ACC_RDWR)) + if(0 == (H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR)) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file") /* Check if the filters in the DCPL will need to encode, and if so, can they? */ |