summaryrefslogtreecommitdiffstats
path: root/src/H5Fio.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-03-09 19:06:10 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-03-09 19:06:10 (GMT)
commit3f2e3659c2069a466aae11266b789c72fe76d8a5 (patch)
tree5b726daf0471c57815fa3de863116c4b2c63f274 /src/H5Fio.c
parent1818420acd49b7f7954e67b977be460d429837bd (diff)
downloadhdf5-3f2e3659c2069a466aae11266b789c72fe76d8a5.zip
hdf5-3f2e3659c2069a466aae11266b789c72fe76d8a5.tar.gz
hdf5-3f2e3659c2069a466aae11266b789c72fe76d8a5.tar.bz2
Stop changing the type of global-heap storage to raw data before accessing the
page buffer. Now variable-length (VL) data such as VL strings work with VFD SWMR. This change also makes the library more consistent in its treatment of global-heap storage, since it's always been allocated as metadata, not raw data.
Diffstat (limited to 'src/H5Fio.c')
-rw-r--r--src/H5Fio.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 947c263..592d5f1 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -89,7 +89,6 @@
herr_t
H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/)
{
- H5FD_mem_t map_type; /* Mapped memory type */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -103,11 +102,8 @@ H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t
if(H5F_addr_le(f_sh->tmp_addr, (addr + size)))
HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
- /* Treat global heap as raw data */
- map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
-
/* Pass through page buffer layer */
- if(H5PB_read(f_sh, map_type, addr, size, buf) < 0)
+ if(H5PB_read(f_sh, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "read through page buffer failed")
done:
@@ -145,7 +141,6 @@ H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*
herr_t
H5F_shared_block_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf)
{
- H5FD_mem_t map_type; /* Mapped memory type */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -160,11 +155,8 @@ H5F_shared_block_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t
if(H5F_addr_le(f_sh->tmp_addr, (addr + size)))
HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
- /* Treat global heap as raw data */
- map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
-
/* Pass through page buffer layer */
- if(H5PB_write(f_sh, map_type, addr, size, buf) < 0)
+ if(H5PB_write(f_sh, type, addr, size, buf) < 0)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write through page buffer failed")
done: