diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2010-05-20 21:59:01 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2010-05-20 21:59:01 (GMT) |
commit | 8bd419e0885f859e34c5809cdde3117366f3c7b1 (patch) | |
tree | fbabcbafb151b3da100d73de7a5d81dd9ef59f40 /src/H5Dpkg.h | |
parent | 83f50e5a722f7a58562a0885fef695f74bce7285 (diff) | |
download | hdf5-8bd419e0885f859e34c5809cdde3117366f3c7b1.zip hdf5-8bd419e0885f859e34c5809cdde3117366f3c7b1.tar.gz hdf5-8bd419e0885f859e34c5809cdde3117366f3c7b1.tar.bz2 |
[svn-r18869] 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.h | 3 |
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 */ |