summaryrefslogtreecommitdiffstats
path: root/src/H5Dmpio.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-02-27 17:01:00 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-02-27 17:01:00 (GMT)
commitef425724f749705c76b43c17f8da5d2aa066cb00 (patch)
treef9e36f23d301725e5d447dcc970c15d3997d2632 /src/H5Dmpio.c
parentd75cd486e1394f023f0cc5d8ddfec63f96b8763b (diff)
downloadhdf5-ef425724f749705c76b43c17f8da5d2aa066cb00.zip
hdf5-ef425724f749705c76b43c17f8da5d2aa066cb00.tar.gz
hdf5-ef425724f749705c76b43c17f8da5d2aa066cb00.tar.bz2
[svn-r16523] Purpose: Fix bugs related to H5Dset_extent and fill values
Description: In some situations it was possible for the fill value to not be written to parts of a chunked dataset, particularly when extending and/or shrinking. Prior to the fix for the chunk cache (1015) these bugs would have been exceedingly rare. Tested: jam, smirom, linew (h5committest)
Diffstat (limited to 'src/H5Dmpio.c')
-rw-r--r--src/H5Dmpio.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c
index 19be413..8757ba7 100644
--- a/src/H5Dmpio.c
+++ b/src/H5Dmpio.c
@@ -1209,6 +1209,7 @@ if(H5DEBUG(D))
void *chunk; /* Pointer to the data chunk in cache */
uint32_t accessed_bytes; /* Total accessed size in a chunk */
unsigned idx_hint = 0; /* Cache index hint */
+ htri_t cacheable; /* Whether the chunk is cacheable */
/* Switch to independent I/O */
if(last_xfer_mode != H5FD_MPIO_INDEPENDENT) {
@@ -1224,7 +1225,10 @@ if(H5DEBUG(D))
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
/* Load the chunk into cache and lock it. */
- if(H5D_chunk_cacheable(io_info)) {
+ if((cacheable = H5D_chunk_cacheable(io_info, udata.addr,
+ io_info->op_type == H5D_IO_OP_WRITE)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
+ if(cacheable) {
hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */
/* Compute # of bytes accessed in chunk */
@@ -1439,17 +1443,21 @@ if(H5DEBUG(D)) {
/* Independent I/O */
if(make_ind) {
- void *chunk; /* Pointer to the data chunk in cache */
+ void *chunk; /* Pointer to the data chunk in cache */
H5D_io_info_t *chk_io_info; /* Pointer to I/O info object for this chunk */
- uint32_t accessed_bytes = 0; /* Total accessed size in a chunk */
- unsigned idx_hint = 0; /* Cache index hint */
+ uint32_t accessed_bytes = 0; /* Total accessed size in a chunk */
+ unsigned idx_hint = 0; /* Cache index hint */
+ htri_t cacheable; /* Whether the chunk is cacheable */
/* Switch to independent I/O */
if(H5D_ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_INDEPENDENT) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to independent I/O")
/* Load the chunk into cache and lock it. */
- if(H5D_chunk_cacheable(io_info)) {
+ if((cacheable = H5D_chunk_cacheable(io_info, udata.addr,
+ io_info->op_type == H5D_IO_OP_WRITE)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
+ if(cacheable) {
hbool_t entire_chunk = TRUE; /* Whether whole chunk is selected */
/* Compute # of bytes accessed in chunk */