summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-02-14 15:57:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-02-14 15:57:48 (GMT)
commit5883b9d67d32b3319f1ef5634acaa697733c07ed (patch)
tree937bcf76b9471c93db037fa3e588c980a869b964 /src/H5D.c
parenta1c37b6eb8c01cd87a1c442da76172e51da05b79 (diff)
downloadhdf5-5883b9d67d32b3319f1ef5634acaa697733c07ed.zip
hdf5-5883b9d67d32b3319f1ef5634acaa697733c07ed.tar.gz
hdf5-5883b9d67d32b3319f1ef5634acaa697733c07ed.tar.bz2
[svn-r4965] Purpose:
Bug Fix Description: If a non-zero fill-value is used for a chunked dataset, any non-existent chunked read with an "all" selection (or a contiguous hyperslab selection) will return zero for those instead of the user's fill-value. Solution: Fixed I/O code to pass down fill-value to "optimized" I/O routines, so it will be available to fill the user's buffer with. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/H5D.c b/src/H5D.c
index bb4ba39..ca017c3 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -2238,11 +2238,13 @@ printf("%s: check 1.1, \n",FUNC);
#endif
if(H5P_get(dc_plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get pipeline");
+ if(H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve fill value");
if(H5P_get(dc_plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get external file list");
status = (sconv->read)(dataset->ent.file, &(dataset->layout), &pline,
- &efl, H5T_get_size(dataset->type), file_space,
- mem_space, dxpl_id, buf/*out*/, &must_convert);
+ &fill, &efl, H5T_get_size(dataset->type), file_space,
+ mem_space, dxpl_id, buf/*out*/, &must_convert);
/* Supports only no conversion, type or space, for now. */
if (status<0)
@@ -2725,11 +2727,14 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
#endif
if(H5P_get(dc_plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get pipeline");
+ if(H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve fill value");
if(H5P_get(dc_plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get external file list");
status = (sconv->write)(dataset->ent.file, &(dataset->layout), &pline,
- &efl, H5T_get_size(dataset->type), file_space,
- mem_space, dxpl_id, buf/*out*/, &must_convert);
+ &fill, &efl, H5T_get_size(dataset->type), file_space,
+ mem_space, dxpl_id, buf/*out*/, &must_convert);
+
/* Supports only no conversion, type or space, for now. */
if (status<0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "optimized write failed");