diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-11-12 22:01:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-11-12 22:01:30 (GMT) |
commit | d4591ff54d9319346f49a3bc67431f0fa26a8d65 (patch) | |
tree | c73146c1bd6bdd942c462b4cf09e02768b687a78 /test | |
parent | d183e9a1a2eadf768996f5cc41d67aa2685a2363 (diff) | |
download | hdf5-d4591ff54d9319346f49a3bc67431f0fa26a8d65.zip hdf5-d4591ff54d9319346f49a3bc67431f0fa26a8d65.tar.gz hdf5-d4591ff54d9319346f49a3bc67431f0fa26a8d65.tar.bz2 |
Bring over new 'notify' metadata cache client callback actions for when an
entry is cleaned / dirtied or its [flush dependency] child entry is cleaned /
dirtied.
Diffstat (limited to 'test')
-rw-r--r-- | test/cache_common.c | 9 | ||||
-rw-r--r-- | test/cache_common.h | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/test/cache_common.c b/test/cache_common.c index 945442a..94034eb 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -1461,7 +1461,8 @@ notify(H5C_notify_action_t action, void *thing, int32_t entry_type) HDassert(entry->type == entry_type); HDassert(entry == &(base_addr[entry->index])); HDassert(entry == entry->self); - HDassert(entry->header.addr == entry->addr); + if(!(action == H5C_NOTIFY_ACTION_ENTRY_DIRTIED && entry->action == TEST_ENTRY_ACTION_MOVE)) + HDassert(entry->header.addr == entry->addr); HDassert((entry->type == VARIABLE_ENTRY_TYPE) || \ (entry->size == entry_sizes[entry->type])); @@ -1473,6 +1474,10 @@ notify(H5C_notify_action_t action, void *thing, int32_t entry_type) break; case H5C_NOTIFY_ACTION_AFTER_FLUSH: + case H5C_NOTIFY_ACTION_ENTRY_DIRTIED: + case H5C_NOTIFY_ACTION_ENTRY_CLEANED: + case H5C_NOTIFY_ACTION_CHILD_DIRTIED: + case H5C_NOTIFY_ACTION_CHILD_CLEANED: /* do nothing */ break; @@ -3843,7 +3848,9 @@ move_entry(H5C_t * cache_ptr, if(entry_ptr->flush_dep_npar > 0 && !was_dirty) mark_flush_dep_dirty(entry_ptr); + entry_ptr->action = TEST_ENTRY_ACTION_MOVE; result = H5C_move_entry(cache_ptr, &(types[type]), old_addr, new_addr); + entry_ptr->action = TEST_ENTRY_ACTION_NUL; } if ( ! done ) { diff --git a/test/cache_common.h b/test/cache_common.h index 0e4966c..811c35e 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -211,6 +211,11 @@ typedef struct flush_op */ } flush_op; +typedef enum test_entry_action_t { + TEST_ENTRY_ACTION_NUL = 0, /* No action on entry */ + TEST_ENTRY_ACTION_MOVE /* Entry is beging moved */ +} test_entry_action_t; + typedef struct test_entry_t { H5C_cache_entry_t header; /* entry data used by the cache @@ -219,6 +224,7 @@ typedef struct test_entry_t struct test_entry_t * self; /* pointer to this entry -- used for * sanity checking. */ + test_entry_action_t action; /* Action being performed on a test entry */ H5F_t * file_ptr; /* pointer to the file in which the * entry resides, or NULL if the entry * is not in a file. |