summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-10-21 22:23:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-10-21 22:23:39 (GMT)
commitf1c8df81fa128fc8bd4eeba7e24dc74de41dd419 (patch)
tree5d2b3cd1c89a48445547623696dc49c77ead808e
parent63ebb100e4aa4d2cc1117ca7ebc67a2f071119d1 (diff)
downloadhdf5-f1c8df81fa128fc8bd4eeba7e24dc74de41dd419.zip
hdf5-f1c8df81fa128fc8bd4eeba7e24dc74de41dd419.tar.gz
hdf5-f1c8df81fa128fc8bd4eeba7e24dc74de41dd419.tar.bz2
[svn-r19658] Description:
Fix incorrect placement of 'swmr_read' flag from write routine to read routine. :-/ Tested on: Mac OS X/32 10.6.4 (amazon) w/debug, production & parallel (h5committest not required on this branch)
-rw-r--r--src/H5FDsec2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 4c7b4ba..5322737 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -743,7 +743,13 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr)
if(REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr)
- 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(!file->swmr_read && (addr + size) > file->eoa)
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu", (unsigned long long)addr)
/* Seek to the correct location */
@@ -829,13 +835,7 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "addr undefined, addr = %llu", (unsigned long long)addr)
if(REGION_OVERFLOW(addr, size))
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu", (unsigned long long)addr, (unsigned long long)size)
- /* 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(!file->swmr_read && (addr + size) > file->eoa)
+ if((addr + size) > file->eoa)
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, FAIL, "addr overflow, addr = %llu, size = %llu, eoa = %llu", (unsigned long long)addr, (unsigned long long)size, (unsigned long long)file->eoa)
/* Seek to the correct location */