summaryrefslogtreecommitdiffstats
path: root/src/H5Fistore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-08-23 12:42:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-08-23 12:42:56 (GMT)
commita2567e36f04594afe382abf44b8bd1ea34bcf299 (patch)
tree781acbd3f2a012cf9a59c9a125d62aaa199aa1ba /src/H5Fistore.c
parentb7b36d7d06c6d7445b302def58835b3814c4f6ca (diff)
downloadhdf5-a2567e36f04594afe382abf44b8bd1ea34bcf299.zip
hdf5-a2567e36f04594afe382abf44b8bd1ea34bcf299.tar.gz
hdf5-a2567e36f04594afe382abf44b8bd1ea34bcf299.tar.bz2
[svn-r5886] Purpose:
Bug fix Description: Correctly apply filters (like compression) to fill values in chunks that are pre-allocated. This is OK in parallel also, since all the chunks are identical at this point and any chunk may be written by any process. Platforms tested: FreeBSD 4.6 (sleipnir) w/parallel
Diffstat (limited to 'src/H5Fistore.c')
-rw-r--r--src/H5Fistore.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index c9dc766..0bba74e 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -2431,6 +2431,20 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
*/
HDmemset (chunk, 0, (size_t)chunk_size);
} /* end else */
+
+ /* Check if there are filters which need to be applied to the chunk */
+ if (pline.nfilters>0) {
+ unsigned filter_mask=0;
+ size_t buf_size=chunk_size;
+ size_t nbytes=(size_t)chunk_size;
+
+ /* Push the chunk through the filters */
+ if (H5Z_pipeline(f, &pline, 0, &filter_mask, &nbytes, &buf_size, &chunk)<0)
+ HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed");
+
+ /* Keep the number of bytes the chunk turned in to */
+ chunk_size=nbytes;
+ } /* end if */
} /* end if */
/* Loop over all chunks */