summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-06 13:32:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-06 13:32:07 (GMT)
commit5b2226efc3156536e262a2b24c78386eacdf0b73 (patch)
tree95bf9ac2d46009fe1a981af1e0e3d9004010483b
parent93170b425a30c328c3db0183d8870c6e535c9d7c (diff)
downloadhdf5-5b2226efc3156536e262a2b24c78386eacdf0b73.zip
hdf5-5b2226efc3156536e262a2b24c78386eacdf0b73.tar.gz
hdf5-5b2226efc3156536e262a2b24c78386eacdf0b73.tar.bz2
[svn-r18721] Description:
Bring r18720 from metadata journaling merging branch to trunk: Bring changes from metadata journaling branch to 'merging' branch: Rename H5[A]C_mark_pinned_or_protected_entry_dirty() to H5[A]C_mark_entry_dirty() and get rid of H5[A]C_mark_pinned_entry_dirty(). Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
-rw-r--r--src/H5AC.c90
-rw-r--r--src/H5ACprivate.h4
-rw-r--r--src/H5B2hdr.c2
-rw-r--r--src/H5C.c120
-rw-r--r--src/H5Cprivate.h10
-rw-r--r--src/H5EAhdr.c2
-rw-r--r--src/H5FAhdr.c2
-rw-r--r--src/H5FS.c8
-rw-r--r--src/H5Fsuper.c4
-rw-r--r--src/H5Groot.c2
-rw-r--r--src/H5HFhdr.c2
-rw-r--r--src/H5HFiblock.c2
-rw-r--r--src/H5HL.c4
-rw-r--r--src/H5O.c8
-rw-r--r--src/H5Oalloc.c4
-rw-r--r--src/H5Ochunk.c2
-rw-r--r--src/H5Omessage.c2
-rw-r--r--test/cache.c83
-rw-r--r--test/cache_common.c136
-rw-r--r--test/cache_common.h13
-rw-r--r--testpar/t_cache.c110
21 files changed, 93 insertions, 517 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index be7c927..cff818c 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -1243,91 +1243,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5AC_mark_pinned_entry_dirty
- *
- * Purpose: Mark a pinned entry as dirty. The target entry MUST be
- * be pinned, and MUST be unprotected.
- *
- * If the entry has changed size, the function updates
- * data structures for the size change.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 4/11/06
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
-{
-#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5AC_mark_pinned_entry_dirty, FAIL)
-
- /* Sanity check */
- HDassert(thing);
-
-#if H5AC__TRACE_FILE_ENABLED
- /* For the mark pinned entry dirty call, only the addr, size_changed,
- * and new_size are really necessary in the trace file. Write the result
- * to catch occult errors.
- */
- if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
- sprintf(trace, "%s 0x%lx %d %d", FUNC,
- (unsigned long)(((H5C_cache_entry_t *)thing)->addr),
- (int)size_changed,
- (int)new_size);
-#endif /* H5AC__TRACE_FILE_ENABLED */
-
-#ifdef H5_HAVE_PARALLEL
-{
- H5AC_info_t *entry_ptr = (H5AC_info_t *)thing;
- H5C_t *cache_ptr = entry_ptr->cache_ptr;
-
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
-
- if((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) {
- /* Check for usage errors */
- if(!entry_ptr->is_pinned)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry isn't pinned??")
- if(entry_ptr->is_protected)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is protected??")
-
- if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, size_changed, new_size) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
- } /* end if */
-}
-#endif /* H5_HAVE_PARALLEL */
-
- if(H5C_mark_pinned_entry_dirty(thing, size_changed, new_size) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned entry dirty")
-
-done:
-#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr)
- HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
-#endif /* H5AC__TRACE_FILE_ENABLED */
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_mark_pinned_entry_dirty() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5AC_mark_pinned_or_protected_entry_dirty
+ * Function: H5AC_mark_entry_dirty
*
* Purpose: Mark a pinned or protected entry as dirty. The target
* entry MUST be either pinned, protected, or both.
*
- * Unlike H5AC_mark_pinned_entry_dirty(), this function does
- * not support size changes.
- *
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
@@ -1336,7 +1256,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_mark_pinned_or_protected_entry_dirty(void *thing)
+H5AC_mark_entry_dirty(void *thing)
{
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
@@ -1344,7 +1264,7 @@ H5AC_mark_pinned_or_protected_entry_dirty(void *thing)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_mark_pinned_or_protected_entry_dirty, FAIL)
+ FUNC_ENTER_NOAPI(H5AC_mark_entry_dirty, FAIL)
/* Sanity check */
HDassert(thing);
@@ -1376,7 +1296,7 @@ H5AC_mark_pinned_or_protected_entry_dirty(void *thing)
}
#endif /* H5_HAVE_PARALLEL */
- if(H5C_mark_pinned_or_protected_entry_dirty(thing) < 0)
+ if(H5C_mark_entry_dirty(thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned or protected entry dirty")
done:
@@ -1386,7 +1306,7 @@ done:
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_mark_pinned_or_protected_entry_dirty() */
+} /* H5AC_mark_entry_dirty() */
/*-------------------------------------------------------------------------
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 33e29b2..818a616 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -337,9 +337,7 @@ H5_DLL herr_t H5AC_unprotect(H5F_t *f, hid_t dxpl_id,
const H5AC_class_t *type, haddr_t addr,
void *thing, unsigned flags);
H5_DLL herr_t H5AC_flush(H5F_t *f, hid_t dxpl_id);
-H5_DLL herr_t H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed,
- size_t new_size);
-H5_DLL herr_t H5AC_mark_pinned_or_protected_entry_dirty(void *thing);
+H5_DLL herr_t H5AC_mark_entry_dirty(void *thing);
H5_DLL herr_t H5AC_rename(H5F_t *f, const H5AC_class_t *type,
haddr_t old_addr, haddr_t new_addr);
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index a219859..cbbfed6 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -479,7 +479,7 @@ H5B2_hdr_dirty(H5B2_hdr_t *hdr)
HDassert(hdr);
/* Mark B-tree header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
+ if(H5AC_mark_entry_dirty(hdr) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark v2 B-tree header as dirty")
done:
diff --git a/src/H5C.c b/src/H5C.c
index 8181f77..33402a8 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -2776,120 +2776,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5C_mark_pinned_entry_dirty
- *
- * Purpose: Mark a pinned entry as dirty. The target entry MUST be
- * be pinned, and MUST be unprotected.
- *
- * If the entry has changed size, the function updates
- * data structures for the size change.
- *
- * If the entry is not already dirty, the function places
- * the entry on the skip list.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 3/22/06
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5C_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
-{
- H5C_t * cache_ptr;
- H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
- hbool_t was_clean;
- size_t size_increase;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5C_mark_pinned_entry_dirty, FAIL)
-
- /* Sanity checks */
- HDassert(entry_ptr);
- HDassert(H5F_addr_defined(entry_ptr->addr));
- cache_ptr = entry_ptr->cache_ptr;
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
-
- /* Check for usage errors */
- if(!entry_ptr->is_pinned)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry isn't pinned??")
- if(entry_ptr->is_protected)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is protected??")
-
- /* make note of whether the entry was dirty to begin with */
- was_clean = ! ( entry_ptr->is_dirty );
-
- /* mark the entry as dirty if it isn't already */
- entry_ptr->is_dirty = TRUE;
-
- /* update for change in entry size if necessary */
- if ( ( size_changed ) && ( entry_ptr->size != new_size ) ) {
-
- /* do a flash cache size increase if appropriate */
- if ( cache_ptr->flash_size_increase_possible ) {
-
- if ( new_size > entry_ptr->size ) {
-
- size_increase = new_size - entry_ptr->size;
-
- if ( size_increase >=
- cache_ptr->flash_size_increase_threshold ) {
- if(H5C__flash_increase_cache_size(cache_ptr, entry_ptr->size, new_size) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "flash cache increase failed")
- }
- }
- }
-
- /* update the pinned entry list */
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->pel_len), \
- (cache_ptr->pel_size), \
- (entry_ptr->size), (new_size));
-
- /* update the hash table */
- H5C__UPDATE_INDEX_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size), \
- (new_size), (entry_ptr), (was_clean));
-
- /* if the entry is in the skip list, update that too */
- if ( entry_ptr->in_slist ) {
-
- H5C__UPDATE_SLIST_FOR_SIZE_CHANGE((cache_ptr), (entry_ptr->size),\
- (new_size));
- }
-
- /* update statistics just before changing the entry size */
- H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE((cache_ptr), (entry_ptr), \
- (new_size));
-
- /* finally, update the entry size proper */
- entry_ptr->size = new_size;
-
- } else if ( ( was_clean ) && ( entry_ptr->is_dirty ) ) {
-
- H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr)
- }
-
- if ( ! (entry_ptr->in_slist) ) {
-
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
- }
-
- H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_mark_pinned_entry_dirty() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5C_mark_pinned_or_protected_entry_dirty
+ * Function: H5C_mark_entry_dirty
*
* Purpose: Mark a pinned or protected entry as dirty. The target entry
* MUST be either pinned or protected, and MAY be both.
*
- * At present, this funtion does not support size change.
- *
* In the protected case, this call is the functional
* equivalent of setting the H5C__DIRTIED_FLAG on an unprotect
* call.
@@ -2912,13 +2803,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_mark_pinned_or_protected_entry_dirty(void *thing)
+H5C_mark_entry_dirty(void *thing)
{
H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr = (H5C_cache_entry_t *)thing;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5C_mark_pinned_or_protected_entry_dirty, FAIL)
+ FUNC_ENTER_NOAPI(H5C_mark_entry_dirty, FAIL)
/* Sanity checks */
HDassert(entry_ptr);
@@ -2928,9 +2819,8 @@ H5C_mark_pinned_or_protected_entry_dirty(void *thing)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if ( entry_ptr->is_protected ) {
-#if 0 /* JRM - uncomment this when possible */
HDassert( ! ((entry_ptr)->is_read_only) );
-#endif
+
/* set the dirtied flag */
entry_ptr->dirtied = TRUE;
@@ -2962,7 +2852,7 @@ H5C_mark_pinned_or_protected_entry_dirty(void *thing)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5C_mark_pinned_or_protected_entry_dirty() */
+} /* H5C_mark_entry_dirty() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 9dc9db3..f6792ba 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -292,10 +292,10 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
*
* This field is set to FALSE in the protect call, and may
* be set to TRUE by the
- * H5C_mark_pinned_or_protected_entry_dirty()
+ * H5C_mark_entry_dirty()
* call at an time prior to the unprotect call.
*
- * The H5C_mark_pinned_or_protected_entry_dirty() call exists
+ * The H5C_mark_entry_dirty() call exists
* as a convenience function for the fractal heap code which
* may not know if an entry is protected or pinned, but knows
* that is either protected or pinned. The dirtied field was
@@ -1116,11 +1116,7 @@ H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t * f,
int32_t ce_array_len,
haddr_t *ce_array_ptr);
-H5_DLL herr_t H5C_mark_pinned_entry_dirty(void * thing,
- hbool_t size_changed,
- size_t new_size);
-
-H5_DLL herr_t H5C_mark_pinned_or_protected_entry_dirty(void *thing);
+H5_DLL herr_t H5C_mark_entry_dirty(void *thing);
H5_DLL herr_t H5C_rename_entry(H5C_t * cache_ptr,
const H5C_class_t * type,
diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c
index fecf7f9..2f58320 100644
--- a/src/H5EAhdr.c
+++ b/src/H5EAhdr.c
@@ -603,7 +603,7 @@ H5EA__hdr_modified(H5EA_hdr_t *hdr))
HDassert(hdr->f);
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
+ if(H5AC_mark_entry_dirty(hdr) < 0)
H5E_THROW(H5E_CANTMARKDIRTY, "unable to mark extensible array header as dirty")
CATCH
diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c
index 644b4c9..5cfba0d 100644
--- a/src/H5FAhdr.c
+++ b/src/H5FAhdr.c
@@ -384,7 +384,7 @@ H5FA__hdr_modified(H5FA_hdr_t *hdr))
HDassert(hdr);
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
+ if(H5AC_mark_entry_dirty(hdr) < 0)
H5E_THROW(H5E_CANTMARKDIRTY, "unable to mark fixed array header as dirty")
CATCH
diff --git a/src/H5FS.c b/src/H5FS.c
index d3e0a1b..459b16f 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -392,7 +392,7 @@ HDfprintf(stderr, "%s: Real sections to store in file\n", FUNC);
fspace->alloc_sect_size = (size_t)fspace->sect_size;
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
+ if(H5AC_mark_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
} /* end if */
} /* end if */
@@ -449,7 +449,7 @@ HDfprintf(stderr, "%s: Section info went 'go away'\n", FUNC);
fspace->alloc_sect_size = 0;
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
+ if(H5AC_mark_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
} /* end else */
} /* end if */
@@ -465,7 +465,7 @@ HDfprintf(stderr, "%s: Section info is NOT for file free space\n", FUNC);
fspace->alloc_sect_size = 0;
/* Mark free space header as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
+ if(H5AC_mark_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
/* Free previous serialized sections disk space */
@@ -730,7 +730,7 @@ HDfprintf(stderr, "%s: Marking free space header as dirty\n", FUNC);
/* Check if the free space manager is persistant */
if(H5F_addr_defined(fspace->addr))
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(fspace) < 0)
+ if(H5AC_mark_entry_dirty(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
done:
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 6da6fec..6162d21 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -657,7 +657,7 @@ H5F_super_dirty(H5F_t *f)
HDassert(f->shared->sblock);
/* Mark superblock dirty in cache, so change to EOA will get encoded */
- if(H5AC_mark_pinned_or_protected_entry_dirty(f->shared->sblock) < 0)
+ if(H5AC_mark_entry_dirty(f->shared->sblock) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
done:
@@ -821,7 +821,7 @@ H5F_super_ext_write_msg(H5F_t *f, hid_t dxpl_id, void *mesg, unsigned id, hbool_
done:
/* Mark superblock dirty in cache, if necessary */
if(sblock_dirty)
- if(H5AC_mark_pinned_or_protected_entry_dirty(f->shared->sblock) < 0)
+ if(H5AC_mark_entry_dirty(f->shared->sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Groot.c b/src/H5Groot.c
index 7470853..f754f29 100644
--- a/src/H5Groot.c
+++ b/src/H5Groot.c
@@ -262,7 +262,7 @@ done:
/* Mark superblock dirty in cache, if necessary */
if(sblock_dirty)
- if(H5AC_mark_pinned_or_protected_entry_dirty(f->shared->sblock) < 0)
+ if(H5AC_mark_entry_dirty(f->shared->sblock) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index c51fc82..38c1790 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -722,7 +722,7 @@ H5HF_hdr_dirty(H5HF_hdr_t *hdr)
} /* end if */
/* Mark header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(hdr) < 0)
+ if(H5AC_mark_entry_dirty(hdr) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap header as dirty")
done:
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 3818acd..bb01ba1 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -332,7 +332,7 @@ H5HF_iblock_dirty(H5HF_indirect_t *iblock)
HDassert(iblock);
/* Mark indirect block as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(iblock) < 0)
+ if(H5AC_mark_entry_dirty(iblock) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark fractal heap indirect block as dirty")
done:
diff --git a/src/H5HL.c b/src/H5HL.c
index e5c49d6..09df1cb 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -655,12 +655,12 @@ H5HL_dirty(H5HL_t *heap)
/* Sanity check */
HDassert(heap->dblk);
- if(H5AC_mark_pinned_or_protected_entry_dirty(heap->dblk) < 0)
+ if(H5AC_mark_entry_dirty(heap->dblk) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap data block as dirty")
} /* end if */
/* Mark heap prefix as dirty */
- if(H5AC_mark_pinned_or_protected_entry_dirty(heap->prfx) < 0)
+ if(H5AC_mark_entry_dirty(heap->prfx) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTMARKDIRTY, FAIL, "unable to mark heap prefix as dirty")
done:
diff --git a/src/H5O.c b/src/H5O.c
index c8c882a..7e4a3dc 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1482,7 +1482,7 @@ H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted)
oh->nlink += adjust;
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
+ if(H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
/* Check if the object should be deleted */
@@ -1514,7 +1514,7 @@ H5O_link_oh(H5F_t *f, int adjust, hid_t dxpl_id, H5O_t *oh, hbool_t *deleted)
oh->nlink += adjust;
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
+ if(H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
@@ -1767,7 +1767,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
/* (usually through updating the # of object header messages) */
if(oh->prefix_modified) {
/* Mark the header as dirty now */
- if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
+ if(H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, NULL, "unable to mark object header as dirty")
/* Reset flag */
@@ -2019,7 +2019,7 @@ H5O_touch_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, hbool_t force)
oh->atime = oh->ctime = now;
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
+ if(H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end else */
} /* end if */
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 97facc8..186b7f4 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -601,7 +601,7 @@ H5O_alloc_extend_chunk(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned chunkno,
oh->flags |= new_size_flags;
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
+ if(H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
@@ -1171,7 +1171,7 @@ H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type,
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't split null message")
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
+ if(H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
/* Set return value */
diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c
index ee5a629..e8f2afa 100644
--- a/src/H5Ochunk.c
+++ b/src/H5Ochunk.c
@@ -239,7 +239,7 @@ H5O_chunk_unprotect(H5F_t *f, hid_t dxpl_id, H5O_chunk_proxy_t *chk_proxy,
/* Check for dirtying the first chunk */
if(chk_flags & H5AC__DIRTIED_FLAG) {
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(chk_proxy->oh) < 0)
+ if(H5AC_mark_entry_dirty(chk_proxy->oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end else/if */
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 30db1ce..fbf0761 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -1328,7 +1328,7 @@ done:
HDONE_ERROR(H5E_OHDR, H5E_CANTUPDATE, FAIL, "unable to update time on object")
/* Mark object header as dirty in cache */
- if(H5AC_mark_pinned_or_protected_entry_dirty(oh) < 0)
+ if(H5AC_mark_entry_dirty(oh) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, FAIL, "unable to mark object header as dirty")
} /* end if */
diff --git a/test/cache.c b/test/cache.c
index 364ec75..8eb7d37 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -10941,8 +10941,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
*
* JRM -- 5/17/06
* Complete reqrite of pinned entry tests to accomodate
- * the new H5C_mark_pinned_or_protected_entry_dirty()
- * call.
+ * the new H5C_mark_entry_dirty() call.
*
*-------------------------------------------------------------------------
*/
@@ -12742,13 +12741,12 @@ check_flush_cache__single_entry(H5F_t * file_ptr)
*
* 2) Marked dirty by unprotect or not.
*
- * 3) Marked dirty by call to H5C_mark_pinned_entry_dirty() or not.
+ * 3) Marked dirty by call to H5C_mark_entry_dirty() or not.
*
- * 4) Marked dirty by call to H5C_mark_pinned_or_protected_entry_dirty()
- * while protected or not.
+ * 4) Marked dirty by call to H5C_mark_entry_dirty() while protected
+ * or not.
*
- * 5) Marked dirty by call to H5C_mark_pinned_or_protected_entry_dirty()
- * while pinned or not.
+ * 5) Marked dirty by call to H5C_mark_entry_dirty() while pinned or not.
*
* 6) Entry marked for flush or not.
*
@@ -13306,7 +13304,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
* JRM -- 5/17/06
* Added the pop_mark_dirty_prot and pop_mark_dirty_pinned
* flags and supporting code to allow us to test the
- * H5C_mark_pinned_or_protected_entry_dirty() call. Use the
+ * H5C_mark_entry_dirty() call. Use the
* call to mark the entry dirty while the entry is protected
* if pop_mark_dirty_prot is TRUE, and to mark the entry
* dirty while it is pinned if pop_mark_dirty_pinned is TRUE.
@@ -13374,8 +13372,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
if ( pop_mark_dirty_prot ) {
- mark_pinned_or_protected_entry_dirty(entry_type,
- entry_idx);
+ mark_entry_dirty(entry_type, entry_idx);
}
unprotect_entry(file_ptr, entry_type, entry_idx,
@@ -13383,13 +13380,12 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
if ( mark_dirty ) {
- mark_pinned_entry_dirty(entry_type, entry_idx, FALSE, (size_t)0);
+ mark_entry_dirty(entry_type, entry_idx);
}
if ( pop_mark_dirty_pinned ) {
- mark_pinned_or_protected_entry_dirty(entry_type,
- entry_idx);
+ mark_entry_dirty(entry_type, entry_idx);
}
}
@@ -13668,7 +13664,7 @@ check_get_entry_status(void)
if ( pass ) {
- mark_pinned_entry_dirty(0, 0, FALSE, (size_t)0);
+ mark_entry_dirty(0, 0);
}
@@ -17444,13 +17440,7 @@ check_double_unprotect_err(void)
*
* Purpose: Verify that:
*
- * 1) a call to H5C_mark_pinned_entry_dirty with an upinned
- * entry as the target will generate an error.
- *
- * 2) a call to H5C_mark_pinned_entry_dirty with a protected
- * entry as the target will generate an error.
- *
- * 3) a call to H5C_mark_pinned_or_protected_entry_dirty with
+ * 1) a call to H5C_mark_entry_dirty with
* and unpinned and unprotected entry will generate an
* error.
*
@@ -17459,10 +17449,6 @@ check_double_unprotect_err(void)
* Programmer: John Mainzer
* 5/17/06
*
- * Modifications:
- *
- * None.
- *
*-------------------------------------------------------------------------
*/
@@ -17478,14 +17464,8 @@ check_mark_entry_dirty_errs(void)
pass = TRUE;
- /* allocate a cache, protect an entry, and then attempt to mark it dirty
- * with the H5C_mark_pinned_entry_dirty() call -- This should fail.
- *
- * Then unprotect the entry without pinning it, and try to mark it dirty
- * again -- this should fail too.
- *
- * Try it again using H5C_mark_pinned_or_protected_entry_dirty -- this
- * should fail as well.
+ /* allocate a cache, protect an entry, unprotect the entry without
+ * pinning it, and try to mark it dirty -- this should fail.
*
* Destroy the cache -- should succeed.
*/
@@ -17499,52 +17479,21 @@ check_mark_entry_dirty_errs(void)
protect_entry(file_ptr, 0, 0);
- unprotect_entry(file_ptr, 0, 0, FALSE, H5C__PIN_ENTRY_FLAG);
-
- protect_entry(file_ptr, 0, 0);
+ unprotect_entry(file_ptr, 0, 0, FALSE, H5C__NO_FLAGS_SET);
entry_ptr = &((entries[0])[0]);
}
if ( pass ) {
- result = H5C_mark_pinned_entry_dirty((void *)entry_ptr, FALSE, (size_t)0);
-
- if ( result > 0 ) {
-
- pass = FALSE;
- failure_mssg =
- "attempt dirty a pinned and protected entry succeeded.\n";
-
- } else {
-
- unprotect_entry(file_ptr, 0, 0, FALSE, H5C__UNPIN_ENTRY_FLAG);
- }
- }
-
- if ( pass ) {
-
- result = H5C_mark_pinned_entry_dirty((void *)entry_ptr, FALSE, (size_t)0);
-
-
- if ( result > 0 ) {
-
- pass = FALSE;
- failure_mssg =
- "attempt to dirty a unpinned and unprotected entry succeeded 1.\n";
- }
- }
-
- if ( pass ) {
-
- result = H5C_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
+ result = H5C_mark_entry_dirty((void *)entry_ptr);
if ( result > 0 ) {
pass = FALSE;
failure_mssg =
- "attempt to dirty a unpinned and unprotected entry succeeded 2.\n";
+ "attempt to dirty a unpinned and unprotected entry succeeded.\n";
}
}
diff --git a/test/cache_common.c b/test/cache_common.c
index 4326616..6290f2a 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -1439,7 +1439,7 @@ create_pinned_entry_dependency(H5F_t * file_ptr,
* If the dirty_pin parameter is true, verify that the
* target entry is in the cache and is pinned. If it
* isn't, scream and die. If it is, use the
- * H5C_mark_pinned_entry_dirty() call to dirty it.
+ * H5C_mark_entry_dirty() call to dirty it.
*
* Do nothing if pass is false on entry.
*
@@ -1492,7 +1492,7 @@ dirty_entry(H5F_t * file_ptr,
} else {
- mark_pinned_entry_dirty(type, idx, FALSE, (size_t)0);
+ mark_entry_dirty(type, idx);
}
}
@@ -1827,7 +1827,7 @@ reset_entries(void)
* If the resize_pin parameter is true, verify that the
* target entry is in the cache and is pinned. If it
* isn't, scream and die. If it is, use the
- * H5C_mark_pinned_entry_dirty() call to resize it.
+ * H5C_resize_pinned_entry() call to resize it.
*
* Do nothing if pass is false on entry.
*
@@ -1882,7 +1882,7 @@ resize_entry(H5F_t * file_ptr,
} else {
- mark_pinned_entry_dirty(type, idx, TRUE, new_size);
+ resize_pinned_entry(cache_ptr, type, idx, new_size);
}
}
} else {
@@ -3074,7 +3074,7 @@ insert_entry(H5F_t * file_ptr,
/*-------------------------------------------------------------------------
- * Function: mark_pinned_entry_dirty()
+ * Function: mark_entry_dirty()
*
* Purpose: Mark the specified entry as dirty.
*
@@ -3089,10 +3089,8 @@ insert_entry(H5F_t * file_ptr,
*/
void
-mark_pinned_entry_dirty(int32_t type,
- int32_t idx,
- hbool_t size_changed,
- size_t new_size)
+mark_entry_dirty(int32_t type,
+ int32_t idx)
{
/* const char * fcn_name = "mark_pinned_entry_dirty()"; */
herr_t result;
@@ -3110,127 +3108,23 @@ mark_pinned_entry_dirty(int32_t type,
HDassert( entry_ptr->index == idx );
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
- HDassert( ! (entry_ptr->header.is_protected) );
- HDassert( entry_ptr->header.is_pinned );
- HDassert( entry_ptr->is_pinned );
+ HDassert( entry_ptr->header.is_protected ||
+ entry_ptr->header.is_pinned );
entry_ptr->is_dirty = TRUE;
- if ( size_changed ) {
-
- /* update entry size now to keep the sanity checks happy */
- entry_ptr->size = new_size;
- }
-
- result = H5C_mark_pinned_entry_dirty((void *)entry_ptr,
- size_changed,
- new_size);
+ result = H5C_mark_entry_dirty((void *)entry_ptr);
if ( ( result < 0 ) ||
- ( ! (entry_ptr->header.is_dirty) ) ||
- ( ! (entry_ptr->header.is_pinned) ) ||
+ ( !entry_ptr->header.is_protected && !entry_ptr->header.is_pinned ) ||
+ ( entry_ptr->header.is_protected && !entry_ptr->header.dirtied ) ||
+ ( !entry_ptr->header.is_protected && !entry_ptr->header.is_dirty ) ||
( entry_ptr->header.type != &(types[type]) ) ||
( entry_ptr->size != entry_ptr->header.size ) ||
( entry_ptr->addr != entry_ptr->header.addr ) ) {
-#if 0 /* This is useful debugging code -- keep it around */
- HDfprintf(stdout, "result = %ld.\n", (long)result);
- HDfprintf(stdout, "entry_ptr->header.is_dirty = %d.\n",
- (int)(entry_ptr->header.is_dirty));
- HDfprintf(stdout, "entry_ptr->header.is_pinned = %d.\n",
- (int)(entry_ptr->header.is_pinned));
- HDfprintf(stdout,
- "(entry_ptr->header.type != &(types[type])) = %d.\n",
- (int)(entry_ptr->header.type != &(types[type])));
- HDfprintf(stdout,
- "entry_ptr->size = %ld, entry_ptr->header.size = %ld.\n",
- (long)(entry_ptr->size), (long)(entry_ptr->header.size));
- HDfprintf(stdout,
- "entry_ptr->addr = %ld, entry_ptr->header.addr = %ld.\n",
- (long)(entry_ptr->addr), (long)(entry_ptr->header.addr));
-#endif
- pass = FALSE;
- failure_mssg = "error in H5C_mark_pinned_entry_dirty().";
-
- }
-
- HDassert( ((entry_ptr->header).type)->id == type );
-
- }
-
- return;
-
-} /* mark_pinned_entry_dirty() */
-
-
-/*-------------------------------------------------------------------------
- * Function: mark_pinned_or_protected_entry_dirty()
- *
- * Purpose: Mark the specified entry as dirty.
- *
- * Do nothing if pass is FALSE on entry.
- *
- * Return: void
- *
- * Programmer: John Mainzer
- * 5/17/06
- *
- *-------------------------------------------------------------------------
- */
-
-void
-mark_pinned_or_protected_entry_dirty(int32_t type,
- int32_t idx)
-{
- /* const char * fcn_name = "mark_pinned_or_protected_entry_dirty()"; */
- herr_t result;
- test_entry_t * base_addr;
- test_entry_t * entry_ptr;
-
- if ( pass ) {
-
- HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
- HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
-
- base_addr = entries[type];
- entry_ptr = &(base_addr[idx]);
-
- HDassert( entry_ptr->index == idx );
- HDassert( entry_ptr->type == type );
- HDassert( entry_ptr == entry_ptr->self );
- HDassert( entry_ptr->header.is_protected ||
- entry_ptr->header.is_pinned );
-
- entry_ptr->is_dirty = TRUE;
-
- result = H5C_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
-
- if ( ( result < 0 )
- ||
- ( ( ! (entry_ptr->header.is_protected) )
- &&
- ( ! (entry_ptr->header.is_pinned) )
- )
- ||
- ( ( entry_ptr->header.is_protected )
- &&
- ( ! ( entry_ptr->header.dirtied ) )
- )
- ||
- ( ( ! ( entry_ptr->header.is_protected ) )
- &&
- ( ! ( entry_ptr->header.is_dirty ) )
- )
- ||
- ( entry_ptr->header.type != &(types[type]) )
- ||
- ( entry_ptr->size != entry_ptr->header.size )
- ||
- ( entry_ptr->addr != entry_ptr->header.addr ) ) {
-
pass = FALSE;
- failure_mssg =
- "error in H5C_mark_pinned_or_protected_entry_dirty().";
+ failure_mssg = "error in H5C_mark_entry_dirty().";
}
@@ -3240,7 +3134,7 @@ mark_pinned_or_protected_entry_dirty(int32_t type,
return;
-} /* mark_pinned_or_protected_entry_dirty() */
+} /* mark_entry_dirty() */
/*-------------------------------------------------------------------------
diff --git a/test/cache_common.h b/test/cache_common.h
index 3714f6e..3bb26ef 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -183,13 +183,13 @@ typedef struct flush_op
* FLUSH_OP__DIRTY: TRUE iff the
* target is pinned, and is to
* be dirtied via the
- * H5C_mark_pinned_entry_dirty()
+ * H5C_mark_entry_dirty()
* call.
*
* FLUSH_OP__RESIZE: TRUE iff the
* target is pinned, and is to
* be resized via the
- * H5C_mark_pinned_entry_dirty()
+ * H5C_mark_entry_dirty()
* call.
*
* FLUSH_OP__RENAME: TRUE iff the
@@ -667,13 +667,8 @@ void insert_entry(H5F_t * file_ptr,
hbool_t dirty,
unsigned int flags);
-void mark_pinned_entry_dirty(int32_t type,
- int32_t idx,
- hbool_t size_changed,
- size_t new_size);
-
-void mark_pinned_or_protected_entry_dirty(int32_t type,
- int32_t idx);
+void mark_entry_dirty(int32_t type,
+ int32_t idx);
void rename_entry(H5C_t * cache_ptr,
int32_t type,
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 4c4acdc..9e6c8fc 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -360,8 +360,8 @@ void lock_and_unlock_random_entries(H5C_t * cache_ptr, H5F_t * file_ptr,
void lock_and_unlock_random_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int min_idx, int max_idx);
void lock_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx);
-void mark_pinned_entry_dirty(int32_t idx, hbool_t size_changed, size_t new_size);
-void mark_pinned_or_protected_entry_dirty(int32_t idx);
+void mark_entry_dirty(H5C_t * cache_ptr, H5F_t * file_ptr,
+ int32_t idx);
void pin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx,
hbool_t global, hbool_t dirty);
void pin_protected_entry(int32_t idx, hbool_t global);
@@ -2763,7 +2763,7 @@ lock_entry(H5C_t * cache_ptr,
/*****************************************************************************
- * Function: mark_pinned_entry_dirty()
+ * Function: mark_entry_dirty()
*
* Purpose: Mark dirty the entry indicated by the index,
*
@@ -2774,21 +2774,21 @@ lock_entry(H5C_t * cache_ptr,
* Programmer: John Mainzer
* 4/14/06
*
- * Modifications:
- *
*****************************************************************************/
void
-mark_pinned_entry_dirty(int32_t idx,
- hbool_t size_changed,
- size_t new_size)
+mark_entry_dirty(H5C_t * cache_ptr,
+ H5F_t * file_ptr,
+ int32_t idx)
{
- const char * fcn_name = "mark_pinned_entry_dirty()";
+ const char * fcn_name = "mark_entry_dirty()";
herr_t result;
struct datum * entry_ptr;
if ( nerrors == 0 ) {
+ HDassert( file_ptr );
+ HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2800,16 +2800,14 @@ mark_pinned_entry_dirty(int32_t idx,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_mark_pinned_entry_dirty((void *)entry_ptr,
- size_changed,
- new_size);
+ result = H5AC_mark_entry_dirty( (void *)entry_ptr);
if ( result < 0 ) {
nerrors++;
if ( verbose ) {
HDfprintf(stdout,
- "%d:%s: error in H5AC_mark_pinned_entry_dirty().\n",
+ "%d:%s: error in H5AC_mark_entry_dirty().\n",
world_mpi_rank, fcn_name);
}
}
@@ -2821,65 +2819,7 @@ mark_pinned_entry_dirty(int32_t idx,
return;
-} /* mark_pinned_entry_dirty() */
-
-
-/*****************************************************************************
- * Function: mark_pinned_or_protected_entry_dirty()
- *
- * Purpose: Use the H5AC_mark_pinned_or_protected_entry_dirty() call to
- * mark dirty the entry indicated by the index,
- *
- * Do nothing if nerrors is non-zero on entry.
- *
- * Return: void
- *
- * Programmer: John Mainzer
- * 5/18/06
- *
- * Modifications:
- *
- *****************************************************************************/
-
-void
-mark_pinned_or_protected_entry_dirty(int32_t idx)
-{
- const char * fcn_name = "mark_pinned_or_protected_entry_dirty()";
- herr_t result;
- struct datum * entry_ptr;
-
- if ( nerrors == 0 ) {
-
- HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
- HDassert( idx < virt_num_data_entries );
-
- entry_ptr = &(data[idx]);
-
- HDassert ( entry_ptr->locked || entry_ptr->global_pinned );
-
- (entry_ptr->ver)++;
- entry_ptr->dirty = TRUE;
-
- result = H5AC_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
-
- if ( result < 0 ) {
-
- nerrors++;
- if ( verbose ) {
- HDfprintf(stdout, "%d:%s: error in %s.\n",
- world_mpi_rank, fcn_name,
- "H5AC_mark_pinned_or_protected_entry_dirty()");
- }
- }
- else if ( ! ( entry_ptr->locked ) )
- {
- global_dirty_pins++;
- }
- }
-
- return;
-
-} /* mark_pinned_or_protected_entry_dirty() */
+} /* mark_entry_dirty() */
/*****************************************************************************
@@ -3752,7 +3692,7 @@ unpin_entry(H5C_t * cache_ptr,
if ( dirty ) {
- mark_pinned_entry_dirty(idx, FALSE, (size_t)0);
+ mark_entry_dirty(cache_ptr, file_ptr, idx);
}
@@ -5081,8 +5021,7 @@ smoke_check_4(void)
* Function: smoke_check_5()
*
* Purpose: Similar to smoke check 1, but modified to verify that
- * H5AC_mark_pinned_or_protected_entry_dirty() works in
- * the parallel case.
+ * H5AC_mark_entry_dirty() works in the parallel case.
*
* Return: Success: TRUE
*
@@ -5200,7 +5139,7 @@ smoke_check_5(void)
if ( i % 2 == 0 )
{
- mark_pinned_or_protected_entry_dirty(i);
+ mark_entry_dirty(cache_ptr, file_ptr, i);
}
unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
@@ -5236,13 +5175,9 @@ smoke_check_5(void)
}
if ( i % 4 == 0 )
- {
- mark_pinned_or_protected_entry_dirty(i);
- }
+ mark_entry_dirty(cache_ptr, file_ptr, i);
else
- {
- mark_pinned_entry_dirty(i, FALSE, (size_t)0);
- }
+ mark_entry_dirty(cache_ptr, file_ptr, i);
if ( i % 8 <= 4 ) {
@@ -5362,8 +5297,7 @@ smoke_check_5(void)
*
* - H5AC_flush()
* - H5AC_set()
- * - H5AC_mark_pinned_entry_dirty()
- * - H5AC_mark_pinned_or_protected_entry_dirty()
+ * - H5AC_mark_entry_dirty()
* H5AC_rename()
* - H5AC_pin_protected_entry()
* - H5AC_protect()
@@ -5406,7 +5340,7 @@ trace_file_check(void)
"H5AC_set 0x4 15 0x0 4 0\n",
"H5AC_set 0x8 15 0x0 6 0\n",
"H5AC_protect 0 15 H5AC_WRITE 2 1\n",
- "H5AC_mark_pinned_or_protected_entry_dirty 0 0\n",
+ "H5AC_mark_entry_dirty 0 0\n",
"H5AC_unprotect 0 15 0 0 0\n",
"H5AC_protect 2 15 H5AC_WRITE 2 1\n",
"H5AC_pin_protected_entry 2 0\n",
@@ -5416,7 +5350,7 @@ trace_file_check(void)
"H5AC_protect 4 15 H5AC_WRITE 4 1\n",
"H5AC_pin_protected_entry 4 0\n",
"H5AC_unprotect 4 15 0 0 0\n",
- "H5AC_mark_pinned_entry_dirty 0x4 0 0 0\n",
+ "H5AC_mark_entry_dirty 0x4 0 0 0\n",
"H5AC_resize_pinned_entry 0x4 2 0\n",
"H5AC_resize_pinned_entry 0x4 4 0\n",
"H5AC_unpin_entry 4 0\n",
@@ -5512,7 +5446,7 @@ trace_file_check(void)
insert_entry(cache_ptr, file_ptr, 3, H5AC__NO_FLAGS_SET);
lock_entry(cache_ptr, file_ptr, 0);
- mark_pinned_or_protected_entry_dirty(0);
+ mark_entry_dirty(cache_ptr, file_ptr, 0);
unlock_entry(cache_ptr, file_ptr, 0, H5AC__NO_FLAGS_SET);
lock_entry(cache_ptr, file_ptr, 1);
@@ -5525,7 +5459,7 @@ trace_file_check(void)
lock_entry(cache_ptr, file_ptr, 2);
pin_protected_entry(2, TRUE);
unlock_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET);
- mark_pinned_entry_dirty(2, FALSE, 0);
+ mark_entry_dirty(cache_ptr, file_ptr, 2);
resize_entry(2, data[2].len / 2);
resize_entry(2, data[2].len);
unpin_entry(cache_ptr, file_ptr, 2, TRUE, FALSE, FALSE);