summaryrefslogtreecommitdiffstats
path: root/src/H5Dchunk.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2010-09-09 18:15:36 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2010-09-09 18:15:36 (GMT)
commit073eb187d6589e5741065038d3f4ca3f634381d9 (patch)
treec8907e2e4ea22075a85b8ea8d264a53d10c681c3 /src/H5Dchunk.c
parentbed127641399ec6c6e1479b7c394fd3a4eb56438 (diff)
downloadhdf5-073eb187d6589e5741065038d3f4ca3f634381d9.zip
hdf5-073eb187d6589e5741065038d3f4ca3f634381d9.tar.gz
hdf5-073eb187d6589e5741065038d3f4ca3f634381d9.tar.bz2
[svn-r19363] When mandatory filter failed to write data chunks, the dataset
couldn't close (bug 1260). The fix releases all resources and closes the dataset but returns a failure. Tested with h5committest - jam, heiwa, amani.
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r--src/H5Dchunk.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 0ccffa8..8bcd359 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -825,7 +825,7 @@ done:
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
} /* end if */
if(f_tid!=(-1)) {
- if(H5I_dec_ref(f_tid, FALSE) < 0)
+ if(H5I_dec_ref(f_tid, FALSE, FALSE) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
} /* end if */
if(file_space_normalized) {
@@ -2488,7 +2488,7 @@ H5D_chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t *
if(flush) {
/* Flush */
if(H5D_chunk_flush_entry(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0)
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer")
+ HDONE_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "cannot flush indexed storage buffer")
} /* end if */
else {
/* Don't flush, just free chunk */
@@ -4634,16 +4634,16 @@ H5D_chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
bkg = udata.bkg;
done:
- if(sid_buf > 0 && H5I_dec_ref(sid_buf, FALSE) < 0)
+ if(sid_buf > 0 && H5I_dec_ref(sid_buf, FALSE, FALSE) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't decrement temporary dataspace ID")
if(tid_src > 0)
- if(H5I_dec_ref(tid_src, FALSE) < 0)
+ if(H5I_dec_ref(tid_src, FALSE, FALSE) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
if(tid_dst > 0)
- if(H5I_dec_ref(tid_dst, FALSE) < 0)
+ if(H5I_dec_ref(tid_dst, FALSE, FALSE) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
if(tid_mem > 0)
- if(H5I_dec_ref(tid_mem, FALSE) < 0)
+ if(H5I_dec_ref(tid_mem, FALSE, FALSE) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't decrement temporary datatype ID")
if(buf)
H5MM_xfree(buf);
@@ -4845,8 +4845,10 @@ H5D_chunk_dest(H5F_t *f, hid_t dxpl_id, H5D_t *dset)
if(H5D_chunk_cache_evict(dset, dxpl_id, dxpl_cache, ent, TRUE) < 0)
nerrors++;
} /* end for */
+
+ /* Continue even if there are failures. */
if(nerrors)
- HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
+ HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
/* Release cache structures */
if(rdcc->slot)