diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-08-25 16:57:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-08-25 16:57:11 (GMT) |
commit | 859507f75757b890bf21dee43476a94bff526cb9 (patch) | |
tree | 38d60887a59840b05c7b13077c7e8164879738cf /src/H5FDcore.c | |
parent | b043ee1241522fc0b87787ead985f5d9f3b7af26 (diff) | |
download | hdf5-859507f75757b890bf21dee43476a94bff526cb9.zip hdf5-859507f75757b890bf21dee43476a94bff526cb9.tar.gz hdf5-859507f75757b890bf21dee43476a94bff526cb9.tar.bz2 |
[svn-r17421] Description:
Change internal mechanism for disabling EOA checks when the SWMR read
flag is set from setting the EOA to 'maxaddr' to setting a flag in the VFDs
that talk to storage, since setting the EOA to 'maxaddr' causes problems when
using the multi (and family, I think) VFDs.
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, check-vfd
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.8 (amazon) in debug mode
Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r-- | src/H5FDcore.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c index a08abdd..bd77199 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -53,6 +53,9 @@ typedef struct H5FD_core_t { hbool_t backing_store; /*write to file name on flush */ int fd; /*backing store file descriptor */ hbool_t dirty; /*changes not saved? */ + + /* Information from file open flags, for SWMR access */ + hbool_t swmr_read; /* Whether the file is open for SWMR read access */ } H5FD_core_t; /* Driver-specific file access properties */ @@ -464,6 +467,10 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, } } + /* Check for SWMR reader access */ + if(flags & H5F_ACC_SWMR_READ) + file->swmr_read = TRUE; + /* Set return value */ ret_value=(H5FD_t *)file; @@ -782,7 +789,13 @@ H5FD_core_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, hadd HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") if (REGION_OVERFLOW(addr, size)) HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") - if (addr + size > file->eoa) + /* If the file is open for SWMR read access, allow access to data past + * the end of the allocated space (the 'eoa'). This is done because the + * eoa stored in the file's superblock might be out of sync with the + * objects being written within the file by the application performing + * SWMR write operations. + */ + if((addr + size) > file->eoa) HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") /* Read the part which is before the EOF marker */ |