summaryrefslogtreecommitdiffstats
path: root/testpar/t_cache.c
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 /testpar/t_cache.c
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
Diffstat (limited to 'testpar/t_cache.c')
-rw-r--r--testpar/t_cache.c110
1 files changed, 22 insertions, 88 deletions
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);