summaryrefslogtreecommitdiffstats
path: root/src/H5Dpkg.h
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2010-05-20 21:55:55 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2010-05-20 21:55:55 (GMT)
commit2db0e8ecf33c397b39f9ab9327f5326e9b91fb54 (patch)
tree1e3680a95718f2e8b80e03107bf4ebf7465f2281 /src/H5Dpkg.h
parent00aa7f1d8a39d900e90e1f68a58c7bce7eb3b113 (diff)
downloadhdf5-2db0e8ecf33c397b39f9ab9327f5326e9b91fb54.zip
hdf5-2db0e8ecf33c397b39f9ab9327f5326e9b91fb54.tar.gz
hdf5-2db0e8ecf33c397b39f9ab9327f5326e9b91fb54.tar.bz2
[svn-r18868] Purpose: Fix bug in dataset shrinking algorithm
Description: Previously, it was possible for a chunk to be flushed due to chunk operations in the callback from H5B_iterate in H5D_chunk_prune_by_extent. Because flushing the chunk can force it to be reallocated if it is filtered, this can change the contents of the chunk b-tree in the middle of H5B_iterate. Because H5B_iterate uses a locally cached copy of the b-tree, this causes subsequent operations to be passed incorrect data. Rewrote H5D_chunk_prune_by_extent to avoid H5B_iterate entirely. Also fixed a bug in the dataset expand algorithm that could cause extra chunks to be created. Tested: jam, linew, smirom (h5committest)
Diffstat (limited to 'src/H5Dpkg.h')
-rw-r--r--src/H5Dpkg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index dbd495c..bb8fd71 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -488,6 +488,7 @@ typedef struct {
typedef struct H5D_rdcc_ent_t {
hbool_t locked; /*entry is locked in cache */
hbool_t dirty; /*needs to be written to disk? */
+ hbool_t deleted; /*chunk about to be deleted (do not flush) */
hsize_t offset[H5O_LAYOUT_NDIMS]; /*chunk name */
uint32_t rd_count; /*bytes remaining to be read */
uint32_t wr_count; /*bytes remaining to be written */
@@ -612,7 +613,7 @@ H5_DLL herr_t H5D_chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes);
H5_DLL herr_t H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id,
hbool_t full_overwrite, hsize_t old_dim[]);
H5_DLL herr_t H5D_chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id,
- const hsize_t *old_dims);
+ const hsize_t *old_dim);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5D_chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[]);
#endif /* H5_HAVE_PARALLEL */