summaryrefslogtreecommitdiffstats
path: root/src/H5HFhdr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-10-09 01:31:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-10-09 01:31:36 (GMT)
commit13e5632d32650ff53190bdc37777277d0ae2913d (patch)
treee08e61acf61b88a73300e2196ed4ff46c3a1ec13 /src/H5HFhdr.c
parent82efaff584c24b49f132f645e86e12695887d144 (diff)
downloadhdf5-13e5632d32650ff53190bdc37777277d0ae2913d.zip
hdf5-13e5632d32650ff53190bdc37777277d0ae2913d.tar.gz
hdf5-13e5632d32650ff53190bdc37777277d0ae2913d.tar.bz2
[svn-r17623] Description:
Bring "compress group's fractal heap" feature from branch back to trunk. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.1 (amazon) in debug mode Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5HFhdr.c')
-rw-r--r--src/H5HFhdr.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index d1f2675..3762af6 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -423,6 +423,17 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
* length is already set in that case (its stored in the header on disk))
*/
if(cparam->pline.nused > 0) {
+ /* Check if the filters in the DCPL can be applied to this dataset */
+ if(H5Z_can_apply_direct(&(cparam->pline)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "I/O filters can't operate on this heap")
+
+ /* Mark the filters as checked */
+ hdr->checked_filters = TRUE;
+
+ /* Make the "set local" filter callbacks for this dataset */
+ if(H5Z_set_local_direct(&(cparam->pline)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to set local filter parameters")
+
/* Copy the I/O filter pipeline from the creation parameters to the header */
if(NULL == H5O_msg_copy(H5O_PLINE_ID, &(cparam->pline), &(hdr->pline)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline")
@@ -430,7 +441,7 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
/* Pay attention to the latest version flag for the file */
if(H5F_USE_LATEST_FORMAT(hdr->f))
/* Set the latest version for the I/O pipeline message */
- if(H5Z_set_latest_version(&(hdr->pline)) < 0)
+ if(H5O_pline_set_latest_version(&(hdr->pline)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set latest version of I/O filter pipeline")
/* Compute the I/O filters' encoded size */
@@ -446,10 +457,14 @@ HDfprintf(stderr, "%s: hdr->filter_len = %u\n", FUNC, hdr->filter_len);
+ 4 /* Size of filter mask for filtered root direct block */
+ hdr->filter_len; /* Size of encoded I/O filter info */
} /* end if */
- else
+ else {
/* Set size of header on disk */
hdr->heap_size = H5HF_HEADER_SIZE(hdr);
+ /* Mark filters as checked, for performance reasons */
+ hdr->checked_filters = TRUE;
+ } /* end else */
+
/* Set the length of IDs in the heap */
/* (This code is not in the "finish init phase" routines because those
* routines are also called from the cache 'load' callback, and the ID