summaryrefslogtreecommitdiffstats
path: root/src/H5Fio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-06-08 23:16:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-06-08 23:16:19 (GMT)
commit4fa1b3c1aa6ee23977c095ceaab7aca4ce2b9edf (patch)
tree9dc15e50454dbb7e6558fa579074d3f1fd589fc8 /src/H5Fio.c
parentc87c334876247c27b1ca3bb670641ccff48b51d9 (diff)
downloadhdf5-4fa1b3c1aa6ee23977c095ceaab7aca4ce2b9edf.zip
hdf5-4fa1b3c1aa6ee23977c095ceaab7aca4ce2b9edf.tar.gz
hdf5-4fa1b3c1aa6ee23977c095ceaab7aca4ce2b9edf.tar.bz2
[svn-r17017] Description:
Rework the "proxy address" code to be more general and implement a better "temporary address" feature, that will allow for metadata allocations to be deferred to when the metadata is actually flushed to the file. 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/H5Fio.c')
-rw-r--r--src/H5Fio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 1081a27..407f950 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -104,6 +104,10 @@ H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
HDassert(f->shared);
HDassert(buf);
+ /* Check for attempting I/O on 'temporary' file address */
+ if(H5F_addr_le(f->shared->tmp_addr, (addr + size)))
+ HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
+
/* Check if this I/O can be satisfied by the metadata accumulator */
if((accumulated = H5F_accum_read(f, dxpl_id, type, addr, size, buf)) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "read from metadata accumulator failed")
@@ -150,6 +154,10 @@ HDfprintf(stderr, "%s: write to addr = %a, size = %Zu\n", FUNC, addr, size);
HDassert(f->intent & H5F_ACC_RDWR);
HDassert(buf);
+ /* Check for attempting I/O on 'temporary' file address */
+ if(H5F_addr_le(f->shared->tmp_addr, (addr + size)))
+ HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
+
/* Check for accumulating metadata */
if((accumulated = H5F_accum_write(f, dxpl_id, type, addr, size, buf)) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write to metadata accumulator failed")