summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-11-18 01:48:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-11-18 01:48:21 (GMT)
commiteba0ff43c968ef9a0b09edf19c1e337cfcae0816 (patch)
tree53142d64c8e678f0862533b17790bb4ea72fa87c /testpar
parent248a93cde8d87dd3a8162831103b5358a166fed8 (diff)
downloadhdf5-eba0ff43c968ef9a0b09edf19c1e337cfcae0816.zip
hdf5-eba0ff43c968ef9a0b09edf19c1e337cfcae0816.tar.gz
hdf5-eba0ff43c968ef9a0b09edf19c1e337cfcae0816.tar.bz2
Remove 'clear' callback from metadata cache client interface, using the
new 'entry cleaned' notify action innstead.
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_cache.c73
1 files changed, 12 insertions, 61 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 8312512..b855f5d 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -139,7 +139,8 @@ int total_writes = 0;
* happen to overlap some collective operation.
*
* cleared: Boolean flag that is set to true whenever the entry is
- * dirty, and is cleared via a call to datum_clear().
+ * dirty, and is cleared via a call to datum_notify with the
+ * "entry cleaned" action.
*
* flushed: Boolean flag that is set to true whenever the entry is
* dirty, and is flushed by the metadata cache.
@@ -409,8 +410,6 @@ static herr_t datum_notify(H5C_notify_action_t action, void *thing);
static herr_t datum_free_icr(void * thing);
-static herr_t datum_clear(H5F_t * f, void * thing, hbool_t about_to_destroy);
-
#define DATUM_ENTRY_TYPE H5AC_TEST_ID
#define NUMBER_OF_ENTRY_TYPES 1
@@ -444,7 +443,6 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] =
/* serialize */ datum_serialize,
/* notify */ datum_notify,
/* free_icr */ datum_free_icr,
- /* clear */ datum_clear,
/* fsf_size */ NULL,
}
};
@@ -2893,7 +2891,16 @@ datum_notify(H5C_notify_action_t action, void *thing)
fflush(stdout);
}
- /* do nothing */
+ entry_ptr->cleared = TRUE;
+ entry_ptr->dirty = FALSE;
+
+ datum_clears++;
+
+ if(entry_ptr->header.is_pinned) {
+ datum_pinned_clears++;
+ HDassert( entry_ptr->global_pinned || entry_ptr->local_pinned );
+ } /* end if */
+
break;
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
@@ -2991,62 +2998,6 @@ datum_free_icr(void * thing)
} /* datum_free_icr() */
-/*-------------------------------------------------------------------------
- * Function: datum_clear
- *
- * Purpose: Mark the datum as clean.
- *
- * Do not write it to the server, or increment the version.
- *
- * Return: SUCCEED
- *
- * Programmer: John Mainzer
- * 12/29/05
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-datum_clear(H5F_t H5_ATTR_UNUSED * f,
- void * thing,
- hbool_t H5_ATTR_UNUSED about_to_destroy)
-{
- int idx;
- struct datum * entry_ptr;
-
- HDassert( thing );
-
- entry_ptr = (struct datum *)thing;
-
- idx = addr_to_datum_index(entry_ptr->base_addr);
-
- HDassert( idx >= 0 );
- HDassert( idx < NUM_DATA_ENTRIES );
- HDassert( idx < virt_num_data_entries );
- HDassert( &(data[idx]) == entry_ptr );
-
- HDassert( entry_ptr->header.addr == entry_ptr->base_addr );
- HDassert( ( entry_ptr->header.size == entry_ptr->len ) ||
- ( entry_ptr->header.size == entry_ptr->local_len ) );
-
- HDassert( ( entry_ptr->dirty ) ||
- ( entry_ptr->header.is_dirty == entry_ptr->dirty ) );
-
- entry_ptr->cleared = TRUE;
- entry_ptr->dirty = FALSE;
-
- datum_clears++;
-
- if ( entry_ptr->header.is_pinned ) {
-
- datum_pinned_clears++;
- HDassert( entry_ptr->global_pinned || entry_ptr->local_pinned );
- }
-
- return(SUCCEED);
-
-} /* datum_clear() */
-
-
/*****************************************************************************/
/************************** test utility functions ***************************/
/*****************************************************************************/