summaryrefslogtreecommitdiffstats
path: root/src/H5HFman.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
commitd2b87ec47ebdb096c331c7b62a195b9cea2f33ae (patch)
treea066f01361afaf5df457cef612bb0bb9fd80fe18 /src/H5HFman.c
parentee5a1e07350f0dcf3ef07d9443aa2f4c073392f4 (diff)
downloadhdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.zip
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.gz
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.bz2
[svn-r17896] Description:
Bring r17546:17895 from trunk to revise_chunks branch. Changes to fixed and extensible array dataset chunk indexing code to accommodate changes to private APIs in those interfaces. Also, other adjustments to source code and expected output in response to changes on the 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.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5HFman.c')
-rw-r--r--src/H5HFman.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/H5HFman.c b/src/H5HFman.c
index 5bdc769..3fb0cfb 100644
--- a/src/H5HFman.c
+++ b/src/H5HFman.c
@@ -44,6 +44,19 @@
/* Local Macros */
/****************/
+/* Macro to check if we can apply all filters in the pipeline. Use whenever
+ * performing a modification operation */
+ #define H5HF_MAN_WRITE_CHECK_PLINE(HDR) \
+{ \
+ if(!((HDR)->checked_filters)) { \
+ if((HDR)->pline.nused) \
+ if(H5Z_can_apply_direct(&((HDR)->pline)) < 0) \
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "I/O filters can't operate on this heap") \
+ \
+ (HDR)->checked_filters = TRUE; \
+ } /* end if */ \
+}
+
/******************/
/* Local Typedefs */
@@ -116,6 +129,9 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
HDassert(obj);
HDassert(id);
+ /* Check pipeline */
+ H5HF_MAN_WRITE_CHECK_PLINE(hdr)
+
/* Look for free space */
if((node_found = H5HF_space_find(hdr, dxpl_id, (hsize_t)obj_size, &sec_node)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "can't locate free space in fractal heap")
@@ -272,6 +288,9 @@ H5HF_man_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id,
/* Set the access mode for the direct block */
if(op_flags & H5HF_OP_MODIFY) {
+ /* Check pipeline */
+ H5HF_MAN_WRITE_CHECK_PLINE(hdr)
+
dblock_access = H5AC_WRITE;
dblock_cache_flags = H5AC__DIRTIED_FLAG;
} /* end if */
@@ -533,6 +552,9 @@ H5HF_man_remove(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id)
HDassert(hdr);
HDassert(id);
+ /* Check pipeline */
+ H5HF_MAN_WRITE_CHECK_PLINE(hdr)
+
/* Skip over the flag byte */
id++;