summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-06-19 04:12:36 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-06-19 04:12:36 (GMT)
commit87bb643dbbebe154d3c5412ab356f0e5de08d8de (patch)
treeab2b672b2d491cee4fcb58dd2924ef75a3859067
parent524d0abc13958d5376ecc963b8a4c0bfd1d88cc4 (diff)
downloadhdf5-87bb643dbbebe154d3c5412ab356f0e5de08d8de.zip
hdf5-87bb643dbbebe154d3c5412ab356f0e5de08d8de.tar.gz
hdf5-87bb643dbbebe154d3c5412ab356f0e5de08d8de.tar.bz2
[svn-r27247] Bring revisions #27072 - #27084 from trunk to revise_chunks. h5committested.
-rw-r--r--src/H5Dchunk.c4
-rw-r--r--src/H5Defl.c4
-rw-r--r--src/H5EA.c14
-rw-r--r--src/H5EAcache.c10
-rw-r--r--src/H5EAdbg.c30
-rw-r--r--src/H5EAhdr.c66
-rw-r--r--src/H5EApkg.h21
-rw-r--r--src/H5F.c2
-rw-r--r--src/H5FA.c20
-rw-r--r--src/H5FAcache.c15
-rw-r--r--src/H5FAdbg.c10
-rw-r--r--src/H5FAdblock.c30
-rw-r--r--src/H5FAhdr.c68
-rw-r--r--src/H5FApkg.h12
-rw-r--r--src/H5FD.c53
-rw-r--r--src/H5FDfamily.c38
-rw-r--r--src/H5FDprivate.h2
-rw-r--r--src/H5FS.c24
-rw-r--r--src/H5FScache.c14
-rw-r--r--src/H5FSpkg.h4
-rw-r--r--src/H5Fdeprec.c2
-rw-r--r--src/H5Fint.c4
-rw-r--r--src/H5Fio.c2
-rw-r--r--src/H5Fpkg.h8
-rw-r--r--src/H5Fsuper.c46
-rw-r--r--src/H5Fsuper_cache.c39
-rw-r--r--src/H5Gcache.c16
-rw-r--r--src/H5HFcache.c950
-rw-r--r--src/H5HLcache.c6
-rw-r--r--src/H5Ocache.c86
-rw-r--r--src/H5Omessage.c42
-rw-r--r--src/H5SMcache.c35
-rw-r--r--src/H5trace.c4
-rw-r--r--test/cache.c1342
-rw-r--r--test/cache_api.c58
-rw-r--r--test/cache_common.c120
-rw-r--r--test/cache_common.h22
-rw-r--r--test/cache_tagging.c61
-rw-r--r--test/earray.c1
-rw-r--r--testpar/t_cache.c367
40 files changed, 1335 insertions, 2317 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 3e03e86..dc81695 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -322,8 +322,8 @@ H5FL_BLK_DEFINE_STATIC(chunk);
*-------------------------------------------------------------------------
*/
herr_t
-H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsize_t *offset,
- uint32_t data_size, const void *buf)
+H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters,
+ hsize_t *offset, uint32_t data_size, const void *buf)
{
const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
H5D_chunk_ud_t udata; /* User data for querying chunk info */
diff --git a/src/H5Defl.c b/src/H5Defl.c
index 6707568..1ae7a23 100644
--- a/src/H5Defl.c
+++ b/src/H5Defl.c
@@ -288,7 +288,7 @@ H5D__efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size, uint8_t *buf)
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed")
if((fd = HDopen(efl->slot[u].name, O_RDONLY, 0)) < 0)
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file")
- if(HDlseek(fd, (off_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
+ if(HDlseek(fd, (HDoff_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file")
#ifndef NDEBUG
tempto_read = MIN(efl->slot[u].size-skip, (hsize_t)size);
@@ -378,7 +378,7 @@ H5D__efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size, const uint8_t *b
else
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file")
} /* end if */
- if(HDlseek(fd, (off_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
+ if(HDlseek(fd, (HDoff_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file")
#ifndef NDEBUG
tempto_write = MIN(efl->slot[u].size - skip, (hsize_t)size);
diff --git a/src/H5EA.c b/src/H5EA.c
index 0146cfd..4a1365a 100644
--- a/src/H5EA.c
+++ b/src/H5EA.c
@@ -152,7 +152,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array info")
/* Lock the array header into memory */
- if(NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, ctx_udata, H5AC_WRITE)))
+ if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC_WRITE)))
H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Point extensible array wrapper at header and bump it's ref count */
@@ -172,7 +172,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
CATCH
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5EA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
if(!ret_value)
if(ea && H5EA_close(ea, dxpl_id) < 0)
@@ -213,7 +213,7 @@ H5EA_open(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata))
#ifdef QAK
HDfprintf(stderr, "%s: ea_addr = %a\n", FUNC, ea_addr);
#endif /* QAK */
- if(NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, ctx_udata, H5AC_READ)))
+ if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header, address = %llu", (unsigned long long)ea_addr)
/* Check for pending array deletion */
@@ -241,7 +241,7 @@ HDfprintf(stderr, "%s: ea_addr = %a\n", FUNC, ea_addr);
CATCH
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5EA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
if(!ret_value)
if(ea && H5EA_close(ea, dxpl_id) < 0)
@@ -943,7 +943,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Lock the array header into memory */
/* (OK to pass in NULL for callback context, since we know the header must be in the cache) */
- if(NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(ea->f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, NULL, H5AC_WRITE)))
+ if(NULL == (hdr = H5EA__hdr_protect(ea->f, dxpl_id, ea_addr, NULL, H5AC_WRITE)))
H5E_THROW(H5E_CANTLOAD, "unable to load extensible array header")
/* Set the shared array header's file context for this operation */
@@ -1007,7 +1007,7 @@ H5EA_delete(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata))
#ifdef QAK
HDfprintf(stderr, "%s: ea_addr = %a\n", FUNC, ea_addr);
#endif /* QAK */
- if(NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, ctx_udata, H5AC_WRITE)))
+ if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, ea_addr, ctx_udata, H5AC_WRITE)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array header, address = %llu", (unsigned long long)ea_addr)
/* Check for files using shared array header */
@@ -1026,7 +1026,7 @@ HDfprintf(stderr, "%s: ea_addr = %a\n", FUNC, ea_addr);
CATCH
/* Unprotect the header, if an error occurred */
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5EA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PRIV) /* end H5EA_delete() */
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index fe29a46..99af1cd 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -43,7 +43,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
#include "H5WBprivate.h" /* Wrapped Buffers */
@@ -577,6 +577,7 @@ H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata))
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
haddr_t arr_addr; /* Address of array header in the file */
+ size_t u; /* Local index variable */
/* Sanity check */
HDassert(f);
@@ -638,8 +639,6 @@ H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata))
/* Decode data block addresses in index block */
if(iblock->ndblk_addrs > 0) {
- size_t u; /* Local index variable */
-
/* Decode addresses of data blocks in index block */
for(u = 0; u < iblock->ndblk_addrs; u++)
H5F_addr_decode(f, &p, &iblock->dblk_addrs[u]);
@@ -647,8 +646,6 @@ H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata))
/* Decode super block addresses in index block */
if(iblock->nsblk_addrs > 0) {
- size_t u; /* Local index variable */
-
/* Decode addresses of super blocks in index block */
for(u = 0; u < iblock->nsblk_addrs; u++)
H5F_addr_decode(f, &p, &iblock->sblk_addrs[u]);
@@ -1794,9 +1791,6 @@ H5EA__cache_dblk_page_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata))
HDassert(f);
HDassert(H5F_addr_defined(addr));
HDassert(udata && udata->hdr && udata->parent);
-#ifdef QAK
-HDfprintf(stderr, "%s: addr = %a\n", FUNC, addr);
-#endif /* QAK */
/* Allocate the extensible array data block page */
if(NULL == (dblk_page = H5EA__dblk_page_alloc(udata->hdr, udata->parent)))
diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c
index b9a5bad..60b9ecd 100644
--- a/src/H5EAdbg.c
+++ b/src/H5EAdbg.c
@@ -119,7 +119,7 @@ H5EA__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
} /* end if */
/* Load the extensible array header */
- if(NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, addr, dbg_ctx, H5AC_READ)))
+ if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Print opening message */
@@ -171,7 +171,7 @@ H5EA__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
CATCH
if(dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
H5E_THROW(H5E_CANTRELEASE, "unable to release extensible array debugging context")
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_EARRAY_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5EA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__hdr_debug() */
@@ -196,9 +196,9 @@ H5EA__iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE *stream, i
int fwidth, const H5EA_class_t *cls, haddr_t hdr_addr, haddr_t obj_addr))
/* Local variables */
- H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
- H5EA_iblock_t *iblock = NULL; /* Extensible array index block */
- void *dbg_ctx = NULL; /* Extensible array context */
+ H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
+ H5EA_iblock_t *iblock = NULL; /* Extensible array index block */
+ void *dbg_ctx = NULL; /* Extensible array context */
/* Check arguments */
HDassert(f);
@@ -218,7 +218,7 @@ H5EA__iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE *stream, i
} /* end if */
/* Load the extensible array header */
- if(NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, hdr_addr, dbg_ctx, H5AC_READ)))
+ if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Sanity check */
@@ -296,7 +296,7 @@ CATCH
H5E_THROW(H5E_CANTRELEASE, "unable to release extensible array debugging context")
if(iblock && H5EA__iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array index block")
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_EARRAY_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5EA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__iblock_debug() */
@@ -321,9 +321,9 @@ H5EA__sblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
int fwidth, const H5EA_class_t *cls, haddr_t hdr_addr, unsigned sblk_idx, haddr_t obj_addr))
/* Local variables */
- H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
- H5EA_sblock_t *sblock = NULL; /* Extensible array super block */
- void *dbg_ctx = NULL; /* Extensible array context */
+ H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
+ H5EA_sblock_t *sblock = NULL; /* Extensible array super block */
+ void *dbg_ctx = NULL; /* Extensible array context */
/* Check arguments */
HDassert(f);
@@ -343,7 +343,7 @@ H5EA__sblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
} /* end if */
/* Load the extensible array header */
- if(NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, hdr_addr, dbg_ctx, H5AC_READ)))
+ if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Protect super block */
@@ -388,7 +388,7 @@ CATCH
H5E_THROW(H5E_CANTRELEASE, "unable to release extensible array debugging context")
if(sblock && H5EA__sblock_unprotect(sblock, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array super block")
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_EARRAY_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5EA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__sblock_debug() */
@@ -415,7 +415,7 @@ H5EA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
/* Local variables */
H5EA_hdr_t *hdr = NULL; /* Shared extensible array header */
H5EA_dblock_t *dblock = NULL; /* Extensible array data block */
- void *dbg_ctx = NULL; /* Extensible array context */
+ void *dbg_ctx = NULL; /* Extensible array context */
size_t u; /* Local index variable */
/* Check arguments */
@@ -437,7 +437,7 @@ H5EA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
} /* end if */
/* Load the extensible array header */
- if(NULL == (hdr = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, hdr_addr, dbg_ctx, H5AC_READ)))
+ if(NULL == (hdr = H5EA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to load extensible array header")
/* Protect data block */
@@ -471,7 +471,7 @@ CATCH
H5E_THROW(H5E_CANTRELEASE, "unable to release extensible array debugging context")
if(dblock && H5EA__dblock_unprotect(dblock, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array data block")
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_EARRAY_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5EA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__dblock_debug() */
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index bb10f9e..3667816 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -613,6 +613,70 @@ END_FUNC(PKG) /* end H5EA__hdr_modified() */
/*-------------------------------------------------------------------------
+ * Function: H5EA__hdr_protect
+ *
+ * Purpose: Convenience wrapper around protecting extensible array header
+ *
+ * Return: Non-NULL pointer to index block on success/NULL on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Jul 31 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+BEGIN_FUNC(PKG, ERR,
+H5EA_hdr_t *, NULL, NULL,
+H5EA__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr, void *ctx_udata,
+ H5AC_protect_t rw))
+
+ /* Local variables */
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(H5F_addr_defined(ea_addr));
+
+ /* Protect the header */
+ if(NULL == (ret_value = (H5EA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_EARRAY_HDR, ea_addr, ctx_udata, rw)))
+ H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array header, address = %llu", (unsigned long long)ea_addr)
+
+CATCH
+
+END_FUNC(PKG) /* end H5EA__hdr_protect() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5EA__hdr_unprotect
+ *
+ * Purpose: Convenience wrapper around unprotecting extensible array header
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 1 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+BEGIN_FUNC(PKG, ERR,
+herr_t, SUCCEED, FAIL,
+H5EA__hdr_unprotect(H5EA_hdr_t *hdr, hid_t dxpl_id, unsigned cache_flags))
+
+ /* Local variables */
+
+ /* Sanity check */
+ HDassert(hdr);
+
+ /* Unprotect the header */
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_EARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to unprotect extensible array hdr, address = %llu", (unsigned long long)hdr->addr)
+
+CATCH
+
+END_FUNC(PKG) /* end H5EA__hdr_unprotect() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5EA__hdr_delete
*
* Purpose: Delete an extensible array, starting with the header
@@ -666,7 +730,7 @@ HDfprintf(stderr, "%s: hdr->idx_blk_addr = %a\n", FUNC, hdr->idx_blk_addr);
CATCH
/* Unprotect the header, deleting it if an error hasn't occurred */
- if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_EARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
+ if(H5EA__hdr_unprotect(hdr, dxpl_id, cache_flags) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release extensible array header")
END_FUNC(PKG) /* end H5EA__hdr_delete() */
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index 3ebaea5..8075b14 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -303,11 +303,12 @@ struct H5EA_t {
/* Metadata cache callback user data types */
-/* Info needed for loading data block page */
-typedef struct H5EA_dblk_page_cache_ud_t {
+/* Info needed for loading super block */
+typedef struct H5EA_sblock_cache_ud_t {
H5EA_hdr_t *hdr; /* Shared extensible array information */
- H5EA_sblock_t *parent; /* Pointer to parent object for data block page (super block) */
-} H5EA_dblk_page_cache_ud_t;
+ H5EA_iblock_t *parent; /* Pointer to parent object for super block (index block) */
+ unsigned sblk_idx; /* Index of super block */
+} H5EA_sblock_cache_ud_t;
/* Info needed for loading data block */
typedef struct H5EA_dblock_cache_ud_t {
@@ -316,12 +317,11 @@ typedef struct H5EA_dblock_cache_ud_t {
size_t nelmts; /* Number of elements in data block */
} H5EA_dblock_cache_ud_t;
-/* Info needed for loading super block */
-typedef struct H5EA_sblock_cache_ud_t {
+/* Info needed for loading data block page */
+typedef struct H5EA_dblk_page_cache_ud_t {
H5EA_hdr_t *hdr; /* Shared extensible array information */
- H5EA_iblock_t *parent; /* Pointer to parent object for super block (index block) */
- unsigned sblk_idx; /* Index of super block */
-} H5EA_sblock_cache_ud_t;
+ H5EA_sblock_t *parent; /* Pointer to parent object for data block page (super block) */
+} H5EA_dblk_page_cache_ud_t;
#ifdef H5EA_TESTING
typedef struct H5EA__ctx_cb_t {
@@ -378,6 +378,9 @@ H5_DLL herr_t H5EA__hdr_decr(H5EA_hdr_t *hdr);
H5_DLL herr_t H5EA__hdr_fuse_incr(H5EA_hdr_t *hdr);
H5_DLL size_t H5EA__hdr_fuse_decr(H5EA_hdr_t *hdr);
H5_DLL herr_t H5EA__hdr_modified(H5EA_hdr_t *hdr);
+H5_DLL H5EA_hdr_t *H5EA__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t ea_addr,
+ void *ctx_udata, H5AC_protect_t rw);
+H5_DLL herr_t H5EA__hdr_unprotect(H5EA_hdr_t *hdr, hid_t dxpl_id, unsigned cache_flags);
H5_DLL herr_t H5EA__hdr_delete(H5EA_hdr_t *hdr, hid_t dxpl_id);
H5_DLL herr_t H5EA__hdr_dest(H5EA_hdr_t *hdr);
diff --git a/src/H5F.c b/src/H5F.c
index b2d767f..625bca6 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1396,7 +1396,7 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo)
HDmemset(finfo, 0, sizeof(*finfo));
/* Get the size of the superblock and any superblock extensions */
- if(H5F_super_size(f, H5AC_ind_dxpl_id, &finfo->super.super_size, &finfo->super.super_ext_size) < 0)
+ if(H5F__super_size(f, H5AC_ind_dxpl_id, &finfo->super.super_size, &finfo->super.super_ext_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock sizes")
/* Get the size of any persistent free space */
diff --git a/src/H5FA.c b/src/H5FA.c
index 83d7dbc..3120588 100644
--- a/src/H5FA.c
+++ b/src/H5FA.c
@@ -143,7 +143,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array info")
/* Lock the array header into memory */
- if(NULL == (hdr = (H5FA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, ctx_udata, H5AC_WRITE)))
+ if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC_WRITE)))
H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
/* Point fixed array wrapper at header and bump it's ref count */
@@ -163,7 +163,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
CATCH
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
if(!ret_value)
if(fa && H5FA_close(fa, dxpl_id) < 0)
@@ -203,7 +203,7 @@ H5FA_open(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata))
#ifdef H5FA_DEBUG
HDfprintf(stderr, "%s: fa_addr = %a\n", FUNC, fa_addr);
#endif /* H5FA_DEBUG */
- if(NULL == (hdr = (H5FA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, ctx_udata, H5AC_READ)))
+ if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header, address = %llu", (unsigned long long)fa_addr)
/* Check for pending array deletion */
@@ -231,7 +231,7 @@ HDfprintf(stderr, "%s: fa_addr = %a\n", FUNC, fa_addr);
CATCH
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
if(!ret_value)
if(fa && H5FA_close(fa, dxpl_id) < 0)
@@ -353,7 +353,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx);
#endif /* H5FA_DEBUG */
/* Create the data block */
- hdr->dblk_addr = H5FA__dblock_create(hdr, dxpl_id, &hdr_dirty, hdr->cparam.nelmts);
+ hdr->dblk_addr = H5FA__dblock_create(hdr, dxpl_id, &hdr_dirty);
if(!H5F_addr_defined(hdr->dblk_addr))
H5E_THROW(H5E_CANTCREATE, "unable to create fixed array data block")
} /* end if */
@@ -361,7 +361,7 @@ HDfprintf(stderr, "%s: fixed array data block address not defined!\n", FUNC, idx
HDassert(idx < hdr->cparam.nelmts);
/* Protect data block */
- if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, hdr->stats.nelmts, H5AC_WRITE)))
+ if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, H5AC_WRITE)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)hdr->dblk_addr)
/* Check for paging data block */
@@ -469,7 +469,7 @@ HDfprintf(stderr, "%s: Index %Hu\n", FUNC, idx);
else {
/* Get the data block */
HDassert(H5F_addr_defined(hdr->dblk_addr));
- if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, hdr->stats.nelmts, H5AC_READ)))
+ if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, hdr->dblk_addr, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)hdr->dblk_addr)
/* Check for paged data block */
@@ -594,7 +594,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Lock the array header into memory */
/* (OK to pass in NULL for callback context, since we know the header must be in the cache) */
- if(NULL == (hdr = (H5FA_hdr_t *)H5AC_protect(fa->f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, NULL, H5AC_WRITE)))
+ if(NULL == (hdr = H5FA__hdr_protect(fa->f, dxpl_id, fa_addr, NULL, H5AC_WRITE)))
H5E_THROW(H5E_CANTLOAD, "unable to load fixed array header")
/* Set the shared array header's file context for this operation */
@@ -657,7 +657,7 @@ H5FA_delete(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata))
#ifdef H5FA_DEBUG
HDfprintf(stderr, "%s: fa_addr = %a\n", FUNC, fa_addr);
#endif /* H5FA_DEBUG */
- if(NULL == (hdr = (H5FA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, ctx_udata, H5AC_WRITE)))
+ if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, fa_addr, ctx_udata, H5AC_WRITE)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array header, address = %llu", (unsigned long long)fa_addr)
/* Check for files using shared array header */
@@ -676,7 +676,7 @@ HDfprintf(stderr, "%s: fa_addr = %a\n", FUNC, fa_addr);
CATCH
/* Unprotect the header, if an error occurred */
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
END_FUNC(PRIV) /* end H5FA_delete() */
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index 49657ea..cf92eb4 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -16,6 +16,8 @@
/*-------------------------------------------------------------------------
*
* Created: H5FAcache.c
+ * Jul 2 2009
+ * Quincey Koziol <koziol@hdfgroup.org>
*
* Purpose: Implement fixed array metadata cache methods.
*
@@ -41,7 +43,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FApkg.h" /* Fixed Arrays */
#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
#include "H5WBprivate.h" /* Wrapped Buffers */
@@ -519,10 +521,10 @@ H5FA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata))
/* Sanity check */
HDassert(f);
HDassert(H5F_addr_defined(addr));
- HDassert(udata && udata->hdr && udata->nelmts > 0);
+ HDassert(udata && udata->hdr);
/* Allocate the fixed array data block */
- if(NULL == (dblock = H5FA__dblock_alloc(udata->hdr, udata->nelmts)))
+ if(NULL == (dblock = H5FA__dblock_alloc(udata->hdr)))
H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block")
/* Set the fixed array data block's information */
@@ -577,9 +579,9 @@ H5FA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata))
if(!dblock->npages) {
/* Decode elements in data block */
/* Convert from raw elements on disk into native elements in memory */
- if((udata->hdr->cparam.cls->decode)(p, dblock->elmts, (size_t)udata->nelmts, udata->hdr->cb_ctx) < 0)
+ if((udata->hdr->cparam.cls->decode)(p, dblock->elmts, (size_t)udata->hdr->stats.nelmts, udata->hdr->cb_ctx) < 0)
H5E_THROW(H5E_CANTDECODE, "can't decode fixed array data elements")
- p += (udata->nelmts * udata->hdr->cparam.raw_elmt_size);
+ p += (udata->hdr->stats.nelmts * udata->hdr->cparam.raw_elmt_size);
} /* end if */
/* Sanity check */
@@ -916,9 +918,6 @@ H5FA__cache_dblk_page_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata))
HDassert(f);
HDassert(H5F_addr_defined(addr));
HDassert(udata && udata->hdr && udata->nelmts > 0);
-#ifdef QAK
-HDfprintf(stderr, "%s: addr = %a\n", FUNC, addr);
-#endif /* QAK */
/* Allocate the fixed array data block page */
if(NULL == (dblk_page = H5FA__dblk_page_alloc(udata->hdr, udata->nelmts)))
diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c
index 203aeeb..281efdd 100644
--- a/src/H5FAdbg.c
+++ b/src/H5FAdbg.c
@@ -117,7 +117,7 @@ H5FA__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
} /* end if */
/* Load the fixed array header */
- if(NULL == (hdr = (H5FA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FARRAY_HDR, addr, dbg_ctx, H5AC_READ)))
+ if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
/* Print opening message */
@@ -150,7 +150,7 @@ H5FA__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
CATCH
if(dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0)
H5E_THROW(H5E_CANTRELEASE, "unable to release fixed array debugging context")
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FARRAY_HDR, addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
END_FUNC(PKG) /* end H5FA__hdr_debug() */
@@ -198,11 +198,11 @@ H5FA__dblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde
} /* end if */
/* Load the fixed array header */
- if(NULL == (hdr = (H5FA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FARRAY_HDR, hdr_addr, dbg_ctx, H5AC_READ)))
+ if(NULL == (hdr = H5FA__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to load fixed array header")
/* Protect data block */
- if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, addr, hdr->cparam.nelmts, H5AC_READ)))
+ if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, addr, H5AC_READ)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)addr)
/* Print opening message */
@@ -278,7 +278,7 @@ CATCH
H5E_THROW(H5E_CANTRELEASE, "unable to release fixed array debugging context")
if(dblock && H5FA__dblock_unprotect(dblock, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array data block")
- if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FARRAY_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
+ if(hdr && H5FA__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
H5E_THROW(H5E_CANTUNPROTECT, "unable to release fixed array header")
END_FUNC(PKG) /* end H5FA__dblock_debug() */
diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c
index 9e9e3ea..73838a1 100644
--- a/src/H5FAdblock.c
+++ b/src/H5FAdblock.c
@@ -102,14 +102,14 @@ H5FL_BLK_DEFINE(fa_page_init);
*/
BEGIN_FUNC(PKG, ERR,
H5FA_dblock_t *, NULL, NULL,
-H5FA__dblock_alloc(H5FA_hdr_t *hdr, hsize_t nelmts))
+H5FA__dblock_alloc(H5FA_hdr_t *hdr))
/* Local variables */
H5FA_dblock_t *dblock = NULL; /* fixed array data block */
/* Check arguments */
HDassert(hdr);
- HDassert(nelmts > 0);
+ HDassert(hdr->cparam.nelmts > 0);
/* Allocate memory for the data block */
if(NULL == (dblock = H5FL_CALLOC(H5FA_dblock_t)))
@@ -124,9 +124,9 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr, hsize_t nelmts))
dblock->dblk_page_nelmts = (size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits;
/* Check if this data block should be paged */
- if(nelmts > dblock->dblk_page_nelmts) {
+ if(hdr->cparam.nelmts > dblock->dblk_page_nelmts) {
/* Compute number of pages */
- hsize_t npages = ((nelmts + dblock->dblk_page_nelmts) - 1) / dblock->dblk_page_nelmts;
+ hsize_t npages = ((hdr->cparam.nelmts + dblock->dblk_page_nelmts) - 1) / dblock->dblk_page_nelmts;
/* Safely assign the number of pages */
H5_CHECKED_ASSIGN(dblock->npages, size_t, npages, hsize_t);
@@ -146,10 +146,10 @@ H5FA__dblock_alloc(H5FA_hdr_t *hdr, hsize_t nelmts))
dblock->dblk_page_size = (dblock->dblk_page_nelmts * hdr->cparam.raw_elmt_size) + H5FA_SIZEOF_CHKSUM;
/* Compute the # of elements on last page */
- if(0 == nelmts % dblock->dblk_page_nelmts)
+ if(0 == hdr->cparam.nelmts % dblock->dblk_page_nelmts)
dblock->last_page_nelmts = dblock->dblk_page_nelmts;
else
- dblock->last_page_nelmts = (size_t)(nelmts % dblock->dblk_page_nelmts);
+ dblock->last_page_nelmts = (size_t)(hdr->cparam.nelmts % dblock->dblk_page_nelmts);
} /* end if */
else {
hsize_t dblk_size = hdr->cparam.nelmts * hdr->cparam.cls->nat_elmt_size;
@@ -186,24 +186,22 @@ END_FUNC(PKG) /* end H5FA__dblock_alloc() */
*/
BEGIN_FUNC(PKG, ERR,
haddr_t, HADDR_UNDEF, HADDR_UNDEF,
-H5FA__dblock_create(H5FA_hdr_t *hdr, hid_t dxpl_id, hbool_t *hdr_dirty,
- hsize_t nelmts))
+H5FA__dblock_create(H5FA_hdr_t *hdr, hid_t dxpl_id, hbool_t *hdr_dirty))
/* Local variables */
H5FA_dblock_t *dblock = NULL; /* fixed array data block */
haddr_t dblock_addr; /* fixed array data block address */
#ifdef H5FA_DEBUG
-HDfprintf(stderr, "%s: Called, hdr->stats.nelmts = %Zu, nelmts = %Zu\n", FUNC, hdr->stats.nelmts, nelmts);
+HDfprintf(stderr, "%s: Called, hdr->stats.nelmts = %Zu, nelmts = %Zu\n", FUNC, hdr->stats.nelmts, hdr->cparam.nelmts);
#endif /* H5FA_DEBUG */
/* Sanity check */
HDassert(hdr);
HDassert(hdr_dirty);
- HDassert(nelmts > 0);
/* Allocate the data block */
- if(NULL == (dblock = H5FA__dblock_alloc(hdr, nelmts)))
+ if(NULL == (dblock = H5FA__dblock_alloc(hdr)))
H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array data block")
/* Set size of data block on disk */
@@ -265,7 +263,7 @@ END_FUNC(PKG) /* end H5FA__dblock_create() */
BEGIN_FUNC(PKG, ERR,
H5FA_dblock_t *, NULL, NULL,
H5FA__dblock_protect(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t dblk_addr,
- hsize_t dblk_nelmts, H5AC_protect_t rw))
+ H5AC_protect_t rw))
/* Local variables */
H5FA_dblock_cache_ud_t udata; /* Information needed for loading data block */
@@ -277,11 +275,9 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Sanity check */
HDassert(hdr);
HDassert(H5F_addr_defined(dblk_addr));
- HDassert(dblk_nelmts);
/* Set up user data */
udata.hdr = hdr;
- udata.nelmts = dblk_nelmts;
/* Protect the data block */
if(NULL == (ret_value = (H5FA_dblock_t *)H5AC_protect(hdr->f, dxpl_id, H5AC_FARRAY_DBLOCK, dblk_addr, &udata, rw)))
@@ -340,8 +336,7 @@ END_FUNC(PKG) /* end H5FA__dblock_unprotect() */
*/
BEGIN_FUNC(PKG, ERR,
herr_t, SUCCEED, FAIL,
-H5FA__dblock_delete(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t dblk_addr,
- hsize_t dblk_nelmts))
+H5FA__dblock_delete(H5FA_hdr_t *hdr, hid_t dxpl_id, haddr_t dblk_addr))
/* Local variables */
H5FA_dblock_t *dblock = NULL; /* Pointer to data block */
@@ -353,10 +348,9 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Sanity check */
HDassert(hdr);
HDassert(H5F_addr_defined(dblk_addr));
- HDassert(dblk_nelmts > 0);
/* Protect data block */
- if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, dblk_addr, dblk_nelmts, H5AC_WRITE)))
+ if(NULL == (dblock = H5FA__dblock_protect(hdr, dxpl_id, dblk_addr, H5AC_WRITE)))
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block, address = %llu", (unsigned long long)dblk_addr)
/* Check if data block is paged */
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index 4fc7a90..eccdabf 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -394,7 +394,71 @@ END_FUNC(PKG) /* end H5FA__hdr_modified() */
/*-------------------------------------------------------------------------
- * Function: H5FA__hdr_delete
+ * Function: H5FA__hdr_protect
+ *
+ * Purpose: Convenience wrapper around protecting fixed array header
+ *
+ * Return: Non-NULL pointer to index block on success/NULL on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 12 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+BEGIN_FUNC(PKG, ERR,
+H5FA_hdr_t *, NULL, NULL,
+H5FA__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr, void *ctx_udata,
+ H5AC_protect_t rw))
+
+ /* Local variables */
+
+ /* Sanity check */
+ HDassert(f);
+ HDassert(H5F_addr_defined(fa_addr));
+
+ /* Protect the header */
+ if(NULL == (ret_value = (H5FA_hdr_t *)H5AC_protect(f, dxpl_id, H5AC_FARRAY_HDR, fa_addr, ctx_udata, rw)))
+ H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array header, address = %llu", (unsigned long long)fa_addr)
+
+CATCH
+
+END_FUNC(PKG) /* end H5FA__hdr_protect() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5FA__hdr_unprotect
+ *
+ * Purpose: Convenience wrapper around unprotecting fixed array header
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Aug 12 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+BEGIN_FUNC(PKG, ERR,
+herr_t, SUCCEED, FAIL,
+H5FA__hdr_unprotect(H5FA_hdr_t *hdr, hid_t dxpl_id, unsigned cache_flags))
+
+ /* Local variables */
+
+ /* Sanity check */
+ HDassert(hdr);
+
+ /* Unprotect the header */
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_FARRAY_HDR, hdr->addr, hdr, cache_flags) < 0)
+ H5E_THROW(H5E_CANTUNPROTECT, "unable to unprotect fixed array hdr, address = %llu", (unsigned long long)hdr->addr)
+
+CATCH
+
+END_FUNC(PKG) /* end H5EA__hdr_unprotect() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5FA__hdr_delete
*
* Purpose: Delete a fixed array, starting with the header
*
@@ -437,7 +501,7 @@ HDfprintf(stderr, "%s: hdr->dblk_addr = %a\n", FUNC, hdr->dblk_addr);
#endif /* H5FA_DEBUG */
/* Delete Fixed Array Data block */
- if(H5FA__dblock_delete(hdr, dxpl_id, hdr->dblk_addr, hdr->cparam.nelmts) < 0)
+ if(H5FA__dblock_delete(hdr, dxpl_id, hdr->dblk_addr) < 0)
H5E_THROW(H5E_CANTDELETE, "unable to delete fixed array data block")
} /* end if */
diff --git a/src/H5FApkg.h b/src/H5FApkg.h
index 25e90cf..7fc82a9 100644
--- a/src/H5FApkg.h
+++ b/src/H5FApkg.h
@@ -200,7 +200,6 @@ struct H5FA_t {
/* Info needed for loading data block */
typedef struct H5FA_dblock_cache_ud_t {
H5FA_hdr_t *hdr; /* Shared fixed array information */
- hsize_t nelmts; /* Number of elements in data block */
} H5FA_dblock_cache_ud_t;
/* Info needed for loading data block page */
@@ -251,19 +250,22 @@ H5_DLL herr_t H5FA__hdr_decr(H5FA_hdr_t *hdr);
H5_DLL herr_t H5FA__hdr_fuse_incr(H5FA_hdr_t *hdr);
H5_DLL size_t H5FA__hdr_fuse_decr(H5FA_hdr_t *hdr);
H5_DLL herr_t H5FA__hdr_modified(H5FA_hdr_t *hdr);
+H5_DLL H5FA_hdr_t *H5FA__hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t fa_addr,
+ void *ctx_udata, H5AC_protect_t rw);
+H5_DLL herr_t H5FA__hdr_unprotect(H5FA_hdr_t *hdr, hid_t dxpl_id, unsigned cache_flags);
H5_DLL herr_t H5FA__hdr_delete(H5FA_hdr_t *hdr, hid_t dxpl_id);
H5_DLL herr_t H5FA__hdr_dest(H5FA_hdr_t *hdr);
/* Data block routines */
-H5_DLL H5FA_dblock_t *H5FA__dblock_alloc(H5FA_hdr_t *hdr, hsize_t nelmts);
-H5_DLL haddr_t H5FA__dblock_create(H5FA_hdr_t *hdr, hid_t dxpl_id, hbool_t *hdr_dirty, hsize_t nelmts);
+H5_DLL H5FA_dblock_t *H5FA__dblock_alloc(H5FA_hdr_t *hdr);
+H5_DLL haddr_t H5FA__dblock_create(H5FA_hdr_t *hdr, hid_t dxpl_id, hbool_t *hdr_dirty);
H5_DLL unsigned H5FA__dblock_sblk_idx(const H5FA_hdr_t *hdr, hsize_t idx);
H5_DLL H5FA_dblock_t *H5FA__dblock_protect(H5FA_hdr_t *hdr, hid_t dxpl_id,
- haddr_t dblk_addr, hsize_t dblk_nelmts, H5AC_protect_t rw);
+ haddr_t dblk_addr, H5AC_protect_t rw);
H5_DLL herr_t H5FA__dblock_unprotect(H5FA_dblock_t *dblock, hid_t dxpl_id,
unsigned cache_flags);
H5_DLL herr_t H5FA__dblock_delete(H5FA_hdr_t *hdr, hid_t dxpl_id,
- haddr_t dblk_addr, hsize_t dblk_nelmts);
+ haddr_t dblk_addr);
H5_DLL herr_t H5FA__dblock_dest(H5FA_dblock_t *dblock);
/* Data block page routines */
diff --git a/src/H5FD.c b/src/H5FD.c
index 049a6e7..8233543 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -540,11 +540,11 @@ H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf)
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5FD_sb_encode() */
/*-------------------------------------------------------------------------
- * Function: H5FD_sb_decode
+ * Function: H5FD__sb_decode
*
* Purpose: Decodes the driver information block.
*
@@ -556,20 +556,61 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
-H5FD_sb_decode(H5FD_t *file, const char *name, const uint8_t *buf)
+static herr_t
+H5FD__sb_decode(H5FD_t *file, const char *name, const uint8_t *buf)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
HDassert(file && file->cls);
+
+ /* Decode driver information */
if(file->cls->sb_decode && (file->cls->sb_decode)(file, name, buf) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver sb_decode request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_sb_decode() */
+} /* end H5FD__sb_decode() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5FD_sb_load
+ *
+ * Purpose: Validate and decode the driver information block.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ * Programmer: Quincey Koziol
+ * Friday, July 19, 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ HDassert(file && file->cls);
+
+ /* Check if driver matches driver information saved. Unfortunately, we can't push this
+ * function to each specific driver because we're checking if the driver is correct.
+ */
+ if(!HDstrncmp(name, "NCSAfami", (size_t)8) && HDstrcmp(file->cls->name, "family"))
+ HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "family driver should be used")
+ if(!HDstrncmp(name, "NCSAmult", (size_t)8) && HDstrcmp(file->cls->name, "multi"))
+ HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "multi driver should be used")
+
+ /* Decode driver information */
+ if(H5FD__sb_decode(file, name, buf) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTDECODE, FAIL, "unable to decode driver information")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5FD_sb_load() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index e79e1cf..8660f1f 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -587,26 +587,25 @@ H5FD_family_sb_decode(H5FD_t *_file, const char UNUSED *name, const unsigned cha
* h5repart is being used to change member file size. h5repart will open
* files for read and write. When the files are closed, metadata will be
* flushed to the files and updated to this new size */
- if(file->mem_newsize) {
+ if(file->mem_newsize)
file->memb_size = file->pmem_size = file->mem_newsize;
- HGOTO_DONE(ret_value)
- } /* end if */
-
- /* Default - use the saved member size */
- if(file->pmem_size == H5F_FAMILY_DEFAULT)
- file->pmem_size = msize;
+ else {
+ /* Default - use the saved member size */
+ if(file->pmem_size == H5F_FAMILY_DEFAULT)
+ file->pmem_size = msize;
- /* Check if member size from file access property is correct */
- if(msize != file->pmem_size) {
- char err_msg[128];
+ /* Check if member size from file access property is correct */
+ if(msize != file->pmem_size) {
+ char err_msg[128];
- HDsnprintf(err_msg, sizeof(err_msg), "Family member size should be %lu. But the size from file access property is %lu", (unsigned long)msize, (unsigned long)file->pmem_size);
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, err_msg)
- } /* end if */
+ HDsnprintf(err_msg, sizeof(err_msg), "Family member size should be %lu. But the size from file access property is %lu", (unsigned long)msize, (unsigned long)file->pmem_size);
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, err_msg)
+ } /* end if */
- /* Update member file size to the size saved in the superblock.
- * That's the size intended to be. */
- file->memb_size = msize;
+ /* Update member file size to the size saved in the superblock.
+ * That's the size intended to be. */
+ file->memb_size = msize;
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -686,14 +685,11 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
/* Check for new family file size. It's used by h5repart only. */
if(H5P_exist_plist(plist, H5F_ACS_FAMILY_NEWSIZE_NAME) > 0) {
- hsize_t fam_newsize = 0; /* New member size, when repartitioning */
-
/* Get the new family file size */
- if(H5P_get(plist, H5F_ACS_FAMILY_NEWSIZE_NAME, &fam_newsize) < 0)
+ if(H5P_get(plist, H5F_ACS_FAMILY_NEWSIZE_NAME, &file->mem_newsize) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get new family member size")
- /* Store information for later */
- file->mem_newsize = fam_newsize; /* New member size passed in through property */
+ /* Set flag for later */
file->repart_members = TRUE;
} /* end if */
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 20e9a79..0a7fe6c 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -109,7 +109,7 @@ H5_DLL herr_t H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, ha
H5_DLL H5FD_class_t *H5FD_get_class(hid_t id);
H5_DLL hsize_t H5FD_sb_size(H5FD_t *file);
H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf);
-H5_DLL herr_t H5FD_sb_decode(H5FD_t *file, const char *name, const uint8_t *buf);
+H5_DLL herr_t H5FD_sb_load(H5FD_t *file, const char *name, const uint8_t *buf);
H5_DLL void *H5FD_fapl_get(H5FD_t *file);
H5_DLL herr_t H5FD_fapl_open(struct H5P_genplist_t *plist, hid_t driver_id, const void *driver_info);
H5_DLL herr_t H5FD_fapl_close(hid_t driver_id, void *fapl);
diff --git a/src/H5FS.c b/src/H5FS.c
index 295b347..64dfa65 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -118,7 +118,7 @@ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, ncl
/*
* Allocate free space structure
*/
- if(NULL == (fspace = H5FS_new(f, nclasses, classes, cls_init_udata)))
+ if(NULL == (fspace = H5FS__new(f, nclasses, classes, cls_init_udata)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list")
/* Initialize creation information for free space manager */
@@ -157,7 +157,7 @@ HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %a\n", FUNC, fspace, fspace->
done:
if(!ret_value && fspace)
- if(H5FS_hdr_dest(fspace) < 0)
+ if(H5FS__hdr_dest(fspace) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
#ifdef H5FS_DEBUG
@@ -559,7 +559,7 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_va
/*-------------------------------------------------------------------------
- * Function: H5FS_new
+ * Function: H5FS__new
*
* Purpose: Create new free space manager structure
*
@@ -572,14 +572,14 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_va
*-------------------------------------------------------------------------
*/
H5FS_t *
-H5FS_new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes[],
+H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes[],
void *cls_init_udata)
{
H5FS_t *fspace = NULL; /* Free space manager */
size_t u; /* Local index variable */
H5FS_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(nclasses == 0 || (nclasses > 0 && classes));
@@ -617,7 +617,7 @@ H5FS_new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes[
/* Initialize non-zero information for new free space manager */
fspace->addr = HADDR_UNDEF;
- fspace->hdr_size = H5FS_HEADER_SIZE(f);
+ fspace->hdr_size = (size_t)H5FS_HEADER_SIZE(f);
fspace->sect_addr = HADDR_UNDEF;
/* Set return value */
@@ -635,7 +635,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FS_new() */
+} /* H5FS__new() */
/*-------------------------------------------------------------------------
@@ -746,7 +746,7 @@ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fsp
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space header")
} /* end if */
else {
- if(H5FS_hdr_dest(fspace) < 0)
+ if(H5FS__hdr_dest(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "unable to destroy free space header")
} /* end else */
} /* end if */
@@ -1068,7 +1068,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FS_hdr_dest
+ * Function: H5FS__hdr_dest
*
* Purpose: Destroys a free space header in memory.
*
@@ -1080,12 +1080,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_hdr_dest(H5FS_t *fspace)
+H5FS__hdr_dest(H5FS_t *fspace)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1109,7 +1109,7 @@ H5FS_hdr_dest(H5FS_t *fspace)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FS_hdr_dest() */
+} /* end H5FS__hdr_dest() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 27feb63..0cdb1d5 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -38,7 +38,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FSpkg.h" /* File free space */
#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
@@ -168,7 +168,7 @@ H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata);
/* Allocate a new free space manager */
- if(NULL == (fspace = H5FS_new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
+ if(NULL == (fspace = H5FS__new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set free space manager's internal information */
@@ -261,7 +261,7 @@ done:
if(wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
if(!ret_value && fspace)
- if(H5FS_hdr_dest(fspace) < 0)
+ if(H5FS__hdr_dest(fspace) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -462,7 +462,7 @@ H5FS_cache_hdr_dest(H5F_t *f, H5FS_t *fspace)
} /* end if */
/* Destroy free space header */
- if(H5FS_hdr_dest(fspace) < 0)
+ if(H5FS__hdr_dest(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header")
done:
@@ -859,14 +859,12 @@ H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
udata.sect_cnt_size = H5VM_limit_enc_size((uint64_t)sinfo->fspace->serial_sect_count);
/* Iterate over all the bins */
- for(bin = 0; bin < sinfo->nbins; bin++) {
+ for(bin = 0; bin < sinfo->nbins; bin++)
/* Check if there are any sections in this bin */
- if(sinfo->bins[bin].bin_list) {
+ if(sinfo->bins[bin].bin_list)
/* Iterate over list of section size nodes for bin */
if(H5SL_iterate(sinfo->bins[bin].bin_list, H5FS_sinfo_serialize_node_cb, &udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes")
- } /* end if */
- } /* end for */
/* Compute checksum */
metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0);
diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h
index 93fa485..70c83f0 100644
--- a/src/H5FSpkg.h
+++ b/src/H5FSpkg.h
@@ -228,7 +228,7 @@ H5_DLL herr_t H5FS__destroy_flush_depend(H5AC_info_t *parent_entry,
H5AC_info_t *child_entry);
/* Free space manager header routines */
-H5_DLL H5FS_t *H5FS_new(const H5F_t *f, uint16_t nclasses,
+H5_DLL H5FS_t *H5FS__new(const H5F_t *f, uint16_t nclasses,
const H5FS_section_class_t *classes[], void *cls_init_udata);
H5_DLL herr_t H5FS_incr(H5FS_t *fspace);
H5_DLL herr_t H5FS_decr(H5FS_t *fspace);
@@ -238,7 +238,7 @@ H5_DLL herr_t H5FS_dirty(H5FS_t *fspace);
H5_DLL H5FS_sinfo_t *H5FS_sinfo_new(H5F_t *f, H5FS_t *fspace);
/* Routines for destroying structures */
-H5_DLL herr_t H5FS_hdr_dest(H5FS_t *hdr);
+H5_DLL herr_t H5FS__hdr_dest(H5FS_t *hdr);
H5_DLL herr_t H5FS_sinfo_dest(H5FS_sinfo_t *sinfo);
/* Sanity check routines */
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
index c5a500a..7e2ea17 100644
--- a/src/H5Fdeprec.c
+++ b/src/H5Fdeprec.c
@@ -181,7 +181,7 @@ H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo)
HDmemset(finfo, 0, sizeof(*finfo));
/* Get the size of the superblock extension */
- if(H5F_super_size(f, H5AC_ind_dxpl_id, NULL, &finfo->super_ext_size) < 0)
+ if(H5F__super_size(f, H5AC_ind_dxpl_id, NULL, &finfo->super_ext_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock extension size")
/* Check for SOHM info */
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 02fedef..c94eb3f 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1082,7 +1082,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
/* Initialize information about the superblock and allocate space for it */
/* (Writes superblock extension messages, if there are any) */
- if(H5F_super_init(file, dxpl_id) < 0)
+ if(H5F__super_init(file, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to allocate file superblock")
/* Create and open the root group */
@@ -1093,7 +1093,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create/open root group")
} else if (1 == shared->nrefs) {
/* Read the superblock if it hasn't been read before. */
- if(H5F_super_read(file, dxpl_id) < 0)
+ if(H5F__super_read(file, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock")
/* Open the root group */
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 3b6c079..1f187c1 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -252,7 +252,7 @@ H5F_evict_tagged_metadata(H5F_t * f, haddr_t tag, hid_t dxpl_id)
HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "unable to evict tagged metadata")
/* Re-read the superblock. */
- if (H5F_super_read(f, dxpl_id) < 0)
+ if (H5F__super_read(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, FAIL, "unable to read superblock")
done:
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index bc1d6e5..a69f10c 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -306,10 +306,10 @@ H5_DLL int H5F_term_unmount_cb(void *obj_ptr, hid_t obj_id, void *key);
H5_DLL herr_t H5F_mount_count_ids(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs);
/* Superblock related routines */
-H5_DLL herr_t H5F_super_init(H5F_t *f, hid_t dxpl_id);
-H5_DLL herr_t H5F_super_read(H5F_t *f, hid_t dxpl_id);
-H5_DLL herr_t H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_size);
-H5_DLL herr_t H5F_super_free(H5F_super_t *sblock);
+H5_DLL herr_t H5F__super_init(H5F_t *f, hid_t dxpl_id);
+H5_DLL herr_t H5F__super_read(H5F_t *f, hid_t dxpl_id);
+H5_DLL herr_t H5F__super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_size);
+H5_DLL herr_t H5F__super_free(H5F_super_t *sblock);
/* Superblock extension related routines */
H5_DLL herr_t H5F_super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr);
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 845ab8c..6db631e 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -237,7 +237,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5F_super_read
+ * Function: H5F__super_read
*
* Purpose: Reads the superblock from the file or from the BUF. If
* ADDR is a valid address, then it reads it from the file.
@@ -254,17 +254,17 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_super_read(H5F_t *f, hid_t dxpl_id)
+H5F__super_read(H5F_t *f, hid_t dxpl_id)
{
H5P_genplist_t *dxpl; /* DXPL object */
- H5F_super_t * sblock = NULL; /* superblock structure */
+ H5F_super_t * sblock = NULL; /* Superblock structure */
unsigned sblock_flags = H5AC__NO_FLAGS_SET; /* flags used in superblock unprotect call */
haddr_t super_addr; /* Absolute address of superblock */
- H5AC_protect_t rw; /* read/write permissions for file */
+ H5AC_protect_t rw; /* Read/write permissions for file */
hbool_t dirtied = FALSE; /* Bool for sblock protect call */
- herr_t ret_value = SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
/* Get the DXPL plist object for DXPL ID */
if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
@@ -291,7 +291,7 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id)
/* Look up the superblock */
if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, &dirtied, rw)))
- HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "unable to load superblock")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load superblock")
/* Mark the superblock dirty if it was modified during loading or VFD indicated to do so */
if((H5AC_WRITE == rw) && (dirtied || H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_SBLK_LOAD)))
@@ -299,7 +299,7 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id)
/* Pin the superblock in the cache */
if(H5AC_pin_protected_entry(sblock) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTPIN, FAIL, "unable to pin superblock")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTPIN, FAIL, "unable to pin superblock")
/* Set the pointer to the pinned superblock */
f->shared->sblock = sblock;
@@ -307,14 +307,14 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id)
done:
/* Release the superblock */
if(sblock && H5AC_unprotect(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, sblock_flags) < 0)
- HDONE_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "unable to close superblock")
+ HDONE_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, "unable to close superblock")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5F_super_read() */
+} /* end H5F__super_read() */
/*-------------------------------------------------------------------------
- * Function: H5F_super_init
+ * Function: H5F__super_init
*
* Purpose: Allocates the superblock for the file and initializes
* information about the superblock in memory. Writes extension
@@ -330,7 +330,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_super_init(H5F_t *f, hid_t dxpl_id)
+H5F__super_init(H5F_t *f, hid_t dxpl_id)
{
H5F_super_t *sblock = NULL; /* Superblock cache structure */
hbool_t sblock_in_cache = FALSE; /* Whether the superblock has been inserted into the metadata cache */
@@ -344,7 +344,7 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
hbool_t ext_created = FALSE; /* Whether the extension has been created */
herr_t ret_value = SUCCEED; /* Return Value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
/* Allocate space for the superblock */
if(NULL == (sblock = H5FL_CALLOC(H5F_super_t)))
@@ -594,7 +594,7 @@ done:
} /* end if */
else
/* Free superblock */
- if(H5F_super_free(sblock) < 0)
+ if(H5F__super_free(sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to destroy superblock")
/* Reset variables in file structure */
@@ -603,7 +603,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5F_super_init() */
+} /* end H5F__super_init() */
/*-------------------------------------------------------------------------
@@ -641,7 +641,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5F_super_free
+ * Function: H5F__super_free
*
* Purpose: Destroyer the file's superblock
*
@@ -654,9 +654,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_super_free(H5F_super_t *sblock)
+H5F__super_free(H5F_super_t *sblock)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(sblock);
@@ -668,11 +668,11 @@ H5F_super_free(H5F_super_t *sblock)
sblock = (H5F_super_t *)H5FL_FREE(H5F_super_t, sblock);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5F_super_free() */
+} /* H5F__super_free() */
/*-------------------------------------------------------------------------
- * Function: H5F_super_size
+ * Function: H5F__super_size
*
* Purpose: Get storage size of the superblock and superblock extension
*
@@ -685,11 +685,11 @@ H5F_super_free(H5F_super_t *sblock)
*-------------------------------------------------------------------------
*/
herr_t
-H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_size)
+H5F__super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_size)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(f);
@@ -725,7 +725,7 @@ H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize_t *super_ext_
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5F_super_size() */
+} /* H5F__super_size() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 15cd648..c7af083 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -13,6 +13,17 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*-------------------------------------------------------------------------
+ *
+ * Created: H5Fsuper_cache.c
+ * Aug 15 2009
+ * Quincey Koziol <koziol@hdfgroup.org>
+ *
+ * Purpose: Implement file superblock & driver info metadata cache methods.
+ *
+ *-------------------------------------------------------------------------
+ */
+
/****************/
/* Module Setup */
/****************/
@@ -133,7 +144,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
FUNC_ENTER_NOAPI_NOINIT
- /* check arguments */
+ /* Check arguments */
HDassert(f);
HDassert(H5F_addr_eq(addr, 0));
HDassert(dirtied);
@@ -371,14 +382,6 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
drv_name[8] = '\0';
p += 8; /* advance past name/version */
- /* Check if driver matches driver information saved. Unfortunately, we can't push this
- * function to each specific driver because we're checking if the driver is correct.
- */
- if(!HDstrncmp(drv_name, "NCSAfami", (size_t)8) && HDstrcmp(lf->cls->name, "family"))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "family driver should be used")
- if(!HDstrncmp(drv_name, "NCSAmult", (size_t)8) && HDstrcmp(lf->cls->name, "multi"))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "multi driver should be used")
-
/* Read in variable-sized portion of driver info block */
if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE + drv_variable_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed")
@@ -386,7 +389,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read file driver information")
/* Decode driver information */
- if(H5FD_sb_decode(lf, drv_name, p) < 0)
+ if(H5FD_sb_load(lf, drv_name, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to decode driver information")
} /* end if */
} /* end if */
@@ -539,16 +542,8 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
if(NULL == H5O_msg_read(&ext_loc, H5O_DRVINFO_ID, &drvinfo, dxpl_id))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "driver info message not present")
- /* Check if driver matches driver information saved. Unfortunately, we can't push this
- * function to each specific driver because we're checking if the driver is correct.
- */
- if(!HDstrncmp(drvinfo.name, "NCSAfami", (size_t)8) && HDstrcmp(lf->cls->name, "family"))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "family driver should be used")
- if(!HDstrncmp(drvinfo.name, "NCSAmult", (size_t)8) && HDstrcmp(lf->cls->name, "multi"))
- HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "multi driver should be used")
-
/* Decode driver information */
- if(H5FD_sb_decode(lf, drvinfo.name, drvinfo.buf) < 0)
+ if(H5FD_sb_load(lf, drvinfo.name, drvinfo.buf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to decode driver information")
/* Reset driver info message */
@@ -622,7 +617,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, void *_udata)
done:
/* Release the [possibly partially initialized] superblock on errors */
if(!ret_value && sblock)
- if(H5F_super_free(sblock) < 0)
+ if(H5F__super_free(sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTFREE, NULL, "unable to destroy superblock data")
FUNC_LEAVE_NOAPI(ret_value)
@@ -783,7 +778,7 @@ H5F_sblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t UNUSED addr,
* ultimately match it. */
if ((rel_eof = H5FD_get_eoa(f->shared->lf, H5FD_MEM_SUPER)) == HADDR_UNDEF)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
- H5F_addr_encode(f, &p, rel_eof + sblock->base_addr);
+ H5F_addr_encode(f, &p, (rel_eof + sblock->base_addr));
/* Retrieve information for root group */
if(NULL == (root_oloc = H5G_oloc(f->shared->root_grp)))
@@ -891,7 +886,7 @@ H5F_sblock_dest(H5F_t UNUSED *f, H5F_super_t* sblock)
HDassert(sblock);
/* Free superblock */
- if(H5F_super_free(sblock) < 0)
+ if(H5F__super_free(sblock) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "unable to destroy superblock")
done:
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index 15dbf65..d1923a6 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -145,10 +145,10 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
/* Allocate symbol table data structures */
if(NULL == (sym = H5FL_CALLOC(H5G_node_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
- sym->node_size = H5G_NODE_SIZE(f);
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ sym->node_size = (size_t)(H5G_NODE_SIZE(f));
if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f)))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Wrap the local buffer for serialized node info */
if(NULL == (wb = H5WB_wrap(node_buf, sizeof(node_buf))))
@@ -167,12 +167,12 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
/* magic */
if(HDmemcmp(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node signature")
- p += 4;
+ HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node signature")
+ p += H5_SIZEOF_MAGIC;
/* version */
if(H5G_NODE_VERS != *p++)
- HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node version")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "bad symbol table node version")
/* reserved */
p++;
@@ -182,7 +182,7 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata)
/* entries */
if(H5G__ent_decode_vec(f, &p, sym->entry, sym->nsyms) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, NULL, "unable to decode symbol table entries")
/* Set return value */
ret_value = sym;
@@ -248,7 +248,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
/* magic number */
HDmemcpy(p, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC);
- p += 4;
+ p += H5_SIZEOF_MAGIC;
/* version number */
*p++ = H5G_NODE_VERS;
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 0f73c68..e5ea437 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -40,7 +40,7 @@
#include "H5HFpkg.h" /* Fractal heaps */
#include "H5MFprivate.h" /* File memory management */
#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
#include "H5WBprivate.h" /* Wrapped Buffers */
@@ -75,8 +75,8 @@
/********************/
/* Local encode/decode routines */
-static herr_t H5HF_dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable);
-static herr_t H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable);
+static herr_t H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable);
+static herr_t H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable);
/* Metadata cache (H5AC) callbacks */
static H5HF_hdr_t *H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata);
@@ -98,28 +98,16 @@ static herr_t H5HF_cache_dblock_notify(H5C_notify_action_t action, H5HF_direct_t
static herr_t H5HF_cache_dblock_size(const H5F_t *f, const H5HF_direct_t *dblock, size_t *size_ptr);
-/*********************************/
/* Debugging Function Prototypes */
-/*********************************/
#ifndef NDEBUG
-static herr_t H5HF_cache_verify_hdr_descendants_clean(H5F_t *f,
- hid_t dxpl_id,
- H5HF_hdr_t * hdr,
- hbool_t *clean_ptr);
-static herr_t H5HF_cache_verify_iblock_descendants_clean(H5F_t *f,
- hid_t dxpl_id,
- H5HF_indirect_t * iblock,
- unsigned * iblock_status_ptr,
- hbool_t *clean_ptr);
-static herr_t H5HF_cache_verify_iblocks_dblocks_clean(H5F_t *f,
- H5HF_indirect_t * iblock,
- hbool_t *clean_ptr,
- hbool_t *has_dblocks_ptr);
-static herr_t H5HF_cache_verify_descendant_iblocks_clean(H5F_t *f,
- hid_t dxpl_id,
- H5HF_indirect_t * iblock,
- hbool_t *clean_ptr,
- hbool_t *has_iblocks_ptr);
+static herr_t H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, hid_t dxpl_id,
+ H5HF_hdr_t *hdr, hbool_t *clean);
+static herr_t H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, hid_t dxpl_id,
+ H5HF_indirect_t *iblock, unsigned *iblock_status, hbool_t *clean);
+static herr_t H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f,
+ H5HF_indirect_t *iblock, hbool_t *clean, hbool_t *has_dblocks);
+static herr_t H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, hid_t dxpl_id,
+ H5HF_indirect_t *iblock, hbool_t *clean, hbool_t *has_iblocks);
#endif /* NDEBUG */
@@ -176,7 +164,7 @@ H5FL_BLK_DEFINE(direct_block);
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_decode
+ * Function: H5HF__dtable_decode
*
* Purpose: Decodes the metadata for a doubling table
*
@@ -191,9 +179,9 @@ H5FL_BLK_DEFINE(direct_block);
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
+H5HF__dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check arguments */
HDassert(f);
@@ -222,11 +210,11 @@ H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
UINT16DECODE(*pp, dtable->curr_root_rows);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_dtable_decode() */
+} /* end H5HF__dtable_decode() */
/*-------------------------------------------------------------------------
- * Function: H5HF_dtable_encode
+ * Function: H5HF__dtable_encode
*
* Purpose: Encodes the metadata for a doubling table
*
@@ -241,9 +229,9 @@ H5HF_dtable_decode(H5F_t *f, const uint8_t **pp, H5HF_dtable_t *dtable)
*-------------------------------------------------------------------------
*/
static herr_t
-H5HF_dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
+H5HF__dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check arguments */
HDassert(f);
@@ -272,7 +260,7 @@ H5HF_dtable_encode(H5F_t *f, uint8_t **pp, const H5HF_dtable_t *dtable)
UINT16ENCODE(*pp, dtable->curr_root_rows);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5HF_dtable_encode() */
+} /* end H5HF__dtable_encode() */
/*-------------------------------------------------------------------------
@@ -313,7 +301,7 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Allocate space for the fractal heap data structure */
if(NULL == (hdr = H5HF_hdr_alloc(udata->f)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Wrap the local buffer for serialized header info */
if(NULL == (wb = H5WB_wrap(hdr_buf, sizeof(hdr_buf))))
@@ -335,12 +323,12 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Magic number */
if(HDmemcmp(p, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap header signature")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap header signature")
p += H5_SIZEOF_MAGIC;
/* Version */
if(*p++ != H5HF_HDR_VERSION)
- HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap header version")
+ HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap header version")
/* General heap information */
UINT16DECODE(p, hdr->id_len); /* Heap ID length */
@@ -373,7 +361,7 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
H5F_DECODE_LENGTH(udata->f, p, hdr->tiny_nobjs);
/* Managed objects' doubling-table info */
- if(H5HF_dtable_decode(hdr->f, &p, &(hdr->man_dtable)) < 0)
+ if(H5HF__dtable_decode(hdr->f, &p, &(hdr->man_dtable)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, NULL, "unable to encode managed obj. doubling table info")
/* Sanity check */
@@ -443,11 +431,11 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Verify checksum */
if(stored_chksum != computed_chksum)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap header")
/* Finish initialization of heap header */
if(H5HF_hdr_finish_init(hdr) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't finish initializing shared fractal heap header")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, NULL, "can't finish initializing shared fractal heap header")
/* Set return value */
ret_value = hdr;
@@ -499,30 +487,27 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
uint32_t metadata_chksum; /* Computed metadata checksum value */
#ifndef NDEBUG
- /* verify that flush dependencies are working correctly. Do this
+{
+ /* Verify that flush dependencies are working correctly. Do this
* by verifying that either:
*
* 1) the header has a root iblock, and that the root iblock and all
- * of its children are clean, or
+ * of its children are clean, or
*
- * 2) The header has a root dblock, which is clean, or
+ * 2) The header has a root dblock, which is clean, or
*
* 3) The heap is empty, and thus the header has neither a root
- * iblock no a root dblock. In this case, the flush ordering
+ * iblock no a root dblock. In this case, the flush ordering
* constraint is met by default.
*
- * Do this with a call to H5HF_cache_verify_hdr_descendants_clean().
+ * Do this with a call to H5HF__cache_verify_hdr_descendants_clean().
*/
hbool_t descendants_clean = TRUE;
- if ( H5HF_cache_verify_hdr_descendants_clean(f, dxpl_id, hdr,
- &descendants_clean) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "can't verify hdr descendants clean.")
-
- HDassert( descendants_clean );
-
+ if(H5HF__cache_verify_hdr_descendants_clean(f, dxpl_id, hdr, &descendants_clean) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify hdr descendants clean.")
+ HDassert(descendants_clean);
+}
#endif /* NDEBUG */
/* Set the shared heap header's file context for this operation */
@@ -557,8 +542,8 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
/* (bit 0: "huge" object IDs have wrapped) */
/* (bit 1: checksum direct blocks) */
heap_flags = 0;
- heap_flags |= (hdr->huge_ids_wrapped ? H5HF_HDR_FLAGS_HUGE_ID_WRAPPED : 0);
- heap_flags |= (hdr->checksum_dblocks ? H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS : 0);
+ heap_flags = (uint8_t)(heap_flags | (hdr->huge_ids_wrapped ? H5HF_HDR_FLAGS_HUGE_ID_WRAPPED : 0));
+ heap_flags = (uint8_t)(heap_flags | (hdr->checksum_dblocks ? H5HF_HDR_FLAGS_CHECKSUM_DBLOCKS : 0));
*p++ = heap_flags;
/* "Huge" object information */
@@ -581,7 +566,7 @@ H5HF_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5H
H5F_ENCODE_LENGTH(f, p, hdr->tiny_nobjs);
/* Managed objects' doubling-table info */
- if(H5HF_dtable_encode(hdr->f, &p, &(hdr->man_dtable)) < 0)
+ if(H5HF__dtable_encode(hdr->f, &p, &(hdr->man_dtable)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTENCODE, FAIL, "unable to encode managed obj. doubling table info")
/* Check for I/O filter information to encode */
@@ -780,7 +765,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Allocate space for the fractal heap indirect block */
if(NULL == (iblock = H5FL_CALLOC(H5HF_indirect_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Get the pointer to the shared heap header */
hdr = udata->par_info->hdr;
@@ -791,7 +776,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Share common heap information */
iblock->hdr = hdr;
if(H5HF_hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Set block's internal information */
iblock->rc = 0;
@@ -818,17 +803,17 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Magic number */
if(HDmemcmp(p, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap indirect block signature")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap indirect block signature")
p += H5_SIZEOF_MAGIC;
/* Version */
if(*p++ != H5HF_IBLOCK_VERSION)
- HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version")
+ HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version")
/* Address of heap that owns this block */
H5F_addr_decode(udata->f, &p, &heap_addr);
if(H5F_addr_ne(heap_addr, hdr->heap_addr))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block")
/* Address of parent block */
iblock->parent = udata->par_info->iblock;
@@ -856,9 +841,10 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Allocate & decode child block entry tables */
HDassert(iblock->nrows > 0);
if(NULL == (iblock->ents = H5FL_SEQ_MALLOC(H5HF_indirect_ent_t, (size_t)(iblock->nrows * hdr->man_dtable.cparam.width))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct entries")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for direct entries")
+
if(hdr->filter_len > 0) {
- unsigned dir_rows; /* Number of direct rows in this indirect block */
+ unsigned dir_rows; /* Number of direct rows in this indirect block */
/* Compute the number of direct rows for this indirect block */
dir_rows = MIN(iblock->nrows, hdr->man_dtable.max_direct_rows);
@@ -869,6 +855,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
} /* end if */
else
iblock->filt_ents = NULL;
+
for(u = 0; u < (iblock->nrows * hdr->man_dtable.cparam.width); u++) {
/* Decode child block address */
H5F_addr_decode(udata->f, &p, &(iblock->ents[u].addr));
@@ -903,7 +890,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
} /* end for */
/* Sanity check */
- HDassert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
+ HDassert(iblock->nchildren); /* indirect blocks w/no children should have been deleted */
/* Compute checksum on indirect block */
computed_chksum = H5_checksum_metadata(buf, (size_t)(p - (const uint8_t *)buf), 0);
@@ -916,7 +903,7 @@ H5HF_cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Verify checksum */
if(stored_chksum != computed_chksum)
- HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap indirect block")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "incorrect metadata checksum for fractal heap indirect block")
/* Check if we have any indirect block children */
if(iblock->nrows > hdr->man_dtable.max_direct_rows) {
@@ -986,31 +973,26 @@ H5HF_cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
size_t u; /* Local index variable */
#ifndef NDEBUG
- /* verify that flush dependencies are working correctly. Do this
+{
+ /* Verify that flush dependencies are working correctly. Do this
* by verifying that all children of this iblock are clean.
*/
hbool_t descendants_clean = TRUE;
unsigned iblock_status;
- if ( H5AC_get_entry_status(f, iblock->addr, &iblock_status) < 0 )
-
+ if(H5AC_get_entry_status(f, iblock->addr, &iblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status")
- /* since the current iblock is the guest of honor in a flush, we know
+ /* since the current iblock is the guest of honor in a flush, we know
* that it is locked into the cache for the duration of the call. Hence
- * there is no need to check to see if it is pinned or protected, or to
+ * there is no need to check to see if it is pinned or protected, or to
* protect it if it is not.
*/
-
- if ( H5HF_cache_verify_iblock_descendants_clean(f, dxpl_id,
- iblock, &iblock_status,
- &descendants_clean) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "can't verify descendants clean.")
+ if(H5HF__cache_verify_iblock_descendants_clean(f, dxpl_id, iblock, &iblock_status, &descendants_clean) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify descendants clean.")
HDassert(descendants_clean);
-
+}
#endif /* NDEBUG */
/* Get the pointer to the shared heap header */
@@ -1276,99 +1258,78 @@ H5HF_cache_iblock_notify(H5C_notify_action_t action, H5HF_indirect_t *iblock)
HDassert(iblock);
HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(iblock->hdr);
- if ( action == H5C_NOTIFY_ACTION_BEFORE_EVICT )
- HDassert((iblock->parent == iblock->fd_parent) ||
- ((NULL == iblock->parent) && (iblock->fd_parent)));
+
+ if(action == H5AC_NOTIFY_ACTION_BEFORE_EVICT)
+ HDassert((iblock->parent == iblock->fd_parent) || ((NULL == iblock->parent) && (iblock->fd_parent)));
else
- HDassert(iblock->parent == iblock->fd_parent);
+ HDassert(iblock->parent == iblock->fd_parent);
/* further sanity checks */
- if ( iblock->parent == NULL ) {
-
- /* Either this is the root iblock, or the parent pointer is */
+ if(iblock->parent == NULL) {
+ /* Either this is the root iblock, or the parent pointer is */
/* invalid. Since we save a copy of the parent pointer on */
/* the insertion event, it doesn't matter if the parent pointer */
/* is invalid just before eviction. However, we will not be */
/* able to function if it is invalid on the insertion event. */
- /* Scream and die if this is the case. */
-
- HDassert((action == H5C_NOTIFY_ACTION_BEFORE_EVICT) ||
- (iblock->block_off == 0));
+ /* Scream and die if this is the case. */
+ HDassert((action == H5C_NOTIFY_ACTION_BEFORE_EVICT) || (iblock->block_off == 0));
- /* pointer from hdr to root iblock will not be set up unless */
- /* the fractal heap has already pinned the hdr. Do what */
+ /* pointer from hdr to root iblock will not be set up unless */
+ /* the fractal heap has already pinned the hdr. Do what */
/* sanity checking we can. */
-
- if ( ( iblock->block_off == 0 ) &&
- ( iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED ) )
+ if((iblock->block_off == 0) && (iblock->hdr->root_iblock_flags & H5HF_ROOT_IBLOCK_PINNED))
HDassert(iblock->hdr->root_iblock == iblock);
-
- } else {
- /* if this is a child iblock, verify that the pointers are */
+ } /* end if */
+ else {
+ /* if this is a child iblock, verify that the pointers are */
/* either uninitialized or set up correctly. */
H5HF_indirect_t *par_iblock = iblock->parent;
unsigned indir_idx; /* Index in parent's child iblock pointer array */
/* Sanity check */
HDassert(par_iblock->child_iblocks);
- HDassert(iblock->par_entry >= (iblock->hdr->man_dtable.max_direct_rows
- * iblock->hdr->man_dtable.cparam.width));
+ HDassert(iblock->par_entry >= (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width));
/* Compute index in parent's child iblock pointer array */
- indir_idx = iblock->par_entry -
- (iblock->hdr->man_dtable.max_direct_rows
- * iblock->hdr->man_dtable.cparam.width);
+ indir_idx = iblock->par_entry - (iblock->hdr->man_dtable.max_direct_rows * iblock->hdr->man_dtable.cparam.width);
- /* The pointer to iblock in the parent may not be set yet -- */
+ /* The pointer to iblock in the parent may not be set yet -- */
/* verify that it is either NULL, or that it has been set to */
/* iblock. */
- HDassert((NULL == par_iblock->child_iblocks[indir_idx]) ||
- (par_iblock->child_iblocks[indir_idx] == iblock));
- }
-
- switch ( action )
- {
- case H5C_NOTIFY_ACTION_AFTER_INSERT:
- if ( iblock->parent ) /* this is a child iblock */
- {
- /* create flush dependency with parent iblock */
- if(H5AC_create_flush_dependency(iblock->parent, iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, \
- "unable to create flush dependency")
- }
- else /* this is the root iblock */
- {
- /* create flush dependency with header */
- if(H5AC_create_flush_dependency(iblock->hdr, iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, \
- "unable to create flush dependency")
- }
- break;
-
- case H5C_NOTIFY_ACTION_BEFORE_EVICT:
- if ( iblock->fd_parent ) /* this is a child iblock */
- {
- /* destroy flush dependency with parent iblock */
- if(H5AC_destroy_flush_dependency(iblock->fd_parent,
- iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, \
- "unable to destroy flush dependency")
- }
- else /* this is the root iblock */
- {
- /* destroy flush dependency with header */
- if(H5AC_destroy_flush_dependency(iblock->hdr, iblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, \
- "unable to destroy flush dependency")
-
- }
- break;
-
- default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "unknown action from metadata cache")
- break;
- }
+ HDassert((NULL == par_iblock->child_iblocks[indir_idx]) || (par_iblock->child_iblocks[indir_idx] == iblock));
+ } /* end else */
+
+ switch(action) {
+ case H5AC_NOTIFY_ACTION_AFTER_INSERT:
+ if(iblock->parent) { /* this is a child iblock */
+ /* create flush dependency with parent iblock */
+ if(H5AC_create_flush_dependency(iblock->parent, iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency")
+ } /* end if */
+ else { /* this is the root iblock */
+ /* create flush dependency with header */
+ if(H5AC_create_flush_dependency(iblock->hdr, iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency")
+ } /* end else */
+ break;
+
+ case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
+ if(iblock->fd_parent) { /* this is a child iblock */
+ /* destroy flush dependency with parent iblock */
+ if(H5AC_destroy_flush_dependency(iblock->fd_parent, iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
+ } /* end if */
+ else { /* this is the root iblock */
+ /* destroy flush dependency with header */
+ if(H5AC_destroy_flush_dependency(iblock->hdr, iblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
+ } /* end else */
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
+ break;
+ } /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1424,8 +1385,8 @@ H5HF_cache_iblock_size(const H5F_t UNUSED *f, const H5HF_indirect_t *iblock, siz
static H5HF_direct_t *
H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
{
- H5HF_dblock_cache_ud_t *udata = (H5HF_dblock_cache_ud_t *)_udata; /* pointer to user data */
H5HF_hdr_t *hdr; /* Shared fractal heap information */
+ H5HF_dblock_cache_ud_t *udata = (H5HF_dblock_cache_ud_t *)_udata; /* User data for callback */
H5HF_parent_t *par_info; /* Pointer to parent information */
H5HF_direct_t *dblock = NULL; /* Direct block info */
const uint8_t *p; /* Pointer into raw data buffer */
@@ -1443,7 +1404,7 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Allocate space for the fractal heap direct block */
if(NULL == (dblock = H5FL_MALLOC(H5HF_direct_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemset(&dblock->cache_info, 0, sizeof(H5AC_info_t));
/* Get the pointer to the shared heap header */
@@ -1456,7 +1417,7 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Share common heap information */
dblock->hdr = hdr;
if(H5HF_hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINC, NULL, "can't increment reference count on shared heap header")
/* Set block's internal information */
dblock->size = udata->dblock_size;
@@ -1473,7 +1434,7 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
size_t nbytes; /* Number of bytes used in buffer, after applying reverse filters */
void *read_buf; /* Pointer to buffer to read in */
size_t read_size; /* Size of filtered direct block to read */
- unsigned filter_mask; /* Excluded filters for direct block */
+ unsigned filter_mask; /* Excluded filters for direct block */
/* Check for root direct block */
if(par_info->iblock == NULL) {
@@ -1525,17 +1486,17 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* Magic number */
if(HDmemcmp(p, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap direct block signature")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap direct block signature")
p += H5_SIZEOF_MAGIC;
/* Version */
if(*p++ != H5HF_DBLOCK_VERSION)
- HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version")
+ HGOTO_ERROR(H5E_HEAP, H5E_VERSION, NULL, "wrong fractal heap direct block version")
/* Address of heap that owns this block (just for file integrity checks) */
H5F_addr_decode(udata->f, &p, &heap_addr);
if(H5F_addr_ne(heap_addr, hdr->heap_addr))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "incorrect heap header address for direct block")
/* Address of parent block */
dblock->parent = par_info->iblock;
@@ -1973,57 +1934,43 @@ H5HF_cache_dblock_notify(H5C_notify_action_t action, H5HF_direct_t *dblock)
HDassert(dblock);
HDassert(dblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(dblock->hdr);
- HDassert((dblock->fd_parent) ||
- ((dblock->hdr->man_dtable.curr_root_rows == 0) &&
- (dblock->block_off == (hsize_t)0)));
-
- switch ( action )
- {
- case H5C_NOTIFY_ACTION_AFTER_INSERT:
- HDassert(dblock->parent == dblock->fd_parent);
-
- if ( dblock->parent ) /* this is a leaf dblock */
- {
- /* create flush dependency with parent iblock */
- if(H5AC_create_flush_dependency(dblock->parent, dblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, \
- "unable to create flush dependency")
- }
- else /* this is a root dblock */
- {
- /* create flush dependency with header */
- if(H5AC_create_flush_dependency(dblock->hdr, dblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, \
- "unable to create flush dependency")
- }
- break;
-
- case H5C_NOTIFY_ACTION_BEFORE_EVICT:
+ HDassert((dblock->fd_parent) ||
+ ((dblock->hdr->man_dtable.curr_root_rows == 0) && (dblock->block_off == (hsize_t)0)));
+
+ switch(action) {
+ case H5AC_NOTIFY_ACTION_AFTER_INSERT:
+ HDassert(dblock->parent == dblock->fd_parent);
+ if(dblock->parent) { /* this is a leaf dblock */
+ /* create flush dependency with parent iblock */
+ if(H5AC_create_flush_dependency(dblock->parent, dblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency")
+ } /* end if */
+ else { /* this is a root dblock */
+ /* create flush dependency with header */
+ if(H5AC_create_flush_dependency(dblock->hdr, dblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTDEPEND, FAIL, "unable to create flush dependency")
+ } /* end else */
+ break;
+
+ case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
HDassert((dblock->parent == dblock->fd_parent) ||
- ((NULL == dblock->parent) && (dblock->fd_parent)));
- if ( dblock->fd_parent ) /* this is a leaf dblock */
- {
- /* destroy flush dependency with parent iblock */
- if(H5AC_destroy_flush_dependency(dblock->fd_parent,
- dblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, \
- "unable to destroy flush dependency")
- }
- else /* this is a root dblock */
- {
- /* destroy flush dependency with header */
- if(H5AC_destroy_flush_dependency(dblock->hdr, dblock) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, \
- "unable to destroy flush dependency")
-
- }
- break;
-
- default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "unknown action from metadata cache")
- break;
- }
+ ((NULL == dblock->parent) && (dblock->fd_parent)));
+ if(dblock->fd_parent) { /* this is a leaf dblock */
+ /* destroy flush dependency with parent iblock */
+ if(H5AC_destroy_flush_dependency(dblock->fd_parent, dblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
+ } /* end if */
+ else { /* this is a root dblock */
+ /* destroy flush dependency with header */
+ if(H5AC_destroy_flush_dependency(dblock->hdr, dblock) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency")
+ } /* end else */
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown action from metadata cache")
+ break;
+ } /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2063,11 +2010,11 @@ H5HF_cache_dblock_size(const H5F_t UNUSED *f, const H5HF_direct_t *dblock, size_
/*------------------------------------------------------------------------
- * Function: H5HF_cache_verify_hdr_descendants_clean
+ * Function: H5HF__cache_verify_hdr_descendants_clean
*
* Purpose: Sanity checking routine that verifies that all indirect
* and direct blocks that are descendants of the supplied
- * instance of H5HF_hdr_t are clean. Set *clean_ptr to
+ * instance of H5HF_hdr_t are clean. Set *clean to
* TRUE if this is the case, and to FALSE otherwise.
*
* Return: Non-negative on success/Negative on failure
@@ -2079,41 +2026,26 @@ H5HF_cache_dblock_size(const H5F_t UNUSED *f, const H5HF_direct_t *dblock, size_
*/
#ifndef NDEBUG
static herr_t
-H5HF_cache_verify_hdr_descendants_clean(H5F_t *f,
- hid_t dxpl_id,
- H5HF_hdr_t * hdr,
- hbool_t *clean_ptr)
+H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, hid_t dxpl_id,
+ H5HF_hdr_t * hdr, hbool_t *clean)
{
- hbool_t in_cache;
- hbool_t type_ok;
- hbool_t root_iblock_in_cache = FALSE;
- hbool_t unprotect_root_iblock = FALSE;
- unsigned hdr_status = 0;
- unsigned root_iblock_status = 0;
- unsigned root_dblock_status = 0;
- H5HF_indirect_t * root_iblock = NULL;
- haddr_t hdr_addr;
- haddr_t root_iblock_addr = HADDR_UNDEF;
- haddr_t root_dblock_addr;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(FAIL)
+ haddr_t hdr_addr; /* Address of header */
+ unsigned hdr_status = 0; /* Header cache entry status */
+ herr_t ret_value = SUCCEED; /* Return value */
+ FUNC_ENTER_STATIC
+
+ /* Sanity checks */
HDassert(f);
HDassert(hdr);
HDassert(hdr->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((const H5AC_class_t *)(hdr->cache_info.type) == \
- &(H5AC_FHEAP_HDR[0]));
- HDassert(clean_ptr);
-
+ HDassert(hdr->cache_info.type == H5AC_FHEAP_HDR);
+ HDassert(clean);
hdr_addr = hdr->cache_info.addr;
-
HDassert(hdr_addr == hdr->heap_addr);
- if ( H5AC_get_entry_status(f, hdr_addr, &hdr_status) < 0 )
-
+ if(H5AC_get_entry_status(f, hdr_addr, &hdr_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get hdr status")
-
HDassert(hdr_status & H5AC_ES__IN_CACHE);
/* We have three basic scenarios we have to deal with:
@@ -2146,64 +2078,50 @@ H5HF_cache_verify_hdr_descendants_clean(H5F_t *f,
* Since the former case is far and away the most common, we don't
* worry too much about efficiency in the second case.
*/
-
- if ( ( hdr->root_iblock ) ||
- ( ( hdr->man_dtable.curr_root_rows > 0 ) &&
- ( HADDR_UNDEF != hdr->man_dtable.table_addr ) ) ) {
-
- root_iblock = hdr->root_iblock;
-
- /* make note of the on disk address of the root iblock */
-
- if ( root_iblock == NULL ) {
-
+ if(hdr->root_iblock ||
+ ((hdr->man_dtable.curr_root_rows > 0) &&
+ (HADDR_UNDEF != hdr->man_dtable.table_addr))) {
+ H5HF_indirect_t *root_iblock = hdr->root_iblock;
+ haddr_t root_iblock_addr;
+ unsigned root_iblock_status = 0;
+ hbool_t root_iblock_in_cache;
+
+ /* make note of the on disk address of the root iblock */
+ if(root_iblock == NULL)
/* hdr->man_dtable.table_addr must contain address of root
* iblock. Check to see if it is in cache. If it is,
* protect it and put its address in root_iblock.
*/
root_iblock_addr = hdr->man_dtable.table_addr;
-
- } else {
-
+ else
root_iblock_addr = root_iblock->addr;
- }
/* get the status of the root iblock */
HDassert(root_iblock_addr != HADDR_UNDEF);
+ if(H5AC_get_entry_status(f, root_iblock_addr, &root_iblock_status) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get root iblock status")
- if ( H5AC_get_entry_status(f, root_iblock_addr,
- &root_iblock_status) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, \
- "can't get root iblock status")
-
- root_iblock_in_cache = ( (root_iblock_status & H5AC_ES__IN_CACHE) != 0 );
-
+ root_iblock_in_cache = ( (root_iblock_status & H5AC_ES__IN_CACHE) != 0);
HDassert(root_iblock_in_cache || (root_iblock == NULL));
- if ( ! root_iblock_in_cache ) { /* we are done */
-
- *clean_ptr = TRUE;
-
- } else if ( root_iblock_status & H5AC_ES__IS_DIRTY ) {
-
- *clean_ptr = FALSE;
-
- } else { /* must examine children */
+ if(!root_iblock_in_cache) /* we are done */
+ *clean = TRUE;
+ else if(root_iblock_status & H5AC_ES__IS_DIRTY)
+ *clean = FALSE;
+ else { /* must examine children */
+ hbool_t unprotect_root_iblock = FALSE;
/* At this point, the root iblock may be pinned, protected,
* both, or neither, and we may or may not have a pointer
* to root iblock in memory.
*
- * Before we call H5HF_cache_verify_iblock_descendants_clean(),
+ * Before we call H5HF__cache_verify_iblock_descendants_clean(),
* we must ensure that the root iblock is either pinned or
* protected or both, and that we have a pointer to it.
* Do this as follows:
*/
- if ( root_iblock == NULL ) { /* we don't have ptr to root iblock */
-
- if ( 0 == (root_iblock_status & H5AC_ES__IS_PROTECTED) ) {
-
+ if(root_iblock == NULL) { /* we don't have ptr to root iblock */
+ if(0 == (root_iblock_status & H5AC_ES__IS_PROTECTED)) {
/* just protect the root iblock -- this will give us
* the pointer we need to proceed, and ensure that
* it is locked into the metadata cache for the
@@ -2214,21 +2132,11 @@ H5HF_cache_verify_hdr_descendants_clean(H5F_t *f,
* in this case, since we know that the entry is in cache,
* we can pass NULL udata.
*/
-
- root_iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id,
- H5AC_FHEAP_IBLOCK,
- root_iblock_addr,
- NULL, H5AC_READ);
-
- if ( NULL == root_iblock )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, \
- "H5AC_protect() faild.")
-
+ if(NULL == (root_iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, NULL, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.")
unprotect_root_iblock = TRUE;
-
- } else {
-
+ } /* end if */
+ else {
/* the root iblock is protected, and we have no
* legitimate way of getting a pointer to it.
*
@@ -2263,25 +2171,20 @@ H5HF_cache_verify_hdr_descendants_clean(H5F_t *f,
* code, I expect that we will use this approach until it
* causes problems, or we think of a better way.
*/
- if ( H5AC_get_entry_ptr_from_addr(f, root_iblock_addr,
- (void **)(&root_iblock)) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, \
- "H5AC_get_entry_ptr_from_addr() failed.")
-
+ if(H5AC_get_entry_ptr_from_addr(f, root_iblock_addr, (void **)(&root_iblock)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "H5AC_get_entry_ptr_from_addr() failed.")
HDassert(root_iblock);
- }
- } else /* root_iblock != NULL */ {
-
+ } /* end else */
+ } /* end if */
+ else { /* root_iblock != NULL */
/* we have the pointer to the root iblock. Protect it
* if it is neither pinned nor protected -- otherwise we
* are ready to go.
*/
H5HF_indirect_t * iblock = NULL;
- if ( ( (root_iblock_status & H5AC_ES__IS_PINNED) == 0 ) &&
- ( (root_iblock_status & H5AC_ES__IS_PROTECTED) == 0 ) ) {
-
+ if(((root_iblock_status & H5AC_ES__IS_PINNED) == 0) &&
+ ((root_iblock_status & H5AC_ES__IS_PROTECTED) == 0)) {
/* the root iblock is neither pinned nor protected -- hence
* we must protect it before we proceed
*
@@ -2290,82 +2193,49 @@ H5HF_cache_verify_hdr_descendants_clean(H5F_t *f,
* in this case, since we know that the entry is in cache,
* we can pass NULL udata.
*/
-
- iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id,
- H5AC_FHEAP_IBLOCK,
- root_iblock_addr,
- NULL, H5AC_READ);
-
- if ( NULL == iblock )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, \
- "H5AC_protect() faild.")
-
+ if(NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, NULL, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.")
unprotect_root_iblock = TRUE;
-
HDassert(iblock == root_iblock);
-
- }
- }
+ } /* end if */
+ } /* end else */
/* at this point, one way or another, the root iblock is locked
* in memory for the duration of the call. Do some sanity checks,
- * and then call H5HF_cache_verify_iblock_descendants_clean().
+ * and then call H5HF__cache_verify_iblock_descendants_clean().
*/
+ HDassert(hdr->root_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(hdr->root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(hdr->root_iblock->cache_info.magic == \
- H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((const H5AC_class_t *)(hdr->root_iblock->cache_info.type) \
- == &(H5AC_FHEAP_IBLOCK[0]));
-
- if ( H5HF_cache_verify_iblock_descendants_clean(f, dxpl_id,
- root_iblock, &root_iblock_status,
- clean_ptr) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "can't verify root iblock & descendants clean.")
-
+ if(H5HF__cache_verify_iblock_descendants_clean(f, dxpl_id, root_iblock, &root_iblock_status, clean) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify root iblock & descendants clean.")
/* unprotect the root indirect block if required */
- if ( unprotect_root_iblock ) {
-
+ if(unprotect_root_iblock) {
HDassert(root_iblock);
-
- if ( H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_IBLOCK,
- root_iblock_addr, root_iblock,
- H5AC__NO_FLAGS_SET) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, \
- "H5AC_unprotect() faild.")
- }
- }
- } else if ( ( hdr->man_dtable.curr_root_rows == 0 ) &&
- ( HADDR_UNDEF != hdr->man_dtable.table_addr ) ) {
+ if(H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, root_iblock, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "H5AC_unprotect() faild.")
+ } /* end if */
+ } /* end else */
+ } /* end if */
+ else if((hdr->man_dtable.curr_root_rows == 0) &&
+ (HADDR_UNDEF != hdr->man_dtable.table_addr)) {
+ haddr_t root_dblock_addr;
+ unsigned root_dblock_status = 0;
+ hbool_t in_cache;
+ hbool_t type_ok;
/* this is scenario 2 -- we have a root dblock */
-
root_dblock_addr = hdr->man_dtable.table_addr;
+ if(H5AC_get_entry_status(f, root_dblock_addr, &root_dblock_status) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get root dblock status")
- if ( H5AC_get_entry_status(f, root_dblock_addr,
- &root_dblock_status) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, \
- "can't get root dblock status")
-
- if ( root_dblock_status & H5AC_ES__IN_CACHE ) {
-
- if ( H5AC_verify_entry_type(f, root_dblock_addr,
- &H5AC_FHEAP_DBLOCK[0],
- &in_cache, &type_ok) < 0 )
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
- "can't check dblock type")
-
+ if(root_dblock_status & H5AC_ES__IN_CACHE) {
+ if(H5AC_verify_entry_type(f, root_dblock_addr, &H5AC_FHEAP_DBLOCK[0], &in_cache, &type_ok) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type")
HDassert(in_cache);
-
- if ( !type_ok )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "root dblock addr doesn't refer to a dblock?!?")
+ if(!type_ok)
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock addr doesn't refer to a dblock?!?")
/* If a root dblock is in cache, it must have a flush
* dependency relationship with the header, and it
@@ -2376,45 +2246,34 @@ H5HF_cache_verify_hdr_descendants_clean(H5F_t *f,
* the root iblock is a child in some flush dependency
* relationship.
*/
- if ( 0 == (root_dblock_status & H5AC_ES__IS_FLUSH_DEP_CHILD) )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "root dblock in cache and not a flush dep child.")
-
- if ( 0 != (root_dblock_status & H5AC_ES__IS_FLUSH_DEP_PARENT) )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "root dblock in cache and is a flush dep parent.")
-
-
- *clean_ptr = ! (root_dblock_status & H5AC_ES__IS_DIRTY);
-
- } else { /* root dblock not in cache */
-
- *clean_ptr = TRUE;
- }
- } else {
+ if(0 == (root_dblock_status & H5AC_ES__IS_FLUSH_DEP_CHILD))
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock in cache and not a flush dep child.")
+ if(0 != (root_dblock_status & H5AC_ES__IS_FLUSH_DEP_PARENT))
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "root dblock in cache and is a flush dep parent.")
+
+ *clean = ! (root_dblock_status & H5AC_ES__IS_DIRTY);
+ } /* end if */
+ else /* root dblock not in cache */
+ *clean = TRUE;
+ } /* end else-if */
+ else
/* this is scenario 3 -- the fractal heap is empty, and we
* have nothing to do.
*/
- *clean_ptr = TRUE;
- }
+ *clean = TRUE;
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5HF_cache_verify_hdr_descendants_clean() */
-
+} /* H5HF__cache_verify_hdr_descendants_clean() */
#endif /* NDEBUG */
/*------------------------------------------------------------------------
- * Function: H5HF_cache_verify_iblock_descendants_clean
+ * Function: H5HF__cache_verify_iblock_descendants_clean
*
* Purpose: Sanity checking routine that verifies that all indirect
* and direct blocks that are decendents of the supplied
- * instance of H5HF_indirect_t are clean. Set *clean_ptr
+ * instance of H5HF_indirect_t are clean. Set *clean
* to TRUE if this is the case, and to FALSE otherwise.
*
* In passing, the function also does a cursory check to
@@ -2433,7 +2292,7 @@ done:
* met.
*
* Note that this function and
- * H5HF_cache_verify_descendant_iblocks_clean() are
+ * H5HF__cache_verify_descendant_iblocks_clean() are
* recursive co-routines.
*
* Return: Non-negative on success/Negative on failure
@@ -2445,72 +2304,49 @@ done:
*/
#ifndef NDEBUG
static herr_t
-H5HF_cache_verify_iblock_descendants_clean(H5F_t *f,
- hid_t dxpl_id,
- H5HF_indirect_t * iblock,
- unsigned * iblock_status_ptr,
- hbool_t *clean_ptr)
+H5HF__cache_verify_iblock_descendants_clean(H5F_t *f, hid_t dxpl_id,
+ H5HF_indirect_t *iblock, unsigned *iblock_status, hbool_t *clean)
{
hbool_t has_dblocks = FALSE;
hbool_t has_iblocks = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
+ /* Sanity checks */
HDassert(f);
HDassert(iblock);
HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert((const H5AC_class_t *)(iblock->cache_info.type) == \
- &(H5AC_FHEAP_IBLOCK[0]));
- HDassert(iblock_status_ptr);
- HDassert(clean_ptr);
- HDassert(*clean_ptr);
-
- if ( ( *clean_ptr ) &&
- ( H5HF_cache_verify_iblocks_dblocks_clean(f, iblock, clean_ptr,
- &has_dblocks) < 0 ) )
+ HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ HDassert(iblock_status);
+ HDassert(clean);
+ HDassert(*clean);
+
+ if((*clean) && H5HF__cache_verify_iblocks_dblocks_clean(f, iblock, clean, &has_dblocks) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify dblocks clean.")
- if ( ( *clean_ptr ) &&
- ( H5HF_cache_verify_descendant_iblocks_clean(f, dxpl_id, iblock,
- clean_ptr, &has_iblocks) < 0 ) )
+ if((*clean) && H5HF__cache_verify_descendant_iblocks_clean(f, dxpl_id, iblock, clean, &has_iblocks) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify iblocks clean.")
- if ( ( NULL == iblock_status_ptr ) &&
- ( H5AC_get_entry_status(f, iblock->addr, iblock_status_ptr) < 0 ) )
-
+ if((NULL == iblock_status) && H5AC_get_entry_status(f, iblock->addr, iblock_status) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status")
/* verify that flush dependency setup is plausible */
-
- if ( 0 == (*iblock_status_ptr & H5AC_ES__IS_FLUSH_DEP_CHILD) )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "iblock is not a flush dep child.")
-
- if ( ( ( has_dblocks || has_iblocks ) ) &&
- ( 0 == (*iblock_status_ptr & H5AC_ES__IS_FLUSH_DEP_PARENT) ) )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "iblock has children and is not a flush dep parent.")
-
- if ( ( ( has_dblocks || has_iblocks ) ) &&
- ( 0 == (*iblock_status_ptr & H5AC_ES__IS_PINNED) ) )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "iblock has children and is not pinned.")
+ if(0 == (*iblock_status & H5AC_ES__IS_FLUSH_DEP_CHILD))
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock is not a flush dep child.")
+ if(((has_dblocks || has_iblocks)) && (0 == (*iblock_status & H5AC_ES__IS_FLUSH_DEP_PARENT)))
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock has children and is not a flush dep parent.")
+ if(((has_dblocks || has_iblocks)) && (0 == (*iblock_status & H5AC_ES__IS_PINNED)))
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "iblock has children and is not pinned.")
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5HF_cache_verify_iblock_descendants_clean() */
-
+} /* H5HF__cache_verify_iblock_descendants_clean() */
#endif /* NDEBUG */
/*------------------------------------------------------------------------
- * Function: H5HF_cache_verify_iblocks_dblocks_clean
+ * Function: H5HF__cache_verify_iblocks_dblocks_clean
*
* Purpose: Sanity checking routine that attempts to verify that all
* direct blocks pointed to by the supplied indirect block
@@ -2538,71 +2374,53 @@ done:
*/
#ifndef NDEBUG
static herr_t
-H5HF_cache_verify_iblocks_dblocks_clean(H5F_t *f,
- H5HF_indirect_t * iblock,
- hbool_t *clean_ptr,
- hbool_t *has_dblocks_ptr)
+H5HF__cache_verify_iblocks_dblocks_clean(H5F_t *f, H5HF_indirect_t *iblock,
+ hbool_t *clean, hbool_t *has_dblocks)
{
- hbool_t in_cache;
- hbool_t type_ok;
- unsigned i;
unsigned num_direct_rows;
unsigned max_dblock_index;
- haddr_t dblock_addr;
- unsigned dblock_status = 0;
+ unsigned i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
+ /* Sanity checks */
HDassert(f);
HDassert(iblock);
HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
- HDassert(clean_ptr);
- HDassert(*clean_ptr);
- HDassert(has_dblocks_ptr);
+ HDassert(clean);
+ HDassert(*clean);
+ HDassert(has_dblocks);
i = 0;
-
- num_direct_rows =
- MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
-
- HDassert(num_direct_rows <= iblock->nrows );
-
- max_dblock_index =
- (num_direct_rows * iblock->hdr->man_dtable.cparam.width) - 1;
-
- while ( ( *clean_ptr ) && ( i <= max_dblock_index ) ) {
+ num_direct_rows = MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
+ HDassert(num_direct_rows <= iblock->nrows);
+ max_dblock_index = (num_direct_rows * iblock->hdr->man_dtable.cparam.width) - 1;
+ while((*clean) && (i <= max_dblock_index)) {
+ haddr_t dblock_addr;
dblock_addr = iblock->ents[i].addr;
+ if(H5F_addr_defined(dblock_addr)) {
+ hbool_t in_cache;
+ hbool_t type_ok;
- if ( H5F_addr_defined(dblock_addr) ) {
-
- if ( H5AC_verify_entry_type(f, dblock_addr, &H5AC_FHEAP_DBLOCK[0],
- &in_cache, &type_ok) < 0 )
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
- "can't check dblock type")
-
- if ( in_cache ) { /* dblock is in cache */
-
- if ( ! type_ok )
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "dblock addr doesn't refer to a dblock?!?")
+ if(H5AC_verify_entry_type(f, dblock_addr, &H5AC_FHEAP_DBLOCK[0], &in_cache, &type_ok) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't check dblock type")
- if ( H5AC_get_entry_status(f, dblock_addr,
- &dblock_status) < 0 )
+ if(in_cache) { /* dblock is in cache */
+ unsigned dblock_status = 0;
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL,
- "can't get dblock status")
+ if(!type_ok)
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "dblock addr doesn't refer to a dblock?!?")
- HDassert(dblock_status & H5AC_ES__IN_CACHE );
+ if(H5AC_get_entry_status(f, dblock_addr, &dblock_status) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get dblock status")
+ HDassert(dblock_status & H5AC_ES__IN_CACHE);
- *has_dblocks_ptr = TRUE;
-
- if ( dblock_status & H5AC_ES__IS_DIRTY ) {
-
- *clean_ptr = FALSE;
- }
+ *has_dblocks = TRUE;
+ if(dblock_status & H5AC_ES__IS_DIRTY)
+ *clean = FALSE;
/* If a child dblock is in cache, it must have a flush
* dependency relationship with this iblock, and it
@@ -2613,33 +2431,26 @@ H5HF_cache_verify_iblocks_dblocks_clean(H5F_t *f,
* the child iblock is a child in some flush dependency
* relationship.
*/
- if ( 0 == (dblock_status & H5AC_ES__IS_FLUSH_DEP_CHILD) )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "dblock in cache and not a flush dep child.")
+ if(0 == (dblock_status & H5AC_ES__IS_FLUSH_DEP_CHILD))
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "dblock in cache and not a flush dep child.")
- if ( 0 != (dblock_status & H5AC_ES__IS_FLUSH_DEP_PARENT) )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "dblock in cache and is a flush dep parent.")
+ if(0 != (dblock_status & H5AC_ES__IS_FLUSH_DEP_PARENT))
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "dblock in cache and is a flush dep parent.")
- }
- }
+ } /* end if */
+ } /* end if */
i++;
- }
+ } /* end while */
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5HF_cache_verify_iblocks_dblocks_clean() */
-
+} /* H5HF__cache_verify_iblocks_dblocks_clean() */
#endif /* NDEBUG */
/*------------------------------------------------------------------------
- * Function: H5HF_cache_verify_descendant_iblocks_clean
+ * Function: H5HF__cache_verify_descendant_iblocks_clean
*
* Purpose: Sanity checking routine that attempts to verify that all
* direct blocks pointed to by the supplied indirect block
@@ -2667,70 +2478,52 @@ done:
*/
#ifndef NDEBUG
static herr_t
-H5HF_cache_verify_descendant_iblocks_clean(H5F_t *f,
- hid_t dxpl_id,
- H5HF_indirect_t * iblock,
- hbool_t *clean_ptr,
- hbool_t *has_iblocks_ptr)
+H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, hid_t dxpl_id,
+ H5HF_indirect_t *iblock, hbool_t *clean, hbool_t *has_iblocks)
{
- hbool_t unprotect_child_iblock;
- unsigned i;
unsigned first_iblock_index;
unsigned last_iblock_index;
unsigned num_direct_rows;
- unsigned child_iblock_status = 0;
- haddr_t child_iblock_addr;
- H5HF_indirect_t * child_iblock_ptr;
+ unsigned i;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
+ /* Sanity checks */
HDassert(f);
HDassert(iblock);
HDassert(iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(iblock->cache_info.type == &(H5AC_FHEAP_IBLOCK[0]));
- HDassert(clean_ptr);
- HDassert(*clean_ptr);
- HDassert(has_iblocks_ptr);
-
- num_direct_rows =
- MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
-
- HDassert(num_direct_rows <= iblock->nrows );
+ HDassert(iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ HDassert(clean);
+ HDassert(*clean);
+ HDassert(has_iblocks);
+ num_direct_rows = MIN(iblock->nrows, iblock->hdr->man_dtable.max_direct_rows);
+ HDassert(num_direct_rows <= iblock->nrows);
first_iblock_index = num_direct_rows * iblock->hdr->man_dtable.cparam.width;
- last_iblock_index =
- (iblock->nrows * iblock->hdr->man_dtable.cparam.width) - 1;
+ last_iblock_index = (iblock->nrows * iblock->hdr->man_dtable.cparam.width) - 1;
i = first_iblock_index;
+ while((*clean) && (i <= last_iblock_index)) {
+ haddr_t child_iblock_addr = iblock->ents[i].addr;
- while ( ( *clean_ptr ) && ( i <= last_iblock_index ) ) {
-
- child_iblock_addr = iblock->ents[i].addr;
-
- if ( H5F_addr_defined(child_iblock_addr) ) {
+ if(H5F_addr_defined(child_iblock_addr)) {
+ unsigned child_iblock_status = 0;
- if ( H5AC_get_entry_status(f, child_iblock_addr,
- &child_iblock_status) < 0 )
+ if(H5AC_get_entry_status(f, child_iblock_addr, &child_iblock_status) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get iblock status")
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, \
- "can't get iblock status")
+ if(child_iblock_status & H5AC_ES__IN_CACHE) {
+ *has_iblocks = TRUE;
+ if(child_iblock_status & H5AC_ES__IS_DIRTY)
+ *clean = FALSE;
- if ( child_iblock_status & H5AC_ES__IN_CACHE ) {
-
- *has_iblocks_ptr = TRUE;
-
- if ( child_iblock_status & H5AC_ES__IS_DIRTY ) {
-
- *clean_ptr = FALSE;
- }
-
- /* if the child iblock is in cache and *clean_ptr is TRUE,
+ /* if the child iblock is in cache and *clean is TRUE,
* we must continue to explore down the fractal heap tree
* structure to verify that all descendant blocks are either
* clean, or not in the metadata cache. We do this with a
* recursive call to
- * H5HF_cache_verify_iblock_descendants_clean().
+ * H5HF__cache_verify_iblock_descendants_clean().
* However, we can't make this call unless the child iblock
* is somehow locked into the cache -- typically via either
* pinning or protecting.
@@ -2776,102 +2569,69 @@ H5HF_cache_verify_descendant_iblocks_clean(H5F_t *f,
* expect that we will use this approach until it causes
* problems, or we think of a better way.
*/
- if ( *clean_ptr ) {
-
- child_iblock_ptr = NULL;
- unprotect_child_iblock = FALSE;
+ if(*clean) {
+ H5HF_indirect_t *child_iblock = NULL;
+ hbool_t unprotect_child_iblock = FALSE;
- if ( 0 == (child_iblock_status & H5AC_ES__IS_PINNED)) {
-
+ if(0 == (child_iblock_status & H5AC_ES__IS_PINNED)) {
/* child iblock is not pinned */
-
- if (0 == (child_iblock_status & H5AC_ES__IS_PROTECTED)){
-
+ if(0 == (child_iblock_status & H5AC_ES__IS_PROTECTED)) {
/* child iblock is unprotected, and unpinned */
/* protect it. Note that the udata is only */
/* used in the load callback. While the */
/* fractal heap makes heavy use of the udata */
/* in this case, since we know that the */
/* entry is in cache, we can pass NULL udata */
- child_iblock_ptr = (H5HF_indirect_t *)
- H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK,
- child_iblock_addr,
- NULL, H5AC_READ);
-
- if ( NULL == child_iblock_ptr )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, \
- "H5AC_protect() faild.")
+ if(NULL == (child_iblock = (H5HF_indirect_t *) H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, child_iblock_addr, NULL, H5AC_READ)))
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.")
unprotect_child_iblock = TRUE;
-
- } else {
-
+ } /* end if */
+ else {
/* child iblock is protected -- use */
/* H5AC_get_entry_ptr_from_addr() to get a */
/* pointer to the entry. This is very slimy -- */
/* come up with a better solution. */
- if ( H5AC_get_entry_ptr_from_addr(f,
- child_iblock_addr,
- (void **)(&child_iblock_ptr)) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, \
- "H5AC_get_entry_ptr_from_addr() faild.")
-
- HDassert ( child_iblock_ptr );
- }
- } else {
+ if(H5AC_get_entry_ptr_from_addr(f, child_iblock_addr, (void **)(&child_iblock)) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "H5AC_get_entry_ptr_from_addr() faild.")
+ HDassert(child_iblock);
+ } /* end else */
+ } /* end if */
+ else {
/* child iblock is pinned -- look it up in the */
/* parent iblocks child_iblocks array. */
-
HDassert(iblock->child_iblocks);
-
- child_iblock_ptr =
- iblock->child_iblocks[i - first_iblock_index];
- }
+ child_iblock = iblock->child_iblocks[i - first_iblock_index];
+ } /* end else */
/* At this point, one way or another we should have
* a pointer to the child iblock. Verify that we
* that we have the correct one.
*/
- HDassert(child_iblock_ptr);
- HDassert(child_iblock_ptr->cache_info.magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(child_iblock_ptr->cache_info.type ==
- H5AC_FHEAP_IBLOCK);
- HDassert(child_iblock_ptr->addr == child_iblock_addr);
+ HDassert(child_iblock);
+ HDassert(child_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(child_iblock->cache_info.type == H5AC_FHEAP_IBLOCK);
+ HDassert(child_iblock->addr == child_iblock_addr);
/* now make the recursive call */
- if ( H5HF_cache_verify_iblock_descendants_clean(f, dxpl_id,
- child_iblock_ptr, &child_iblock_status,
- clean_ptr) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, \
- "can't verify child iblock clean.")
+ if(H5HF__cache_verify_iblock_descendants_clean(f, dxpl_id, child_iblock, &child_iblock_status, clean) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify child iblock clean.")
/* if we protected the child iblock, unprotect it now */
- if ( unprotect_child_iblock ) {
-
- if ( H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_IBLOCK,
- child_iblock_addr, child_iblock_ptr,
- H5AC__NO_FLAGS_SET) < 0 )
-
- HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, \
- "H5AC_unprotect() faild.")
+ if(unprotect_child_iblock) {
+ if(H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_IBLOCK, child_iblock_addr, child_iblock, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "H5AC_unprotect() faild.")
- }
- }
- }
- }
+ } /* end if */
+ } /* end if */
+ } /* end if */
+ } /* end if */
i++;
- }
+ } /* end while */
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5HF_cache_verify_descendant_iblocks_clean() */
-
+} /* H5HF__cache_verify_descendant_iblocks_clean() */
#endif /* NDEBUG */
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index ab6ab2c..2951ef8 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -611,7 +611,7 @@ H5HL__datablock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata))
H5HL_dblk_t *dblk = NULL; /* Local heap data block deserialized */
H5HL_cache_dblk_ud_t *udata = (H5HL_cache_dblk_ud_t *)_udata; /* User data for callback */
- /* check arguments */
+ /* Check arguments */
HDassert(f);
HDassert(H5F_addr_defined(addr));
HDassert(udata);
@@ -721,7 +721,7 @@ BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
H5HL__datablock_dest(H5F_t *f, H5HL_dblk_t *dblk))
- /* check arguments */
+ /* Check arguments */
HDassert(dblk);
HDassert(dblk->heap);
HDassert(!dblk->heap->single_cache_obj);
@@ -767,7 +767,7 @@ BEGIN_FUNC(STATIC, ERR,
herr_t, SUCCEED, FAIL,
H5HL__datablock_clear(H5F_t *f, H5HL_dblk_t *dblk, hbool_t destroy))
- /* check arguments */
+ /* Check arguments */
HDassert(dblk);
/* Mark local heap data block as clean */
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 03b0ac5..b34df8f 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -88,15 +88,15 @@ static herr_t H5O_cache_chk_notify(H5AC_notify_action_t action, H5O_chunk_proxy_
static herr_t H5O_cache_chk_size(const H5F_t *f, const H5O_chunk_proxy_t *chk_proxy, size_t *size_ptr);
/* Chunk proxy routines */
-static herr_t H5O_chunk_proxy_dest(H5O_chunk_proxy_t *chunk_proxy);
+static herr_t H5O__chunk_proxy_dest(H5O_chunk_proxy_t *chunk_proxy);
/* Chunk routines */
-static herr_t H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len,
+static herr_t H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len,
const uint8_t *image, H5O_common_cache_ud_t *udata, hbool_t *dirty);
-static herr_t H5O_chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno);
+static herr_t H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno);
/* Misc. routines */
-static herr_t H5O_add_cont_msg(H5O_cont_msgs_t *cont_msg_info,
+static herr_t H5O__add_cont_msg(H5O_cont_msgs_t *cont_msg_info,
const H5O_cont_t *cont);
static herr_t H5O_decode_prefix(H5F_t *f, H5O_t *oh, const uint8_t *buf, void *_udata);
@@ -402,7 +402,7 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
buf = read_buf;
/* Parse the first chunk */
- if(H5O_chunk_deserialize(oh, udata->common.addr, oh->chunk0_size, buf, &(udata->common), &oh->cache_info.is_dirty) < 0)
+ if(H5O__chunk_deserialize(oh, udata->common.addr, oh->chunk0_size, buf, &(udata->common), &oh->cache_info.is_dirty) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize first object header chunk")
/* Note that we've loaded the object header from the file */
@@ -419,7 +419,7 @@ done:
/* Release the [possibly partially initialized] object header on errors */
if(!ret_value && oh)
if(H5O_free(oh) < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data")
+ HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header data")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_load() */
@@ -549,7 +549,7 @@ H5O_assert(oh);
HDassert((size_t)(p - oh->chunk[0].image) == (size_t)(H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_OH(oh)));
/* Serialize messages for this chunk */
- if(H5O_chunk_serialize(f, oh, (unsigned)0) < 0)
+ if(H5O__chunk_serialize(f, oh, (unsigned)0) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize first object header chunk")
/* Write the chunk out */
@@ -591,7 +591,7 @@ H5O_dest(H5F_t *f, H5O_t *oh)
FUNC_ENTER_NOAPI_NOINIT
- /* check args */
+ /* Check arguments */
HDassert(oh);
HDassert(oh->rc == 0);
@@ -654,7 +654,7 @@ H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy)
FUNC_ENTER_NOAPI_NOINIT
- /* check args */
+ /* Check arguments */
HDassert(oh);
#ifdef H5_HAVE_PARALLEL
@@ -672,16 +672,13 @@ H5O_clear(H5F_t *f, H5O_t *oh, hbool_t destroy)
for ( i = 0; i < oh->nchunks; i++ ) {
- if ( H5O_chunk_serialize(f, oh, i) < 0 ) {
-
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL,
- "unable to serialize object header chunk")
- }
+ if(H5O__chunk_serialize(f, oh, i) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header chunk")
}
}
#endif /* H5_HAVE_PARALLEL */
- /* Mark messages as clean */
+ /* Mark messages stored with the object header (i.e. messages in chunk 0) as clean */
for(u = 0; u < oh->nmesgs; u++)
oh->mesg[u].dirty = FALSE;
@@ -791,7 +788,7 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata->common.cont_msg_info);
/* Parse the chunk */
- if(H5O_chunk_deserialize(udata->oh, udata->common.addr, udata->size, buf, &(udata->common), &chk_proxy->cache_info.is_dirty) < 0)
+ if(H5O__chunk_deserialize(udata->oh, udata->common.addr, udata->size, buf, &(udata->common), &chk_proxy->cache_info.is_dirty) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't deserialize object header chunk")
/* Set the fields for the chunk proxy */
@@ -806,8 +803,8 @@ H5O_cache_chk_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
chk_proxy->oh = udata->oh;
chk_proxy->chunkno = udata->chunkno;
- /* Sanity check that the chunk representation we have in memory is the same
- * as the one being brought in from disk.
+ /* Sanity check that the chunk representation we have in memory is
+ * the same as the one being brought in from disk.
*/
HDassert(0 == HDmemcmp(buf, chk_proxy->oh->chunk[chk_proxy->chunkno].image, chk_proxy->oh->chunk[chk_proxy->chunkno].size));
} /* end else */
@@ -826,7 +823,7 @@ done:
/* Release the [possibly partially initialized] object header on errors */
if(!ret_value && chk_proxy)
- if(H5O_chunk_proxy_dest(chk_proxy) < 0)
+ if(H5O__chunk_proxy_dest(chk_proxy) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, NULL, "unable to destroy object header chunk proxy")
FUNC_LEAVE_NOAPI(ret_value)
@@ -857,7 +854,7 @@ H5O_cache_chk_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
/* flush */
if(chk_proxy->cache_info.is_dirty) {
/* Serialize messages for this chunk */
- if(H5O_chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0)
+ if(H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header continuation chunk")
/* Write the chunk out */
@@ -919,7 +916,7 @@ H5O_cache_chk_dest(H5F_t *f, H5O_chunk_proxy_t *chk_proxy)
} /* end if */
/* Destroy object header chunk proxy */
- if(H5O_chunk_proxy_dest(chk_proxy) < 0)
+ if(H5O__chunk_proxy_dest(chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to destroy object header chunk proxy")
done:
@@ -972,18 +969,13 @@ H5O_cache_chk_clear(H5F_t *f, H5O_chunk_proxy_t *chk_proxy, hbool_t destroy)
FUNC_ENTER_NOAPI_NOINIT
- /* check args */
+ /* Check arguments */
HDassert(chk_proxy);
#ifdef H5_HAVE_PARALLEL
- if ( ( chk_proxy->oh->cache_info.is_dirty ) && ( ! destroy ) ) {
-
- if ( H5O_chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0 ) {
-
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL,
- "unable to serialize object header chunk")
- }
- }
+ if((chk_proxy->oh->cache_info.is_dirty) && (!destroy))
+ if(H5O__chunk_serialize(f, chk_proxy->oh, chk_proxy->chunkno) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSERIALIZE, FAIL, "unable to serialize object header chunk")
#endif /* H5_HAVE_PARALLEL */
/* Mark messages in chunk as clean */
@@ -1106,7 +1098,7 @@ H5O_cache_chk_size(const H5F_t UNUSED *f, const H5O_chunk_proxy_t *chk_proxy, si
/*-------------------------------------------------------------------------
- * Function: H5O_add_cont_msg
+ * Function: H5O__add_cont_msg
*
* Purpose: Add information from a continuation message to the list of
* continuation messages in the object header
@@ -1121,12 +1113,12 @@ H5O_cache_chk_size(const H5F_t UNUSED *f, const H5O_chunk_proxy_t *chk_proxy, si
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont)
+H5O__add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont)
{
size_t contno; /* Continuation message index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
HDassert(cont_msg_info);
@@ -1151,11 +1143,11 @@ H5O_add_cont_msg(H5O_cont_msgs_t *cont_msg_info, const H5O_cont_t *cont)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_add_cont_msg() */
+} /* H5O__add_cont_msg() */
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_deserialize
+ * Function: H5O__chunk_deserialize
*
* Purpose: Deserialize a chunk for an object header
*
@@ -1169,7 +1161,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
+H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
H5O_common_cache_ud_t *udata, hbool_t *dirty)
{
const uint8_t *p; /* Pointer into buffer to decode */
@@ -1182,7 +1174,7 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
#endif /* NDEBUG */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
HDassert(oh);
@@ -1203,7 +1195,7 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
} /* end if */
/* Init the chunk data info */
- chunkno = oh->nchunks++;
+ chunkno = (unsigned)oh->nchunks++;
oh->chunk[chunkno].gap = 0;
if(chunkno == 0) {
/* First chunk's 'image' includes room for the object header prefix */
@@ -1434,7 +1426,7 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
oh->mesg[curmesg].native = cont;
/* Add to continuation messages left to interpret */
- if(H5O_add_cont_msg(udata->cont_msg_info, cont) < 0)
+ if(H5O__add_cont_msg(udata->cont_msg_info, cont) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't add continuation message")
/* Mark the message & chunk as dirty if the message was changed by decoding */
@@ -1490,11 +1482,11 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_chunk_deserialize() */
+} /* H5O__chunk_deserialize() */
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_serialize
+ * Function: H5O__chunk_serialize
*
* Purpose: Serialize a chunk for an object header
*
@@ -1508,13 +1500,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
+H5O__chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
{
H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
HDassert(f);
@@ -1555,11 +1547,11 @@ H5O_chunk_serialize(const H5F_t *f, H5O_t *oh, unsigned chunkno)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5O_chunk_serialize() */
+} /* H5O__chunk_serialize() */
/*-------------------------------------------------------------------------
- * Function: H5O_chunk_proxy_dest
+ * Function: H5O__chunk_proxy_dest
*
* Purpose: Destroy a chunk proxy object
*
@@ -1573,11 +1565,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_chunk_proxy_dest(H5O_chunk_proxy_t *chk_proxy)
+H5O__chunk_proxy_dest(H5O_chunk_proxy_t *chk_proxy)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check arguments */
HDassert(chk_proxy);
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index f70fa72..d361194 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -73,10 +73,10 @@ typedef struct {
/* Local Prototypes */
/********************/
-static herr_t H5O_msg_reset_real(const H5O_msg_class_t *type, void *native);
-static herr_t H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
+static herr_t H5O__msg_reset_real(const H5O_msg_class_t *type, void *native);
+static herr_t H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
unsigned sequence, unsigned *oh_modified, void *_udata/*in,out*/);
-static herr_t H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
+static herr_t H5O__copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
const H5O_msg_class_t *type, const void *mesg, unsigned mesg_flags,
unsigned update_flags);
@@ -224,7 +224,7 @@ H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *t
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create new message")
/* Copy the information for the message */
- if(H5O_copy_mesg(f, dxpl_id, oh, idx, type, mesg, mesg_flags, update_flags) < 0)
+ if(H5O__copy_mesg(f, dxpl_id, oh, idx, type, mesg, mesg_flags, update_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to write message")
#ifdef H5O_DEBUG
H5O_assert(oh);
@@ -426,7 +426,7 @@ H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *ty
} /* end if */
/* Copy the information for the message */
- if(H5O_copy_mesg(f, dxpl_id, oh, idx, type, mesg, mesg_flags, update_flags) < 0)
+ if(H5O__copy_mesg(f, dxpl_id, oh, idx, type, mesg, mesg_flags, update_flags) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to write message")
#ifdef H5O_DEBUG
H5O_assert(oh);
@@ -586,7 +586,7 @@ H5O_msg_reset(unsigned type_id, void *native)
HDassert(type);
/* Call the "real" reset routine */
- if(H5O_msg_reset_real(type, native) < 0)
+ if(H5O__msg_reset_real(type, native) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRESET, FAIL, "unable to reset object header")
done:
@@ -595,7 +595,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_msg_reset_real
+ * Function: H5O__msg_reset_real
*
* Purpose: Some message data structures have internal fields that
* need to be freed. This function does that if appropriate
@@ -610,11 +610,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_msg_reset_real(const H5O_msg_class_t *type, void *native)
+H5O__msg_reset_real(const H5O_msg_class_t *type, void *native)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(type);
@@ -630,7 +630,7 @@ H5O_msg_reset_real(const H5O_msg_class_t *type, void *native)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_msg_reset_real() */
+} /* end H5O__msg_reset_real() */
/*-------------------------------------------------------------------------
@@ -719,7 +719,7 @@ H5O_msg_free_real(const H5O_msg_class_t *type, void *msg_native)
HDassert(type);
if(msg_native) {
- H5O_msg_reset_real(type, msg_native);
+ H5O__msg_reset_real(type, msg_native);
if(NULL != (type->free))
(type->free)(msg_native);
else
@@ -1049,7 +1049,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_msg_remove_cb
+ * Function: H5O__msg_remove_cb
*
* Purpose: Object header iterator callback routine to remove messages
* of a particular type that match a particular sequence number,
@@ -1064,14 +1064,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
+H5O__msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
unsigned *oh_modified, void *_udata/*in,out*/)
{
H5O_iter_rm_t *udata = (H5O_iter_rm_t *)_udata; /* Operator user data */
htri_t try_remove = FALSE; /* Whether to try removing a message */
herr_t ret_value = H5_ITER_CONT; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(mesg);
@@ -1109,7 +1109,7 @@ H5O_msg_remove_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_msg_remove_cb() */
+} /* end H5O__msg_remove_cb() */
/*-------------------------------------------------------------------------
@@ -1160,7 +1160,7 @@ H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
/* Iterate over the messages, deleting appropriate one(s) */
op.op_type = H5O_MESG_OP_LIB;
- op.u.lib_op = H5O_msg_remove_cb;
+ op.u.lib_op = H5O__msg_remove_cb;
if(H5O_msg_iterate_real(f, oh, type, &op, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "error iterating over messages")
@@ -1950,7 +1950,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_copy_mesg
+ * Function: H5O__copy_mesg
*
* Purpose: Make a copy of the native object for an object header's
* native message info
@@ -1963,7 +1963,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
+H5O__copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
const H5O_msg_class_t *type, const void *mesg, unsigned mesg_flags,
unsigned update_flags)
{
@@ -1972,7 +1972,7 @@ H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(f);
@@ -1986,7 +1986,7 @@ H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, size_t idx,
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to protect object header chunk")
/* Reset existing native information for the header's message */
- H5O_msg_reset_real(type, idx_msg->native);
+ H5O__msg_reset_real(type, idx_msg->native);
/* Copy the native object for the message */
if(NULL == (idx_msg->native = (type->copy)(mesg, idx_msg->native)))
@@ -2015,7 +2015,7 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_copy_mesg() */
+} /* end H5O__copy_mesg() */
/*-------------------------------------------------------------------------
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 9955f39..2e69899 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -13,6 +13,17 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*-------------------------------------------------------------------------
+ *
+ * Created: H5SMcache.c
+ * Nov 13 2006
+ * James Laird <jlaird@hdfgroup.org>
+ *
+ * Purpose: Implement shared message metadata cache methods.
+ *
+ *-------------------------------------------------------------------------
+ */
+
/****************/
/* Module Setup */
/****************/
@@ -68,6 +79,7 @@ static herr_t H5SM_list_size(const H5F_t *f, const H5SM_list_t UNUSED *list, siz
/*********************/
/* Package Variables */
/*********************/
+
/* H5SM inherits cache-like properties from H5AC */
const H5AC_class_t H5AC_SOHM_TABLE[1] = {{
H5AC_SOHM_TABLE_ID,
@@ -136,7 +148,7 @@ H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *udata)
/* Allocate space for the master table in memory */
if(NULL == (table = H5FL_CALLOC(H5SM_master_table_t)))
- HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed")
/* Read number of indexes and version from file superblock */
table->num_indexes = H5F_SOHM_NINDEXES(f);
@@ -172,7 +184,7 @@ H5SM_table_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *udata)
/* Allocate space for the index headers in memory*/
if(NULL == (table->indexes = (H5SM_index_header_t *)H5FL_ARR_MALLOC(H5SM_index_header_t, (size_t)table->num_indexes)))
- HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed for SOHM indexes")
+ HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed for SOHM indexes")
/* Read in the index headers */
for(x = 0; x < table->num_indexes; ++x) {
@@ -230,7 +242,7 @@ done:
HDONE_ERROR(H5E_SOHM, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
if(!ret_value && table)
if(H5SM_table_free(table) < 0)
- HDONE_ERROR(H5E_SOHM, H5E_CANTFREE, NULL, "unable to destroy sohm table")
+ HDONE_ERROR(H5E_SOHM, H5E_CANTFREE, NULL, "unable to destroy sohm table")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5SM_table_load() */
@@ -363,7 +375,7 @@ H5SM_table_dest(H5F_t UNUSED *f, H5SM_master_table_t* table)
FUNC_ENTER_NOAPI_NOINIT
- /* Sanity check */
+ /* Check arguments */
HDassert(table);
HDassert(table->indexes);
@@ -429,7 +441,7 @@ H5SM_table_size(const H5F_t UNUSED *f, const H5SM_master_table_t *table, size_t
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
- /* check arguments */
+ /* Check arguments */
HDassert(f);
HDassert(table);
HDassert(size_ptr);
@@ -470,18 +482,17 @@ H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
FUNC_ENTER_NOAPI_NOINIT
- /* Sanity check */
+ /* Check arguments */
HDassert(udata->header);
/* Allocate space for the SOHM list data structure */
if(NULL == (list = H5FL_MALLOC(H5SM_list_t)))
- HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "memory allocation failed")
HDmemset(&list->cache_info, 0, sizeof(H5AC_info_t));
/* Allocate list in memory as an array*/
- if((list->messages = (H5SM_sohm_t *)H5FL_ARR_MALLOC(H5SM_sohm_t, udata->header->list_max)) == NULL)
- HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "file allocation failed for SOHM list")
-
+ if(NULL == (list->messages = (H5SM_sohm_t *)H5FL_ARR_MALLOC(H5SM_sohm_t, udata->header->list_max)))
+ HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, NULL, "file allocation failed for SOHM list")
list->header = udata->header;
/* Wrap the local buffer for serialized list index info */
@@ -701,9 +712,7 @@ H5SM_list_clear(H5F_t *f, H5SM_list_t *list, hbool_t destroy)
FUNC_ENTER_NOAPI_NOINIT
- /*
- * Check arguments.
- */
+ /* Check arguments */
HDassert(list);
/* Reset the dirty flag. */
diff --git a/src/H5trace.c b/src/H5trace.c
index 6634a2a..e6a091c 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -2348,7 +2348,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
unsigned long iul = va_arg(ap, unsigned long); /*lint !e732 Loss of sign not really occuring */
fprintf(out, "%lu", iul);
- asize[argno] = iul;
+ asize[argno] = (hssize_t)iul;
} /* end else */
break;
@@ -2372,7 +2372,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
unsigned long long iull = va_arg(ap, unsigned long long); /*lint !e732 Loss of sign not really occuring */
fprintf(out, "%llu", iull);
- asize[argno] = iull;
+ asize[argno] = (hssize_t)iull;
} /* end else */
break;
diff --git a/test/cache.c b/test/cache.c
index 6c4bbda..32d03d1 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -2984,7 +2984,6 @@ static unsigned
check_flush_cache(void)
{
const char * fcn_name = "check_flush_cache";
- hbool_t show_progress = FALSE;
H5F_t * file_ptr = NULL;
TESTING("H5C_flush_cache() functionality");
@@ -2998,11 +2997,6 @@ check_flush_cache(void)
if ( pass ) {
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s: reseting entries.\n", fcn_name);
- }
-
reset_entries();
file_ptr = setup_cache((size_t)(2 * 1024 * 1024),
@@ -3015,12 +3009,6 @@ check_flush_cache(void)
if ( pass ) {
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s: calling check_flush_cache__empty_cache().\n",
- fcn_name);
- }
-
check_flush_cache__empty_cache(file_ptr);
}
@@ -3030,45 +3018,21 @@ check_flush_cache(void)
if ( pass ) {
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s: calling check_flush_cache__single_entry().\n",
- fcn_name);
- }
-
check_flush_cache__single_entry(file_ptr);
}
if ( pass ) {
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s: calling check_flush_cache__multi_entry().\n",
- fcn_name);
- }
-
check_flush_cache__multi_entry(file_ptr);
}
if ( pass ) {
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s: calling check_flush_cache__flush_ops().\n",
- fcn_name);
- }
-
check_flush_cache__flush_ops(file_ptr);
}
if ( pass ) {
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s: calling takedown_cache().\n",
- fcn_name);
- }
-
takedown_cache(file_ptr, FALSE, FALSE);
}
@@ -6406,17 +6370,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 4,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -6504,17 +6468,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 4,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -6602,17 +6566,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 6,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -6732,17 +6696,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 6,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -6874,17 +6838,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 6,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -6903,17 +6867,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 6,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ FALSE,
@@ -7093,17 +7057,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 6,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -7122,17 +7086,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 6,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -7210,7 +7174,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE,0,FALSE,0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
@@ -7239,7 +7203,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE,0,FALSE,0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
@@ -7369,17 +7333,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 6,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 0, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -7398,17 +7362,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 6,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
+ /* op_code: type: idx: flag: size: order_ptr: */
{ { FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 10, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 10, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 12, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 12, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -7486,7 +7450,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE,0,FALSE,0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
@@ -7515,7 +7479,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 0, FALSE, 0, NULL },
+ { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE,0,FALSE,0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
@@ -7671,7 +7635,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE,100,FALSE,0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
@@ -7700,7 +7664,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE,100,FALSE,0, NULL },
{ FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
@@ -7808,7 +7772,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE,100,FALSE,0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
@@ -7837,7 +7801,7 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* num_flush_ops = */ 1,
/* flush_ops = */
/* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ { { FLUSH_OP__DIRTY, PICO_ENTRY_TYPE,100,FALSE,0, NULL },
{ FLUSH_OP__DIRTY, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
{ FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
@@ -8072,17 +8036,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 4,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ FALSE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8101,17 +8065,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8130,17 +8094,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8159,17 +8123,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8188,17 +8152,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ FALSE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8217,17 +8181,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8246,17 +8210,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 4,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8519,17 +8483,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 4,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ FALSE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8548,17 +8512,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2100, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 2200, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 2300, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8577,17 +8541,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 350, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8606,17 +8570,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 450, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8635,17 +8599,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 650, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ FALSE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8664,17 +8628,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {1000, 2000, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 1000, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 2000, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 750, FALSE, VARIABLE_ENTRY_SIZE / 4, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8693,17 +8657,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {0, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 4,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL },
- { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 350, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 450, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 650, FALSE, 0, NULL },
+ { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 750, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8833,17 +8797,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8862,17 +8826,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {400, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -8920,17 +8884,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -9031,17 +8995,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 200, FALSE, VARIABLE_ENTRY_SIZE, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 200, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -9060,17 +9024,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {400, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 400, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 300, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 300, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -9118,17 +9082,17 @@ check_flush_cache__flush_ops(H5F_t * file_ptr)
/* pin_idx = */ {100, 0, 0, 0, 0, 0, 0, 0},
/* num_flush_ops = */ 3,
/* flush_ops = */
- /* op_code: type: idx: flag: size: order_ptr: */
- { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
+ /* op_code: type: idx: flag: size: order_ptr: */
+ { { FLUSH_OP__DIRTY, VARIABLE_ENTRY_TYPE, 100, FALSE, 0, NULL },
{ FLUSH_OP__RESIZE, VARIABLE_ENTRY_TYPE, 500, FALSE, VARIABLE_ENTRY_SIZE / 2, NULL },
- { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
- { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
+ { FLUSH_OP__MOVE, VARIABLE_ENTRY_TYPE, 500, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL },
+ { FLUSH_OP__NO_OP, 0, 0, FALSE, 0, NULL } },
/* expected_loaded = */ TRUE,
/* expected_cleared = */ FALSE,
/* expected_flushed = */ TRUE,
@@ -9207,11 +9171,8 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
int check_size,
struct fo_flush_entry_check check[])
{
- const char * fcn_name = "check_flush_cache__flush_op_test";
H5C_t * cache_ptr = file_ptr->shared->cache;
static char msg[128];
- hbool_t show_progress = FALSE;
- hbool_t verbose = FALSE;
herr_t result;
int i;
int j;
@@ -9223,12 +9184,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
test_num);
#endif
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(1).\n",
- fcn_name, test_num, (int)pass);
- }
-
if ( cache_ptr == NULL ) {
pass = FALSE;
@@ -9256,12 +9211,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
failure_mssg = msg;
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(2).\n",
- fcn_name, test_num, (int)pass);
- }
-
i = 0;
while ( ( pass ) && ( i < spec_size ) )
{
@@ -9284,12 +9233,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
i++;
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: running sanity checks on entry(3).\n",
- fcn_name, test_num, (int)pass);
- }
-
i = 0;
while ( ( pass ) && ( i < check_size ) )
{
@@ -9327,54 +9270,18 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
i++;
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Setting up the test.\n",
- fcn_name, test_num, (int)pass);
- }
-
i = 0;
while ( ( pass ) && ( i < spec_size ) )
{
if ( spec[i].insert_flag ) {
- if ( show_progress ) {
-
- HDfprintf(stdout,
- "%s:%d: Inserting entry(%d,%d) with flags 0x%x.\n",
- fcn_name, test_num,
- (int)(spec[i].entry_type),
- (int)(spec[i].entry_index),
- (unsigned)spec[i].flags);
- }
-
insert_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].flags);
} else {
- if ( show_progress ) {
-
- HDfprintf(stdout,
- "%s:%d: Protecting entry(%d,%d).\n",
- fcn_name, test_num,
- (int)(spec[i].entry_type),
- (int)(spec[i].entry_index));
- }
-
protect_entry(file_ptr, spec[i].entry_type, spec[i].entry_index);
- if ( show_progress ) {
-
- HDfprintf(stdout,
- "%s:%d: Unprotecting entry(%d,%d) with flags 0x%x ns = %d.\n",
- fcn_name, test_num,
- (int)(spec[i].entry_type),
- (int)(spec[i].entry_index),
- (unsigned)spec[i].flags,
- (int)(spec[i].new_size));
- }
-
if(spec[i].resize_flag)
resize_entry(file_ptr, spec[i].entry_type, spec[i].entry_index,
spec[i].new_size, TRUE);
@@ -9420,12 +9327,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Running the test.\n",
- fcn_name, test_num, (int)pass);
- }
-
if ( pass ) {
result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
@@ -9441,11 +9342,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Checking test results(1).\n",
- fcn_name, test_num, (int)pass);
- }
i = 0;
while ( ( pass ) && ( i < spec_size ) )
@@ -9484,12 +9380,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
i++;
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Checking test results(2).\n",
- fcn_name, test_num, (int)pass);
- }
-
if ( pass ) {
i = 0;
@@ -9608,12 +9498,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Checking test results(3).\n",
- fcn_name, test_num, (int)pass);
- }
-
if ( pass ) {
if ( ( ( (flush_flags & H5C__FLUSH_INVALIDATE_FLAG) == 0 )
@@ -9642,13 +9526,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
/* clean up the cache to prep for the next test */
-
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(1).\n",
- fcn_name, test_num, (int)pass);
- }
-
if ( pass ) {
result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5P_DATASET_XFER_DEFAULT,
@@ -9668,16 +9545,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
( cache_ptr->dirty_index_size != 0 ) ) {
pass = FALSE;
-
- if ( verbose ) {
-
- HDfprintf(stdout, "%s:%d: il/is/cis/dis = %lld/%lld/%lld/%lld.\n",
- fcn_name, test_num,
- (long long)(cache_ptr->index_len),
- (long long)(cache_ptr->index_size),
- (long long)(cache_ptr->clean_index_size),
- (long long)(cache_ptr->dirty_index_size));
- }
HDsnprintf(msg, (size_t)128,
"Unexpected cache len/size/cs/ds after cleanup in flush op test #%d.",
test_num);
@@ -9686,12 +9553,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
}
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(2).\n",
- fcn_name, test_num, (int)pass);
- }
-
i = 0;
while ( ( pass ) && ( i < spec_size ) )
{
@@ -9708,12 +9569,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
i++;
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Cleaning up after test(3).\n",
- fcn_name, test_num, (int)pass);
- }
-
i = 0;
while ( ( pass ) && ( i < check_size ) )
{
@@ -9730,11 +9585,6 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
i++;
}
- if ( show_progress ) {
-
- HDfprintf(stdout, "%s:%d:%d: Done.\n", fcn_name, test_num, (int)pass);
- }
-
return;
} /* check_flush_cache__flush_op_test() */
@@ -10893,8 +10743,6 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
static void
check_flush_cache__single_entry(H5F_t * file_ptr)
{
- const char * fcn_name = "check_flush_cache__single_entry";
- hbool_t show_progress = FALSE;
H5C_t * cache_ptr = file_ptr->shared->cache;
if ( cache_ptr == NULL ) {
@@ -10911,10 +10759,6 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 1);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -10929,18 +10773,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 2);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -10955,18 +10791,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 3);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -10981,18 +10809,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 4);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11007,18 +10827,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 5);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11033,18 +10845,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 6);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11059,18 +10863,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 7);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11085,18 +10881,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 8);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11111,18 +10899,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 9);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11138,18 +10918,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 10);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11165,18 +10937,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 11);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11192,18 +10956,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 12);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11219,18 +10975,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 13);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11246,18 +10994,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 14);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11273,18 +11013,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 15);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11301,18 +11033,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 16);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11329,18 +11053,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 17);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11355,18 +11071,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 18);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11381,18 +11089,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 19);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11407,18 +11107,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 20);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11433,18 +11125,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 21);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11459,18 +11143,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 22);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11485,18 +11161,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 23);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11511,18 +11179,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 24);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11537,18 +11197,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 25);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11564,18 +11216,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 26);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11591,18 +11235,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 27);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11618,18 +11254,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 28);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11645,18 +11273,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 29);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11672,18 +11292,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 30);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11699,18 +11311,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 31);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11727,18 +11331,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 32);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11755,18 +11351,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 33);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11781,18 +11369,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 34);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11807,18 +11387,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 35);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11833,18 +11405,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 36);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11859,18 +11423,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 37);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11885,18 +11441,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 38);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11911,18 +11459,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 39);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11937,18 +11477,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 40);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11963,18 +11495,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 41);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -11990,18 +11514,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 42);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12017,18 +11533,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 43);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12044,18 +11552,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 44);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12071,18 +11571,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 45);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12098,18 +11590,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 46);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12125,18 +11609,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 47);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12153,18 +11629,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 48);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12181,18 +11649,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 49);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12207,18 +11667,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 50);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12233,18 +11685,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 51);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12259,18 +11703,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 52);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12285,18 +11721,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 53);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12311,18 +11739,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 54);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12337,18 +11757,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 55);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12363,18 +11775,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 56);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12389,18 +11793,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 57);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12416,18 +11812,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 58);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12443,18 +11831,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 59);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12470,18 +11850,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 60);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12497,18 +11869,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ FALSE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 61);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12524,18 +11888,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 62);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12551,18 +11907,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ TRUE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 63);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12579,18 +11927,10 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
if ( pass ) {
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running test %d.\n", fcn_name, 64);
- }
-
check_flush_cache__single_entry_test
(
/* file_ptr */ file_ptr,
@@ -12607,10 +11947,6 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
/* expected_flushed */ FALSE,
/* expected_destroyed */ TRUE
);
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: pass = %d.\n", fcn_name, (int)pass);
- }
}
@@ -12957,11 +12293,6 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
i = 0;
while ( ( pass ) && ( i < 256 ) )
{
-
- if ( show_progress ) {
- HDfprintf(stdout, "%s: running pinned test %d.\n", fcn_name, i);
- }
-
check_flush_cache__pinned_single_entry_test
(
/* file_ptr */ file_ptr,
@@ -13618,7 +12949,6 @@ check_get_entry_status(void)
*
* Modifications:
*
- * None.
*
*-------------------------------------------------------------------------
*/
@@ -13705,29 +13035,29 @@ check_expunge_entry(void)
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
- if ( result < 0 ) {
+ if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 2.");
failure_mssg = msg;
- } else if ( !in_cache || is_dirty || is_protected || is_pinned ) {
+ } else if ( !in_cache || is_dirty || is_protected || is_pinned ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128, "Unexpected status 2.");
+ failure_mssg = msg;
} else if ( ( ! entry_ptr->loaded ) ||
( entry_ptr->cleared ) ||
( entry_ptr->flushed ) ||
( entry_ptr->destroyed ) ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128, "Unexpected entry history 2.");
+ failure_mssg = msg;
- }
+ }
}
/* Expunge the entry and then verify that it is no longer in the cache.
@@ -13749,29 +13079,29 @@ check_expunge_entry(void)
result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size,
&in_cache, &is_dirty, &is_protected, &is_pinned, NULL, NULL);
- if ( result < 0 ) {
+ if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 3.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if ( in_cache ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128, "Unexpected status 3.");
+ failure_mssg = msg;
} else if ( ( ! entry_ptr->loaded ) ||
( ! entry_ptr->cleared ) ||
( entry_ptr->flushed ) ||
( ! entry_ptr->destroyed ) ) {
- pass = FALSE;
- HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
- failure_mssg = msg;
+ pass = FALSE;
+ HDsnprintf(msg, (size_t)128, "Unexpected entry history 3.");
+ failure_mssg = msg;
- }
+ }
}
/* now repeat the process with a different entry. On unprotect
@@ -13791,14 +13121,14 @@ check_expunge_entry(void)
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
- if ( result < 0 ) {
+ if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 4.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if ( in_cache ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 4.");
@@ -13813,7 +13143,7 @@ check_expunge_entry(void)
HDsnprintf(msg, (size_t)128, "Unexpected entry history 4.");
failure_mssg = msg;
- }
+ }
}
/* protect the entry to force the cache to load it, and then unprotect
@@ -13834,14 +13164,14 @@ check_expunge_entry(void)
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
- if ( result < 0 ) {
+ if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 5.");
failure_mssg = msg;
- } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) {
+ } else if ( !in_cache || !is_dirty || is_protected || is_pinned ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 5.");
@@ -13856,7 +13186,7 @@ check_expunge_entry(void)
HDsnprintf(msg, (size_t)128, "Unexpected entry history 5.");
failure_mssg = msg;
- }
+ }
}
/* Expunge the entry and then verify that it is no longer in the cache.
@@ -13879,14 +13209,14 @@ check_expunge_entry(void)
&in_cache, &is_dirty, &is_protected,
&is_pinned, NULL, NULL);
- if ( result < 0 ) {
+ if ( result < 0 ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128,
"H5C_get_entry_status() reports failure 6.");
failure_mssg = msg;
- } else if ( in_cache ) {
+ } else if ( in_cache ) {
pass = FALSE;
HDsnprintf(msg, (size_t)128, "Unexpected status 6.");
@@ -13901,7 +13231,7 @@ check_expunge_entry(void)
HDsnprintf(msg, (size_t)128, "Unexpected entry history 6.");
failure_mssg = msg;
- }
+ }
}
if ( pass ) {
@@ -14408,13 +13738,13 @@ check_move_entry(void)
*
* At present, we should do the following tests:
*
- * 1) move a clean, unprotected, unpinned entry.
+ * 1) Move a clean, unprotected, unpinned entry.
*
- * 2) move a dirty, unprotected, unpinned entry.
+ * 2) Move a dirty, unprotected, unpinned entry.
*
- * 3) move a clean, unprotected, pinned entry.
+ * 3) Move a clean, unprotected, pinned entry.
*
- * 4) move a dirty, unprotected, pinned entry.
+ * 4) Move a dirty, unprotected, pinned entry.
*
* In all cases, the entry should have moved to its
* new location, and have been marked dirty if it wasn't
@@ -14787,7 +14117,7 @@ check_resize_entry(void)
base_addr = entries[LARGE_ENTRY_TYPE];
entry_ptr = &(base_addr[0]);
- entry_size = LARGE_ENTRY_SIZE;
+ entry_size = LARGE_ENTRY_SIZE;
}
}
@@ -15668,6 +14998,7 @@ check_resize_entry(void)
}
if ( pass ) {
+
protect_entry(file_ptr, LARGE_ENTRY_TYPE, 2);
unprotect_entry(file_ptr, LARGE_ENTRY_TYPE, 2, H5C__DELETED_FLAG);
@@ -15724,7 +15055,6 @@ check_resize_entry(void)
*
* Modifications:
*
- * None.
*
*-------------------------------------------------------------------------
*/
@@ -16542,6 +15872,7 @@ check_flush_protected_err(void)
*
* Modifications:
*
+ *
*-------------------------------------------------------------------------
*/
@@ -23360,6 +22691,7 @@ check_auto_cache_resize_disable(void)
/* flush the cache and destroy all entries so we start from a known point */
flush_cache(file_ptr, TRUE, FALSE, FALSE);
+
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -23586,6 +22918,7 @@ check_auto_cache_resize_disable(void)
/* flush the cache and destroy all entries so we start from a known point */
flush_cache(file_ptr, TRUE, FALSE, FALSE);
+
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -23819,6 +23152,7 @@ check_auto_cache_resize_disable(void)
/* flush the cache and destroy all entries so we start from a known point */
flush_cache(file_ptr, TRUE, FALSE, FALSE);
+
}
if ( show_progress ) HDfprintf(stderr, "check point %d\n", checkpoint++);
@@ -34255,5 +33589,5 @@ main(void)
nerrs += check_notify_cb();
return(nerrs > 0);
-}
+} /* main() */
diff --git a/test/cache_api.c b/test/cache_api.c
index 8f556be..51dda99 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -32,15 +32,15 @@
/* private function declarations: */
-static void check_fapl_mdc_api_calls(void);
+static unsigned check_fapl_mdc_api_calls(void);
-static void check_file_mdc_api_calls(void);
+static unsigned check_file_mdc_api_calls(void);
-static void mdc_api_call_smoke_check(int express_test);
+static unsigned mdc_api_call_smoke_check(int express_test);
-static void check_fapl_mdc_api_errs(void);
+static unsigned check_fapl_mdc_api_errs(void);
-static void check_file_mdc_api_errs(void);
+static unsigned check_file_mdc_api_errs(void);
/**************************************************************************/
@@ -67,7 +67,7 @@ static void check_file_mdc_api_errs(void);
*
*-------------------------------------------------------------------------
*/
-static void
+static unsigned
check_fapl_mdc_api_calls(void)
{
const char * fcn_name = "check_fapl_mdc_api_calls()";
@@ -489,6 +489,8 @@ check_fapl_mdc_api_calls(void)
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
+ return !pass;
+
} /* check_fapl_mdc_api_calls() */
@@ -516,7 +518,7 @@ check_fapl_mdc_api_calls(void)
*-------------------------------------------------------------------------
*/
-static void
+static unsigned
check_file_mdc_api_calls(void)
{
const char * fcn_name = "check_file_mdc_api_calls()";
@@ -839,6 +841,8 @@ check_file_mdc_api_calls(void)
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
+ return !pass;
+
} /* check_file_mdc_api_calls() */
@@ -865,7 +869,7 @@ check_file_mdc_api_calls(void)
#define NUM_DSETS 6
#define NUM_RANDOM_ACCESSES 200000
-static void
+static unsigned
mdc_api_call_smoke_check(int express_test)
{
const char * fcn_name = "mdc_api_call_smoke_check()";
@@ -1004,7 +1008,7 @@ mdc_api_call_smoke_check(int express_test)
HDfprintf(stdout, " Long tests disabled.\n");
- return;
+ return 0;
}
pass = TRUE;
@@ -1105,7 +1109,7 @@ mdc_api_call_smoke_check(int express_test)
sprintf(dset_name, "/dset%03d", i);
dataset_ids[i] = H5Dcreate2(file_id, dset_name, H5T_STD_I32BE,
- dataspace_id, H5P_DEFAULT, properties, H5P_DEFAULT);
+ dataspace_id, H5P_DEFAULT, properties, H5P_DEFAULT);
if ( dataset_ids[i] < 0 ) {
@@ -1329,9 +1333,9 @@ mdc_api_call_smoke_check(int express_test)
}
n++;
-
}
+
/* close the file spaces we are done with */
i = 1;
while ( ( pass ) && ( i < NUM_DSETS ) )
@@ -1450,7 +1454,6 @@ mdc_api_call_smoke_check(int express_test)
}
n++;
-
}
/* close file space 0 */
@@ -1515,6 +1518,8 @@ mdc_api_call_smoke_check(int express_test)
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
+ return !pass;
+
} /* mdc_api_call_smoke_check() */
@@ -3015,7 +3020,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
*-------------------------------------------------------------------------
*/
-static void
+static unsigned
check_fapl_mdc_api_errs(void)
{
const char * fcn_name = "check_fapl_mdc_api_errs()";
@@ -3065,7 +3070,7 @@ check_fapl_mdc_api_errs(void)
scratch.version = H5C__CURR_AUTO_SIZE_CTL_VER;
if ( ( pass ) &&
- ( ( H5Pget_mdc_config(fapl_id, &scratch) < 0 ) ||
+ ( ( H5Pget_mdc_config(fapl_id, &scratch) < 0) ||
( !CACHE_CONFIGS_EQUAL(default_config, scratch, TRUE, TRUE) ) ) ) {
pass = FALSE;
@@ -3167,6 +3172,8 @@ check_fapl_mdc_api_errs(void)
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
+ return !pass;
+
} /* check_fapl_mdc_api_errs() */
@@ -3186,7 +3193,7 @@ check_fapl_mdc_api_errs(void)
*-------------------------------------------------------------------------
*/
-static void
+static unsigned
check_file_mdc_api_errs(void)
{
const char * fcn_name = "check_file_mdc_api_errs()";
@@ -3504,6 +3511,8 @@ check_file_mdc_api_errs(void)
HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n",
fcn_name, failure_mssg);
+ return !pass;
+
} /* check_file_mdc_api_errs() */
@@ -3527,28 +3536,35 @@ check_file_mdc_api_errs(void)
int
main(void)
{
+ unsigned nerrs = 0;
int express_test;
H5open();
express_test = GetTestExpress();
+ printf("===================================\n");
+ printf("Cache API tests\n");
+ printf(" express_test = %d\n", express_test);
+ printf("===================================\n");
+
+
#if 1
- check_fapl_mdc_api_calls();
+ nerrs += check_fapl_mdc_api_calls();
#endif
#if 1
- check_file_mdc_api_calls();
+ nerrs += check_file_mdc_api_calls();
#endif
#if 1
- mdc_api_call_smoke_check(express_test);
+ nerrs += mdc_api_call_smoke_check(express_test);
#endif
#if 1
- check_fapl_mdc_api_errs();
+ nerrs += check_fapl_mdc_api_errs();
#endif
#if 1
- check_file_mdc_api_errs();
+ nerrs += check_file_mdc_api_errs();
#endif
- return(0);
+ return( nerrs > 0 );
} /* main() */
diff --git a/test/cache_common.c b/test/cache_common.c
index f707f98..9d5aebe 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -169,7 +169,7 @@ test_entry_t * entries[NUMBER_OF_ENTRY_TYPES] =
notify_entries
};
-test_entry_t * orig_entries[NUMBER_OF_ENTRY_TYPES] =
+test_entry_t *orig_entries[NUMBER_OF_ENTRY_TYPES] =
{
orig_pico_entries,
orig_nano_entries,
@@ -244,7 +244,7 @@ const haddr_t alt_base_addrs[NUMBER_OF_ENTRY_TYPES] =
NOTIFY_ALT_BASE_ADDR
};
-const char * entry_type_names[NUMBER_OF_ENTRY_TYPES] =
+const char *entry_type_names[NUMBER_OF_ENTRY_TYPES] =
{
"pico entries -- 1 B",
"nano entries -- 4 B",
@@ -378,7 +378,7 @@ static void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr,
-/* address translation funtions: */
+/* address translation functions: */
/*-------------------------------------------------------------------------
@@ -396,8 +396,8 @@ static void execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr,
*/
void
addr_to_type_and_index(haddr_t addr,
- int32_t * type_ptr,
- int32_t * index_ptr)
+ int32_t *type_ptr,
+ int32_t *index_ptr)
{
int i;
int32_t type;
@@ -456,52 +456,8 @@ addr_to_type_and_index(haddr_t addr,
} /* addr_to_type_and_index() */
-
-#if 0 /* This function has never been used, but we may want it
- * some time. Lets keep it for now.
- */
-/*-------------------------------------------------------------------------
- * Function: type_and_index_to_addr
- *
- * Purpose: Given a type and index of an entry, compute the associated
- * addr and return that value.
- *
- * Return: computed addr
- *
- * Programmer: John Mainzer
- * 6/10/04
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-haddr_t
-type_and_index_to_addr(int32_t type,
- int32_t idx)
-{
- haddr_t addr;
-
- HDassert( ( type >= 0 ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
- HDassert( ( idx >= 0 ) && ( idx <= max_indices[type] ) );
-
- addr = base_addrs[type] + (((haddr_t)idx) * entry_sizes[type]);
-
- HDassert( addr == (entries[type])[idx].addr );
-
- if ( (entries[type])[idx].at_main_addr ) {
-
- HDassert( addr == (entries[type])[idx].main_addr );
-
- } else {
-
- HDassert( addr == (entries[type])[idx].alt_addr );
- }
-
- return(addr);
-} /* type_and_index_to_addr() */
-
-#endif
+/* Call back functions: */
/*-------------------------------------------------------------------------
@@ -525,9 +481,9 @@ type_and_index_to_addr(int32_t type,
*/
herr_t
-check_write_permitted(const H5F_t UNUSED * f,
+check_write_permitted(const H5F_t UNUSED *f,
hid_t UNUSED dxpl_id,
- hbool_t * write_permitted_ptr)
+ hbool_t *write_permitted_ptr)
{
HDassert( write_permitted_ptr );
@@ -1288,14 +1244,13 @@ notify_size(H5F_t * f, void * thing, size_t * size_ptr)
*
*-------------------------------------------------------------------------
*/
-
static herr_t
notify(H5C_notify_action_t action, void *thing)
{
test_entry_t * entry_ptr;
- test_entry_t * base_addr;
+ test_entry_t *base_addr;
- HDassert( thing );
+ HDassert(thing);
entry_ptr = (test_entry_t *)thing;
base_addr = entries[entry_ptr->type];
@@ -1657,8 +1612,7 @@ execute_flush_op(H5F_t * file_ptr,
break;
case FLUSH_OP__MOVE:
- move_entry(cache_ptr, op_ptr->type, op_ptr->idx,
- op_ptr->flag);
+ move_entry(cache_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag);
break;
case FLUSH_OP__ORDER:
@@ -1760,8 +1714,8 @@ reset_entries(void)
{
int j;
- max_index = max_indices[i];
entry_size = entry_sizes[i];
+ max_index = max_indices[i];
base_addr = entries[i];
orig_base_addr = orig_entries[i];
@@ -2725,7 +2679,6 @@ setup_cache(size_t max_cache_size,
cache_ptr->ignore_tags = TRUE;
H5C_stats__reset(cache_ptr);
-
ret_val = file_ptr;
}
@@ -2920,32 +2873,25 @@ flush_cache(H5F_t * file_ptr,
verify_unprotected();
if(pass) {
- H5C_t * cache_ptr = NULL;
+ H5C_t * cache_ptr;
herr_t result = 0;
HDassert(file_ptr);
cache_ptr = file_ptr->shared->cache;
- if(destroy_entries) {
-
+ if(destroy_entries)
result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT,
H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
- }
- else {
-
+ else
result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT,
H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
- }
-
- if(dump_stats) {
+ if(dump_stats)
H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
- }
if(result < 0) {
-
pass = FALSE;
failure_mssg = "error in H5C_flush_cache().";
}
@@ -3050,24 +2996,19 @@ insert_entry(H5F_t * file_ptr,
(int)(entry_ptr->addr != entry_ptr->header.addr));
#endif
}
- HDassert( entry_ptr->cache_ptr == NULL );
+ HDassert(entry_ptr->cache_ptr == NULL);
entry_ptr->cache_ptr = cache_ptr;
- if ( insert_pinned ) {
-
- HDassert( entry_ptr->header.is_pinned );
-
- } else {
-
- HDassert( ! ( entry_ptr->header.is_pinned ) );
-
- }
+ if(insert_pinned)
+ HDassert(entry_ptr->header.is_pinned);
+ else
+ HDassert(!(entry_ptr->header.is_pinned));
entry_ptr->is_pinned = insert_pinned;
entry_ptr->pinned_from_client = insert_pinned;
- HDassert( entry_ptr->header.is_dirty );
- HDassert( ((entry_ptr->header).type)->id == type );
+ HDassert(entry_ptr->header.is_dirty);
+ HDassert(((entry_ptr->header).type)->id == type);
}
return;
@@ -3586,8 +3527,8 @@ unprotect_entry(H5F_t * file_ptr,
HDassert( entry_ptr->header.is_protected );
HDassert( entry_ptr->is_protected );
- pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0 );
- unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0 );
+ pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0);
+ unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0);
HDassert ( ! ( pin_flag_set && unpin_flag_set ) );
HDassert ( ( ! pin_flag_set ) || ( ! (entry_ptr->is_pinned) ) );
@@ -3638,13 +3579,13 @@ unprotect_entry(H5F_t * file_ptr,
if ( pin_flag_set ) {
- HDassert ( entry_ptr->header.is_pinned );
+ HDassert(entry_ptr->header.is_pinned);
entry_ptr->pinned_from_client = TRUE;
entry_ptr->is_pinned = TRUE;
} else if ( unpin_flag_set ) {
- HDassert ( entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache );
+ HDassert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache);
entry_ptr->pinned_from_client = FALSE;
entry_ptr->is_pinned = entry_ptr->pinned_from_cache;
@@ -4297,7 +4238,7 @@ row_major_scan_backward(H5F_t * file_ptr,
if ( ( pass ) && ( (idx + lag) >= 0 ) &&
( ( idx + lag) <= max_indices[type] ) ) {
- switch ( (idx + lag) %4 ) {
+ switch ( (idx + lag) % 4 ) {
case 0:
if ( (entries[type])[idx+lag].is_dirty ) {
@@ -4326,7 +4267,7 @@ row_major_scan_backward(H5F_t * file_ptr,
}
break;
- case 3: /* we just did an insrt */
+ case 3: /* we just did an insert */
unprotect_entry(file_ptr, type, idx + lag, H5C__DELETED_FLAG);
break;
@@ -5239,7 +5180,6 @@ check_and_validate_cache_hit_rate(hid_t file_id,
int64_t min_accesses,
double min_hit_rate)
{
- /* const char * fcn_name = "check_and_validate_cache_hit_rate()"; */
herr_t result;
int64_t cache_hits = 0;
int64_t cache_accesses = 0;
@@ -5373,7 +5313,6 @@ check_and_validate_cache_size(hid_t file_id,
int32_t * cur_num_entries_ptr,
hbool_t dump_data)
{
- /* const char * fcn_name = "check_and_validate_cache_size()"; */
herr_t result;
size_t expected_max_size;
size_t max_size;
@@ -5560,7 +5499,6 @@ validate_mdc_config(hid_t file_id,
hbool_t compare_init,
int test_num)
{
- /* const char * fcn_name = "validate_mdc_config()"; */
static char msg[256];
H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
diff --git a/test/cache_common.h b/test/cache_common.h
index 930a917..058e36e 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -326,8 +326,8 @@ typedef struct test_entry_t
hbool_t pinned_from_cache; /* entry was pinned by cache internally */
unsigned flush_order; /* Order that entry was flushed in */
- unsigned notify_after_insert_count; /* Count of times that entry was inserted in cache */
- unsigned notify_before_evict_count; /* Count of times that entry was removed in cache */
+ unsigned notify_after_insert_count; /* Count of times that entry was inserted in cache */
+ unsigned notify_before_evict_count; /* Count of times that entry was removed in cache */
} test_entry_t;
/* The following are cut down test versions of the hash table manipulation
@@ -411,6 +411,7 @@ if ( ( (cache_ptr) == NULL ) || \
} \
}
+
/* Macros used in H5AC level tests */
#define CACHE_CONFIGS_EQUAL(a, b, cmp_set_init, cmp_init_size) \
@@ -425,26 +426,26 @@ if ( ( (cache_ptr) == NULL ) || \
( (a).set_initial_size == (b).set_initial_size ) ) && \
( ( ! cmp_init_size ) || \
( (a).initial_size == (b).initial_size ) ) && \
- ( (a).min_clean_fraction == (b).min_clean_fraction ) && \
+ ( DBL_REL_EQUAL((a).min_clean_fraction, (b).min_clean_fraction, 0.00001 ) ) && \
( (a).max_size == (b).max_size ) && \
( (a).min_size == (b).min_size ) && \
( (a).epoch_length == (b).epoch_length ) && \
( (a).incr_mode == (b).incr_mode ) && \
- ( (a).lower_hr_threshold == (b).lower_hr_threshold ) && \
- ( (a).increment == (b).increment ) && \
+ ( DBL_REL_EQUAL((a).lower_hr_threshold, (b).lower_hr_threshold, 0.00001 ) ) && \
+ ( DBL_REL_EQUAL((a).increment, (b).increment, 0.00001 ) ) && \
( (a).apply_max_increment == (b).apply_max_increment ) && \
( (a).max_increment == (b).max_increment ) && \
( (a).flash_incr_mode == (b).flash_incr_mode ) && \
- ( (a).flash_multiple == (b).flash_multiple ) && \
- ( (a).flash_threshold == (b).flash_threshold ) && \
+ ( DBL_REL_EQUAL((a).flash_multiple, (b).flash_multiple, 0.00001 ) ) && \
+ ( DBL_REL_EQUAL((a).flash_threshold, (b).flash_threshold, 0.00001 ) ) && \
( (a).decr_mode == (b).decr_mode ) && \
- ( (a).upper_hr_threshold == (b).upper_hr_threshold ) && \
- ( (a).decrement == (b).decrement ) && \
+ ( DBL_REL_EQUAL((a).upper_hr_threshold, (b).upper_hr_threshold, 0.00001 ) ) && \
+ ( DBL_REL_EQUAL((a).decrement, (b).decrement, 0.00001 ) ) && \
( (a).apply_max_decrement == (b).apply_max_decrement ) && \
( (a).max_decrement == (b).max_decrement ) && \
( (a).epochs_before_eviction == (b).epochs_before_eviction ) && \
( (a).apply_empty_reserve == (b).apply_empty_reserve ) && \
- ( (a).empty_reserve == (b).empty_reserve ) && \
+ ( DBL_REL_EQUAL((a).empty_reserve, (b).empty_reserve, 0.00001 ) ) && \
( (a).dirty_bytes_threshold == (b).dirty_bytes_threshold ) && \
( (a).metadata_write_strategy == (b).metadata_write_strategy ) )
@@ -537,7 +538,6 @@ herr_t check_write_permitted(const H5F_t * f,
hid_t dxpl_id,
hbool_t * write_permitted_ptr);
-
/* callback table extern */
extern const H5C_class_t types[NUMBER_OF_ENTRY_TYPES];
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 30ca1de..9209f6d 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -117,91 +117,91 @@ print_entry_type_to_screen(int id)
switch (id) {
case 0:
- printf("B-tree Node");
+ printf("B-tree Node(0)");
break;
case 1:
- printf("Symbol Table Node");
+ printf("Symbol Table Node(1)");
break;
case 2:
- printf("Local Heap Prefix");
+ printf("Local Heap Prefix(2)");
break;
case 3:
- printf("Local Heap Data Block");
+ printf("Local Heap Data Block(3)");
break;
case 4:
- printf("Global Heap");
+ printf("Global Heap(4)");
break;
case 5:
- printf("Object Header");
+ printf("Object Header(5)");
break;
case 6:
- printf("Object Header Chunk");
+ printf("Object Header Chunk(6)");
break;
case 7:
- printf("v2 B-tree Header");
+ printf("v2 B-tree Header(7)");
break;
case 8:
- printf("v2 B-tree Internal Node");
+ printf("v2 B-tree Internal Node(8)");
break;
case 9:
- printf("v2 B-tree Leaf Node");
+ printf("v2 B-tree Leaf Node(9)");
break;
case 10:
- printf("Fractal Heap Header");
+ printf("Fractal Heap Header(10)");
break;
case 11:
- printf("Fractal Heap Direct Block");
+ printf("Fractal Heap Direct Block(11)");
break;
case 12:
- printf("Fractal Heap Indirect Block");
+ printf("Fractal Heap Indirect Block(12)");
break;
case 13:
- printf("Free Space Header");
+ printf("Free Space Header(13)");
break;
case 14:
- printf("Free Space Section");
+ printf("Free Space Section(14)");
break;
case 15:
- printf("Shared Object Header Message Master Table");
+ printf("Shared Object Header Message Master Table(15)");
break;
case 16:
- printf("Shared Message Index Stored As A List");
+ printf("Shared Message Index Stored As A List(16)");
break;
case 17:
- printf("Extensible Array Header");
+ printf("Extensible Array Header(17)");
break;
case 18:
- printf("Extensible Array Index Block");
+ printf("Extensible Array Index Block(18)");
break;
case 19:
- printf("Extensible Array Super Block");
+ printf("Extensible Array Super Block(19)");
break;
case 20:
- printf("Extensible Array Data Block");
+ printf("Extensible Array Data Block(20)");
break;
case 21:
- printf("Extensible Array Data Block Page");
+ printf("Extensible Array Data Block Page(21)");
break;
case 22:
- printf("Chunk Proxy");
+ printf("Chunk Proxy(22)");
break;
case 23:
- printf("Fixed Array Header");
+ printf("Fixed Array Header(23)");
break;
case 24:
- printf("Fixed Array Data Block");
+ printf("Fixed Array Data Block(24)");
break;
case 25:
- printf("Fixed Array Data Block Page");
+ printf("Fixed Array Data Block Page(25)");
break;
case 26:
- printf("File Superblock");
+ printf("File Superblock(26)");
break;
case 27:
- printf("Test Entry");
+ printf("Test Entry(27)");
break;
case 28:
- printf("Number of Types");
+ printf("Number of Types(28)");
break;
default:
printf("*Unknown*");
@@ -434,7 +434,8 @@ static int verify_tag(hid_t fid, int id, haddr_t tag)
} /* for */
- if (found == FALSE) TEST_ERROR;
+ if (found == FALSE)
+ TEST_ERROR;
return 0;
diff --git a/test/earray.c b/test/earray.c
index 5f4481a..5743b0f 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -190,7 +190,6 @@ const H5AC_class_t H5AC_EARRAY_TEST[1] = {{
(H5AC_size_func_t)earray_cache_test_size,
}};
-
/*-------------------------------------------------------------------------
* Function: init_cparam
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 99cbd3b..92b357a 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -20,31 +20,22 @@
#include "h5test.h"
#include "testpar.h"
-#include "H5Iprivate.h"
-#include "H5ACprivate.h"
-
-#define H5C_PACKAGE /*suppress error about including H5Cpkg */
-
-#include "H5Cpkg.h"
#define H5AC_PACKAGE /*suppress error about including H5ACpkg */
+#define H5C_PACKAGE /*suppress error about including H5Cpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#include "H5ACpkg.h"
+#include "H5Cpkg.h"
+#include "H5Fpkg.h"
+#include "H5Iprivate.h"
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
-#include "H5Fpkg.h"
int nerrors = 0;
int failures = 0;
hbool_t verbose = TRUE; /* used to control error messages */
-#if 0
-/* So far we haven't needed this, but that may change.
- * Keep it around for now
- */
-hid_t noblock_dxpl_id=(-1);
-#endif
#define NFILENAME 2
#define PARATESTFILE filenames[0]
@@ -169,7 +160,7 @@ struct datum
hbool_t global_pinned;
hbool_t local_pinned;
hbool_t cleared;
- hbool_t flushed;
+ hbool_t flushed;
int reads;
int writes;
int index;
@@ -466,20 +457,20 @@ static hbool_t trace_file_check(int metadata_write_strategy);
#ifdef NOT_USED
/*****************************************************************************
*
- * Function: print_stats()
+ * Function: print_stats()
*
- * Purpose: Print the rudementary stats maintained by t_cache.
+ * Purpose: Print the rudementary stats maintained by t_cache.
*
- * This is a debugging function, which will not normally
- * be run as part of t_cache.
+ * This is a debugging function, which will not normally
+ * be run as part of t_cache.
*
- * Return: void
+ * Return: void
*
- * Programmer: JRM -- 4/17/06
+ * Programmer: JRM -- 4/17/06
*
* Modifications:
*
- * None.
+ * None.
*
*****************************************************************************/
@@ -487,16 +478,16 @@ static void
print_stats(void)
{
HDfprintf(stdout,
- "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n",
+ "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n",
world_mpi_rank, datum_clears, datum_pinned_clears,
- datum_destroys );
+ datum_destroys );
HDfprintf(stdout,
- "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n",
+ "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n",
world_mpi_rank, datum_flushes, datum_pinned_flushes,
- datum_loads );
+ datum_loads );
HDfprintf(stdout,
- "%d: pins: global / global dirty / local = %ld / %ld / %ld\n",
- world_mpi_rank, global_pins, global_dirty_pins, local_pins);
+ "%d: pins: global / global dirty / local = %ld / %ld / %ld\n",
+ world_mpi_rank, global_pins, global_dirty_pins, local_pins);
HDfflush(stdout);
return;
@@ -504,6 +495,7 @@ print_stats(void)
} /* print_stats() */
#endif /* NOT_USED */
+
/*****************************************************************************
*
* Function: reset_stats()
@@ -793,7 +785,7 @@ init_data(void)
data[i].global_pinned = FALSE;
data[i].local_pinned = FALSE;
data[i].cleared = FALSE;
- data[i].flushed = FALSE;
+ data[i].flushed = FALSE;
data[i].reads = 0;
data[i].writes = 0;
data[i].index = i;
@@ -883,12 +875,7 @@ do_express_test(void)
*
* Programmer: JRM -- 5/10/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static void
do_sync(void)
{
@@ -960,12 +947,7 @@ do_sync(void)
*
* Programmer: JRM -- 1/3/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static int
get_max_nerrors(void)
{
@@ -1105,7 +1087,6 @@ recv_mssg(struct mssg_t *mssg_ptr,
* Added the add_req_to_tag parameter and supporting code.
*
*****************************************************************************/
-
static hbool_t
send_mssg(struct mssg_t *mssg_ptr,
hbool_t add_req_to_tag)
@@ -1250,7 +1231,7 @@ setup_derived_types(void)
} /* setup_derived_types */
-
+
/*****************************************************************************
*
* Function: takedown_derived_types()
@@ -1264,12 +1245,7 @@ setup_derived_types(void)
*
* Programmer: JRM -- 12/22/05
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static hbool_t
takedown_derived_types(void)
{
@@ -1311,12 +1287,7 @@ takedown_derived_types(void)
*
* Programmer: JRM -- 5/5/10
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static hbool_t
reset_server_counters(void)
{
@@ -1394,7 +1365,6 @@ reset_server_counters(void)
* Updated for sync message.
*
*****************************************************************************/
-
static hbool_t
server_main(void)
{
@@ -1593,11 +1563,11 @@ serve_read_request(struct mssg_t * mssg_ptr)
success = FALSE;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: proc %d read invalid entry. idx/base_addr = %d/0x%llx.\n",
- world_mpi_rank, fcn_name,
- mssg_ptr->src,
+ "%d:%s: proc %d read invalid entry. idx/base_addr = %d/%a.\n",
+ world_mpi_rank, fcn_name,
+ mssg_ptr->src,
target_index,
- (long long)(data[target_index].base_addr));
+ data[target_index].base_addr);
}
} else {
@@ -1648,7 +1618,7 @@ serve_read_request(struct mssg_t * mssg_ptr)
} /* serve_read_request() */
-
+
/*****************************************************************************
*
* Function: serve_sync_request()
@@ -1669,12 +1639,7 @@ serve_read_request(struct mssg_t * mssg_ptr)
*
* Programmer: JRM -- 5/10/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static hbool_t
serve_sync_request(struct mssg_t * mssg_ptr)
{
@@ -2678,58 +2643,66 @@ load_datum(H5F_t UNUSED *f,
world_mpi_rank, fcn_name);
}
#if 0 /* This has been useful debugging code -- keep it for now. */
- if ( mssg.req != READ_REQ_REPLY_CODE ) {
-
- HDfprintf(stdout, "%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n",
- world_mpi_rank, fcn_name);
- HDfprintf(stdout, "%d:%s: mssg.req = %d.\n",
- world_mpi_rank, fcn_name, (int)(mssg.req));
- }
+ if ( mssg.req != READ_REQ_REPLY_CODE ) {
- if ( mssg.src != world_server_mpi_rank ) {
+ HDfprintf(stdout,
+ "%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n",
+ world_mpi_rank, fcn_name);
+ HDfprintf(stdout, "%d:%s: mssg.req = %d.\n",
+ world_mpi_rank, fcn_name, (int)(mssg.req));
+ }
- HDfprintf(stdout, "%d:%s: mssg.src != world_server_mpi_rank.\n",
- world_mpi_rank, fcn_name);
- }
+ if ( mssg.src != world_server_mpi_rank ) {
- if ( mssg.dest != world_mpi_rank ) {
+ HDfprintf(stdout,
+ "%d:%s: mssg.src != world_server_mpi_rank.\n",
+ world_mpi_rank, fcn_name);
+ }
- HDfprintf(stdout, "%d:%s: mssg.dest != world_mpi_rank.\n",
- world_mpi_rank, fcn_name);
- }
+ if ( mssg.dest != world_mpi_rank ) {
- if ( mssg.base_addr != entry_ptr->base_addr ) {
+ HDfprintf(stdout,
+ "%d:%s: mssg.dest != world_mpi_rank.\n",
+ world_mpi_rank, fcn_name);
+ }
- HDfprintf(stdout,
- "%d:%s: mssg.base_addr != entry_ptr->base_addr.\n",
- world_mpi_rank, fcn_name);
- HDfprintf(stdout, "%d:%s: mssg.base_addr = %a.\n",
- world_mpi_rank, fcn_name, mssg.base_addr);
- HDfprintf(stdout, "%d:%s: entry_ptr->base_addr = %a.\n",
- world_mpi_rank, fcn_name, entry_ptr->base_addr);
- }
+ if ( mssg.base_addr != entry_ptr->base_addr ) {
+
+ HDfprintf(stdout,
+ "%d:%s: mssg.base_addr != entry_ptr->base_addr.\n",
+ world_mpi_rank, fcn_name);
+ HDfprintf(stdout, "%d:%s: mssg.base_addr = %a.\n",
+ world_mpi_rank, fcn_name, mssg.base_addr);
+ HDfprintf(stdout,
+ "%d:%s: entry_ptr->base_addr = %a.\n",
+ world_mpi_rank, fcn_name,
+ entry_ptr->base_addr);
+ }
- if ( mssg.len != entry_ptr->len ) {
+ if ( mssg.len != entry_ptr->len ) {
- HDfprintf(stdout, "%d:%s: mssg.len != entry_ptr->len.\n",
- world_mpi_rank, fcn_name);
- HDfprintf(stdout, "%d:%s: mssg.len = %a.\n",
- world_mpi_rank, fcn_name, mssg.len);
- }
+ HDfprintf(stdout,
+ "%d:%s: mssg.len != entry_ptr->len.\n",
+ world_mpi_rank, fcn_name);
+ HDfprintf(stdout, "%d:%s: mssg.len = %a.\n",
+ world_mpi_rank, fcn_name, mssg.len);
+ }
- if ( mssg.ver < entry_ptr->ver ) {
+ if ( mssg.ver < entry_ptr->ver ) {
- HDfprintf(stdout, "%d:%s: mssg.ver < entry_ptr->ver.\n",
- world_mpi_rank, fcn_name);
- }
+ HDfprintf(stdout,
+ "%d:%s: mssg.ver < entry_ptr->ver.\n",
+ world_mpi_rank, fcn_name);
+ }
- if ( mssg.magic != MSSG_MAGIC ) {
+ if ( mssg.magic != MSSG_MAGIC ) {
- HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n",
- world_mpi_rank, fcn_name);
- }
+ HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n",
+ world_mpi_rank, fcn_name);
+ }
#endif /* JRM */
- } else {
+
+ } else {
entry_ptr->ver = mssg.ver;
entry_ptr->header.is_dirty = FALSE;
@@ -2803,7 +2776,7 @@ size_datum(H5F_t UNUSED * f,
} /* size_datum() */
-
+
/*****************************************************************************/
/************************** test utility functions ***************************/
/*****************************************************************************/
@@ -2821,12 +2794,7 @@ size_datum(H5F_t UNUSED * f,
* Programmer: John Mainzer
* 07/11/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static void
expunge_entry(H5F_t * file_ptr,
int32_t idx)
@@ -2887,7 +2855,7 @@ expunge_entry(H5F_t * file_ptr,
} /* expunge_entry() */
-
+
/*****************************************************************************
* Function: insert_entry()
*
@@ -2909,7 +2877,6 @@ expunge_entry(H5F_t * file_ptr,
* any pins must be global pins.
*
*****************************************************************************/
-
static void
insert_entry(H5C_t * cache_ptr,
H5F_t * file_ptr,
@@ -2998,7 +2965,7 @@ insert_entry(H5C_t * cache_ptr,
} /* insert_entry() */
-
+
/*****************************************************************************
* Function: local_pin_and_unpin_random_entries()
*
@@ -3012,10 +2979,7 @@ insert_entry(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 4/12/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
local_pin_and_unpin_random_entries(H5F_t * file_ptr,
int min_idx,
@@ -3118,7 +3082,7 @@ local_pin_random_entry(H5F_t * file_ptr,
} /* local_pin_random_entry() */
-
+
/*****************************************************************************
* Function: local_unpin_all_entries()
*
@@ -3131,10 +3095,7 @@ local_pin_random_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 4/12/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
local_unpin_all_entries(H5F_t * file_ptr,
hbool_t via_unprotect)
@@ -3160,7 +3121,7 @@ local_unpin_all_entries(H5F_t * file_ptr,
} /* local_unpin_all_entries() */
-
+
/*****************************************************************************
* Function: local_unpin_next_pinned_entry()
*
@@ -3176,10 +3137,7 @@ local_unpin_all_entries(H5F_t * file_ptr,
* Programmer: John Mainzer
* 4/12/06
*
- * Modifications:
- *
*****************************************************************************/
-
static int
local_unpin_next_pinned_entry(H5F_t * file_ptr,
int start_idx,
@@ -3222,7 +3180,7 @@ local_unpin_next_pinned_entry(H5F_t * file_ptr,
} /* local_unpin_next_pinned_entry() */
-
+
/*****************************************************************************
* Function: lock_and_unlock_random_entries()
*
@@ -3237,10 +3195,7 @@ local_unpin_next_pinned_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 1/12/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
lock_and_unlock_random_entries(H5F_t * file_ptr,
int min_idx,
@@ -3273,7 +3228,7 @@ lock_and_unlock_random_entries(H5F_t * file_ptr,
} /* lock_and_unlock_random_entries() */
-
+
/*****************************************************************************
* Function: lock_and_unlock_random_entry()
*
@@ -3287,10 +3242,7 @@ lock_and_unlock_random_entries(H5F_t * file_ptr,
* Programmer: John Mainzer
* 1/4/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
lock_and_unlock_random_entry(H5F_t * file_ptr,
int min_idx,
@@ -3320,7 +3272,7 @@ lock_and_unlock_random_entry(H5F_t * file_ptr,
} /* lock_and_unlock_random_entry() */
-
+
/*****************************************************************************
* Function: lock_entry()
*
@@ -3340,7 +3292,6 @@ lock_and_unlock_random_entry(H5F_t * file_ptr,
* datum.
*
*****************************************************************************/
-
static void
lock_entry(H5F_t * file_ptr,
int32_t idx)
@@ -3400,7 +3351,6 @@ lock_entry(H5F_t * file_ptr,
* 4/14/06
*
*****************************************************************************/
-
static void
mark_entry_dirty(int32_t idx)
{
@@ -3442,7 +3392,7 @@ mark_entry_dirty(int32_t idx)
} /* mark_entry_dirty() */
-
+
/*****************************************************************************
* Function: pin_entry()
*
@@ -3455,10 +3405,7 @@ mark_entry_dirty(int32_t idx)
* Programmer: John Mainzer
* 4/11/06
*
- * Modifications:
- *
*****************************************************************************/
-
static void
pin_entry(H5F_t * file_ptr,
int32_t idx,
@@ -3512,8 +3459,8 @@ pin_entry(H5F_t * file_ptr,
} /* pin_entry() */
-
#ifdef H5_METADATA_TRACE_FILE
+
/*****************************************************************************
* Function: pin_protected_entry()
*
@@ -3527,12 +3474,7 @@ pin_entry(H5F_t * file_ptr,
* Programmer: John Mainzer
* 01/04/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static void
pin_protected_entry(int32_t idx,
hbool_t global)
@@ -3793,7 +3735,7 @@ reset_server_counts(void)
} /* reset_server_counts() */
-
+
/*****************************************************************************
* Function: resize_entry()
*
@@ -3808,12 +3750,7 @@ reset_server_counts(void)
* Programmer: John Mainzer
* 7/11/06
*
- * Modifications:
- *
- * None
- *
*****************************************************************************/
-
static void
resize_entry(int32_t idx,
size_t new_size)
@@ -4070,8 +4007,7 @@ setup_cache_for_test(hid_t * fid_ptr,
if ( success ) {
- if ( H5AC_set_sync_point_done_callback(cache_ptr, verify_writes) !=
- SUCCEED ) {
+ if ( H5AC_set_sync_point_done_callback(cache_ptr, verify_writes) != SUCCEED ) {
nerrors++;
if ( verbose ) {
@@ -4215,7 +4151,7 @@ verify_writes(int num_writes,
} /* verify_writes() */
-
+
/*****************************************************************************
*
* Function: setup_rand()
@@ -4235,7 +4171,6 @@ verify_writes(int num_writes,
* Modified function to facilitate setting predefined seeds.
*
*****************************************************************************/
-
static void
setup_rand(void)
{
@@ -4282,7 +4217,7 @@ setup_rand(void)
} /* setup_rand() */
-
+
/*****************************************************************************
*
* Function: take_down_cache()
@@ -4298,12 +4233,7 @@ setup_rand(void)
*
* Programmer: JRM -- 1/4/06
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
static hbool_t
take_down_cache(hid_t fid)
{
@@ -4760,7 +4690,7 @@ verify_total_writes(int expected_total_writes)
} /* verify_total_writes() */
-
+
/*****************************************************************************
* Function: unlock_entry()
*
@@ -4779,7 +4709,6 @@ verify_total_writes(int expected_total_writes)
* Updated for the new local_len field in datum.
*
*****************************************************************************/
-
void
unlock_entry(H5F_t * file_ptr,
int32_t idx,
@@ -4847,7 +4776,7 @@ unlock_entry(H5F_t * file_ptr,
} /* unlock_entry() */
-
+
/*****************************************************************************
* Function: unpin_entry()
*
@@ -4866,7 +4795,6 @@ unlock_entry(H5F_t * file_ptr,
* Added assertion that entry is pinned on entry.
*
*****************************************************************************/
-
static void
unpin_entry(H5F_t * file_ptr,
int32_t idx,
@@ -5716,7 +5644,6 @@ smoke_check_3(int metadata_write_strategy)
{
const char * fcn_name = "smoke_check_3()";
hbool_t success = TRUE;
- int cp = 0;
int i;
int max_nerrors;
int min_count;
@@ -5749,18 +5676,12 @@ smoke_check_3(int metadata_write_strategy)
break;
}
- /* 0 */
- if ( verbose ) { HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); }
-
nerrors = 0;
init_data();
reset_stats();
if ( world_mpi_rank == world_server_mpi_rank ) {
- /* 1 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
if ( ! server_main() ) {
/* some error occured in the server -- report failure */
@@ -5770,15 +5691,9 @@ smoke_check_3(int metadata_write_strategy)
world_mpi_rank, fcn_name);
}
}
-
- /* 2 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
}
else /* run the clients */
{
- /* 1 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
if ( ! setup_cache_for_test(&fid, &file_ptr, &cache_ptr,
metadata_write_strategy) ) {
@@ -5791,9 +5706,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 2 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
min_count = 100 / ((file_mpi_rank + 1) * (file_mpi_rank + 1));
max_count = min_count + 50;
@@ -5808,9 +5720,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 3 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
min_count = 100 / ((file_mpi_rank + 2) * (file_mpi_rank + 2));
max_count = min_count + 50;
@@ -5850,9 +5759,6 @@ smoke_check_3(int metadata_write_strategy)
}
- /* 4 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* flush the file to be sure that we have no problems flushing
* pinned entries
@@ -5865,9 +5771,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 5 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
min_idx = 0;
max_idx = ((virt_num_data_entries / 10) /
@@ -5902,9 +5805,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 6 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
min_idx = 0;
max_idx = ((virt_num_data_entries / 10) /
((file_mpi_rank + 3) * (file_mpi_rank + 3))) - 1;
@@ -5921,9 +5821,6 @@ smoke_check_3(int metadata_write_strategy)
min_idx, max_idx, 0, 100);
}
- /* 7 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* we can't move pinned entries, so release any local pins now. */
local_unpin_all_entries(file_ptr, FALSE);
@@ -5941,9 +5838,6 @@ smoke_check_3(int metadata_write_strategy)
min_count, max_count);
}
- /* 8 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* ...and then move them back. */
for ( i = (virt_num_data_entries / 2) - 1; i >= 0; i-- )
{
@@ -5955,9 +5849,6 @@ smoke_check_3(int metadata_write_strategy)
min_count, max_count);
}
- /* 9 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* finally, do some dirty lock/unlocks while we give the cache
* a chance t reduce its size.
*/
@@ -5980,9 +5871,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 10 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* release any local pins before we take down the cache. */
local_unpin_all_entries(file_ptr, FALSE);
@@ -5998,9 +5886,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
- /* 11 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
-
/* verify that all instances of datum are back where the started
* and are clean.
*/
@@ -6036,9 +5921,6 @@ smoke_check_3(int metadata_write_strategy)
}
}
}
-
- /* 12 */
- if ( verbose ) {HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);}
}
max_nerrors = get_max_nerrors();
@@ -6400,7 +6282,6 @@ smoke_check_5(int metadata_write_strategy)
{
const char * fcn_name = "smoke_check_5()";
hbool_t success = TRUE;
- int cp = 0;
int i;
int max_nerrors;
hid_t fid = -1;
@@ -6430,20 +6311,12 @@ smoke_check_5(int metadata_write_strategy)
}
- /* 0 */
- if ( verbose ) { HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++); }
-
nerrors = 0;
init_data();
reset_stats();
if ( world_mpi_rank == world_server_mpi_rank ) {
- /* 1 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
if ( ! server_main() ) {
/* some error occured in the server -- report failure */
@@ -6453,20 +6326,10 @@ smoke_check_5(int metadata_write_strategy)
world_mpi_rank, fcn_name);
}
}
-
- /* 2 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
}
else /* run the clients */
{
- /* 1 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
if ( ! setup_cache_for_test(&fid, &file_ptr, &cache_ptr,
metadata_write_strategy) ) {
@@ -6479,21 +6342,11 @@ smoke_check_5(int metadata_write_strategy)
}
}
- /* 2 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
for ( i = 0; i < (virt_num_data_entries / 2); i++ )
{
insert_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
}
- /* 3 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
/* flush the file so we can lock known clean entries. */
if ( H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0 ) {
nerrors++;
@@ -6503,11 +6356,6 @@ smoke_check_5(int metadata_write_strategy)
}
}
- /* 4 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
for ( i = 0; i < (virt_num_data_entries / 4); i++ )
{
lock_entry(file_ptr, i);
@@ -6531,11 +6379,6 @@ smoke_check_5(int metadata_write_strategy)
}
}
- /* 5 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
for ( i = (virt_num_data_entries / 2) - 1;
i >= (virt_num_data_entries / 4);
i-- )
@@ -6560,11 +6403,6 @@ smoke_check_5(int metadata_write_strategy)
unpin_entry(file_ptr, i, TRUE, FALSE, FALSE);
}
- /* 6 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
if ( fid >= 0 ) {
if ( ! take_down_cache(fid) ) {
@@ -6577,11 +6415,6 @@ smoke_check_5(int metadata_write_strategy)
}
}
- /* 7 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
/* verify that all instance of datum are back where the started
* and are clean.
*/
@@ -6592,11 +6425,6 @@ smoke_check_5(int metadata_write_strategy)
HDassert( ! (data[i].dirty) );
}
- /* 8 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
-
/* compose the done message */
mssg.req = DONE_REQ_CODE;
mssg.src = world_mpi_rank;
@@ -6621,11 +6449,6 @@ smoke_check_5(int metadata_write_strategy)
}
}
}
-
- /* 9 */
- if ( verbose ) {
- HDfprintf(stderr, "%d: cp = %d\n", world_mpi_rank, cp++);
- }
}
max_nerrors = get_max_nerrors();
@@ -7079,7 +6902,7 @@ trace_file_check(int metadata_write_strategy)
} /* trace_file_check() */
-
+
/*****************************************************************************
*
* Function: main()
@@ -7092,12 +6915,7 @@ trace_file_check(int metadata_write_strategy)
*
* Programmer: JRM -- 12/23/05
*
- * Modifications:
- *
- * None.
- *
*****************************************************************************/
-
int
main(int argc, char **argv)
{
@@ -7123,7 +6941,8 @@ main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0){
- printf("Failed to turn off atexit processing. Continue.\n");
+ printf("%d:Failed to turn off atexit processing. Continue.\n",
+ mpi_rank);
};
H5open();