mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
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.
This commit is contained in:
parent
d183e9a1a2
commit
d4591ff54d
@ -164,6 +164,10 @@ typedef H5C_notify_action_t H5AC_notify_action_t;
|
||||
#define H5AC_NOTIFY_ACTION_AFTER_LOAD H5C_NOTIFY_ACTION_AFTER_LOAD
|
||||
#define H5AC_NOTIFY_ACTION_AFTER_FLUSH H5C_NOTIFY_ACTION_AFTER_FLUSH
|
||||
#define H5AC_NOTIFY_ACTION_BEFORE_EVICT H5C_NOTIFY_ACTION_BEFORE_EVICT
|
||||
#define H5AC_NOTIFY_ACTION_ENTRY_DIRTIED H5C_NOTIFY_ACTION_ENTRY_DIRTIED
|
||||
#define H5AC_NOTIFY_ACTION_ENTRY_CLEANED H5C_NOTIFY_ACTION_ENTRY_CLEANED
|
||||
#define H5AC_NOTIFY_ACTION_CHILD_DIRTIED H5C_NOTIFY_ACTION_CHILD_DIRTIED
|
||||
#define H5AC_NOTIFY_ACTION_CHILD_CLEANED H5C_NOTIFY_ACTION_CHILD_CLEANED
|
||||
|
||||
#define H5AC__CLASS_NO_FLAGS_SET H5C__CLASS_NO_FLAGS_SET
|
||||
#define H5AC__CLASS_SPECULATIVE_LOAD_FLAG H5C__CLASS_SPECULATIVE_LOAD_FLAG
|
||||
|
81
src/H5C.c
81
src/H5C.c
@ -1535,6 +1535,13 @@ H5C_mark_entry_dirty(void *thing)
|
||||
|
||||
/* Check for entry changing status and do notifications, etc. */
|
||||
if(was_clean) {
|
||||
/* If the entry's type has a 'notify' callback send a 'entry dirtied'
|
||||
* notice now that the entry is fully integrated into the cache.
|
||||
*/
|
||||
if(entry_ptr->type->notify &&
|
||||
(entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag set")
|
||||
|
||||
/* Propagate the dirty flag up the flush dependency chain if appropriate */
|
||||
if(entry_ptr->flush_dep_nparents > 0)
|
||||
if(H5C__mark_flush_dep_dirty(entry_ptr) < 0)
|
||||
@ -1660,6 +1667,13 @@ H5C_move_entry(H5C_t * cache_ptr,
|
||||
|
||||
/* Check for entry changing status and do notifications, etc. */
|
||||
if(!was_dirty) {
|
||||
/* If the entry's type has a 'notify' callback send a 'entry dirtied'
|
||||
* notice now that the entry is fully integrated into the cache.
|
||||
*/
|
||||
if(entry_ptr->type->notify &&
|
||||
(entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag set")
|
||||
|
||||
/* Propagate the dirty flag up the flush dependency chain if appropriate */
|
||||
if(entry_ptr->flush_dep_nparents > 0)
|
||||
if(H5C__mark_flush_dep_dirty(entry_ptr) < 0)
|
||||
@ -1801,6 +1815,13 @@ H5C_resize_entry(void *thing, size_t new_size)
|
||||
|
||||
/* Check for entry changing status and do notifications, etc. */
|
||||
if(was_clean) {
|
||||
/* If the entry's type has a 'notify' callback send a 'entry dirtied'
|
||||
* notice now that the entry is fully integrated into the cache.
|
||||
*/
|
||||
if(entry_ptr->type->notify &&
|
||||
(entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag set")
|
||||
|
||||
/* Propagate the dirty flag up the flush dependency chain if appropriate */
|
||||
if(entry_ptr->flush_dep_nparents > 0)
|
||||
if(H5C__mark_flush_dep_dirty(entry_ptr) < 0)
|
||||
@ -3026,6 +3047,13 @@ H5C_unprotect(H5F_t * f,
|
||||
/* Update index for newly dirtied entry */
|
||||
H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr)
|
||||
|
||||
/* If the entry's type has a 'notify' callback send a 'entry dirtied'
|
||||
* notice now that the entry is fully integrated into the cache.
|
||||
*/
|
||||
if(entry_ptr->type->notify &&
|
||||
(entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_DIRTIED, entry_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag set")
|
||||
|
||||
/* Propagate the flush dep dirty flag up the flush dependency chain
|
||||
* if appropriate */
|
||||
if(entry_ptr->flush_dep_nparents > 0)
|
||||
@ -3034,6 +3062,13 @@ H5C_unprotect(H5F_t * f,
|
||||
} /* end if */
|
||||
/* Check for newly clean entry */
|
||||
else if(!was_clean && !entry_ptr->is_dirty) {
|
||||
/* If the entry's type has a 'notify' callback send a 'entry cleaned'
|
||||
* notice now that the entry is fully integrated into the cache.
|
||||
*/
|
||||
if(entry_ptr->type->notify &&
|
||||
(entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag cleared")
|
||||
|
||||
/* Propagate the flush dep clean flag up the flush dependency chain
|
||||
* if appropriate */
|
||||
if(entry_ptr->flush_dep_nparents > 0)
|
||||
@ -3464,6 +3499,11 @@ H5C_create_flush_dependency(void * parent_thing, void * child_thing)
|
||||
HDassert(parent_entry->flush_dep_ndirty_children < parent_entry->flush_dep_nchildren);
|
||||
|
||||
parent_entry->flush_dep_ndirty_children++;
|
||||
|
||||
/* If the parent has a 'notify' callback, send a 'child entry dirtied' notice */
|
||||
if(parent_entry->type->notify &&
|
||||
(parent_entry->type->notify)(H5C_NOTIFY_ACTION_CHILD_DIRTIED, parent_entry) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify parent about child entry dirty flag set")
|
||||
} /* end if */
|
||||
|
||||
/* Post-conditions, for successful operation */
|
||||
@ -3570,6 +3610,11 @@ H5C_destroy_flush_dependency(void *parent_thing, void * child_thing)
|
||||
HDassert(parent_entry->flush_dep_ndirty_children > 0);
|
||||
|
||||
parent_entry->flush_dep_ndirty_children--;
|
||||
|
||||
/* If the parent has a 'notify' callback, send a 'child entry cleaned' notice */
|
||||
if(parent_entry->type->notify &&
|
||||
(parent_entry->type->notify)(H5C_NOTIFY_ACTION_CHILD_CLEANED, parent_entry) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify parent about child entry dirty flag reset")
|
||||
} /* end if */
|
||||
|
||||
/* Shrink or free the parent array if apporpriate */
|
||||
@ -5991,6 +6036,13 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
|
||||
|
||||
/* Check for entry changing status and do notifications, etc. */
|
||||
if(was_dirty) {
|
||||
/* If the entry's type has a 'notify' callback send a 'entry cleaned'
|
||||
* notice now that the entry is fully integrated into the cache.
|
||||
*/
|
||||
if(entry_ptr->type->notify &&
|
||||
(entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag cleared")
|
||||
|
||||
/* Propagate the clean flag up the flush dependency chain if appropriate */
|
||||
HDassert(entry_ptr->flush_dep_ndirty_children == 0);
|
||||
if(entry_ptr->flush_dep_nparents > 0)
|
||||
@ -6100,6 +6152,13 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
|
||||
|
||||
if(entry_ptr->type->clear && (entry_ptr->type->clear)(f, (void *)entry_ptr, TRUE) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to clear entry")
|
||||
|
||||
/* If the entry's type has a 'notify' callback send a 'entry cleaned'
|
||||
* notice now that the entry is fully integrated into the cache.
|
||||
*/
|
||||
if(entry_ptr->type->notify &&
|
||||
(entry_ptr->type->notify)(H5C_NOTIFY_ACTION_ENTRY_CLEANED, entry_ptr) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify client about entry dirty flag cleared")
|
||||
} /* end if */
|
||||
|
||||
/* we are about to discard the in core representation --
|
||||
@ -7521,8 +7580,9 @@ static herr_t
|
||||
H5C__mark_flush_dep_dirty(H5C_cache_entry_t * entry)
|
||||
{
|
||||
unsigned u; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(entry);
|
||||
@ -7534,9 +7594,15 @@ H5C__mark_flush_dep_dirty(H5C_cache_entry_t * entry)
|
||||
|
||||
/* Adjust the parent's number of dirty children */
|
||||
entry->flush_dep_parent[u]->flush_dep_ndirty_children++;
|
||||
|
||||
/* If the parent has a 'notify' callback, send a 'child entry dirtied' notice */
|
||||
if(entry->flush_dep_parent[u]->type->notify &&
|
||||
(entry->flush_dep_parent[u]->type->notify)(H5C_NOTIFY_ACTION_CHILD_DIRTIED, entry->flush_dep_parent[u]) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify parent about child entry dirty flag set")
|
||||
} /* end for */
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5C__mark_flush_dep_dirty() */
|
||||
|
||||
|
||||
@ -7559,8 +7625,9 @@ static herr_t
|
||||
H5C__mark_flush_dep_clean(H5C_cache_entry_t * entry)
|
||||
{
|
||||
unsigned u; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(entry);
|
||||
@ -7572,9 +7639,15 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t * entry)
|
||||
|
||||
/* Adjust the parent's number of dirty children */
|
||||
entry->flush_dep_parent[u]->flush_dep_ndirty_children--;
|
||||
|
||||
/* If the parent has a 'notify' callback, send a 'child entry cleaned' notice */
|
||||
if(entry->flush_dep_parent[u]->type->notify &&
|
||||
(entry->flush_dep_parent[u]->type->notify)(H5C_NOTIFY_ACTION_CHILD_CLEANED, entry->flush_dep_parent[u]) < 0)
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "can't notify parent about child entry dirty flag reset")
|
||||
} /* end for */
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5C__mark_flush_dep_clean() */
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
@ -1058,9 +1058,13 @@ typedef enum H5C_notify_action_t {
|
||||
H5C_NOTIFY_ACTION_AFTER_FLUSH, /* Entry has just been flushed to
|
||||
* file.
|
||||
*/
|
||||
H5C_NOTIFY_ACTION_BEFORE_EVICT /* Entry is about to be evicted
|
||||
H5C_NOTIFY_ACTION_BEFORE_EVICT, /* Entry is about to be evicted
|
||||
* from cache.
|
||||
*/
|
||||
H5C_NOTIFY_ACTION_ENTRY_DIRTIED, /* Entry has been marked dirty. */
|
||||
H5C_NOTIFY_ACTION_ENTRY_CLEANED, /* Entry has been marked clean. */
|
||||
H5C_NOTIFY_ACTION_CHILD_DIRTIED, /* Dependent child has been marked dirty. */
|
||||
H5C_NOTIFY_ACTION_CHILD_CLEANED /* Dependent child has been marked clean. */
|
||||
} H5C_notify_action_t;
|
||||
|
||||
/* Cache client callback function pointers */
|
||||
|
@ -824,9 +824,13 @@ H5EA__cache_iblock_notify(H5AC_notify_action_t action, void *_thing))
|
||||
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between index block and header, address = %llu", (unsigned long long)iblock->addr)
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
/* do nothing */
|
||||
break;
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
|
||||
/* Destroy flush dependency on extensible array header */
|
||||
@ -1178,14 +1182,14 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing))
|
||||
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between super block and index block, address = %llu", (unsigned long long)sblock->addr)
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
/* Destroy flush dependency on extensible array header, if set */
|
||||
if(sblock->has_hdr_depend) {
|
||||
if(H5EA__destroy_flush_depend((H5AC_info_t *)sblock->hdr, (H5AC_info_t *)sblock) < 0)
|
||||
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between super block and header, address = %llu", (unsigned long long)sblock->addr)
|
||||
sblock->has_hdr_depend = FALSE;
|
||||
} /* end if */
|
||||
break;
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
|
||||
/* Destroy flush dependency on index block */
|
||||
@ -1200,6 +1204,13 @@ H5EA__cache_sblock_notify(H5AC_notify_action_t action, void *_thing))
|
||||
} /* end if */
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
default:
|
||||
H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache")
|
||||
} /* end switch */
|
||||
@ -1545,14 +1556,14 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing))
|
||||
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between data block and parent, address = %llu", (unsigned long long)dblock->addr)
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
/* Destroy flush dependency on extensible array header, if set */
|
||||
if(dblock->has_hdr_depend) {
|
||||
if(H5EA__destroy_flush_depend((H5AC_info_t *)dblock->hdr, (H5AC_info_t *)dblock) < 0)
|
||||
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between direct block and header, address = %llu", (unsigned long long)dblock->addr)
|
||||
dblock->has_hdr_depend = FALSE;
|
||||
} /* end if */
|
||||
break;
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
|
||||
/* Destroy flush dependency on parent */
|
||||
@ -1562,11 +1573,18 @@ H5EA__cache_dblock_notify(H5AC_notify_action_t action, void *_thing))
|
||||
/* Destroy flush dependency on extensible array header, if set */
|
||||
if(dblock->has_hdr_depend) {
|
||||
if(H5EA__destroy_flush_depend((H5AC_info_t *)dblock->hdr, (H5AC_info_t *)dblock) < 0)
|
||||
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between direct block and header, address = %llu", (unsigned long long)dblock->addr)
|
||||
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between data block and header, address = %llu", (unsigned long long)dblock->addr)
|
||||
dblock->has_hdr_depend = FALSE;
|
||||
} /* end if */
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
default:
|
||||
H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache")
|
||||
} /* end switch */
|
||||
@ -1879,14 +1897,14 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing))
|
||||
H5E_THROW(H5E_CANTDEPEND, "unable to create flush dependency between data block page and parent, address = %llu", (unsigned long long)dblk_page->addr)
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
/* Destroy flush dependency on extensible array header, if set */
|
||||
if(dblk_page->has_hdr_depend) {
|
||||
if(H5EA__destroy_flush_depend((H5AC_info_t *)dblk_page->hdr, (H5AC_info_t *)dblk_page) < 0)
|
||||
H5E_THROW(H5E_CANTUNDEPEND, "unable to destroy flush dependency between data block page and header, address = %llu", (unsigned long long)dblk_page->addr)
|
||||
dblk_page->has_hdr_depend = FALSE;
|
||||
} /* end if */
|
||||
break;
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_BEFORE_EVICT:
|
||||
/* Destroy flush dependency on parent */
|
||||
@ -1901,6 +1919,13 @@ H5EA__cache_dblk_page_notify(H5AC_notify_action_t action, void *_thing))
|
||||
} /* end if */
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
default:
|
||||
H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache")
|
||||
} /* end switch */
|
||||
|
@ -1379,19 +1379,9 @@ H5HF__cache_iblock_notify(H5C_notify_action_t action, void *_thing)
|
||||
|
||||
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);
|
||||
|
||||
/* further sanity checks */
|
||||
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));
|
||||
|
||||
/* 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. */
|
||||
@ -1433,6 +1423,10 @@ H5HF__cache_iblock_notify(H5C_notify_action_t action, void *_thing)
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
@ -1633,11 +1627,11 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata,
|
||||
|
||||
/* Check for I/O filters on this heap */
|
||||
if(hdr->filter_len > 0) {
|
||||
H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
|
||||
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 */
|
||||
H5Z_cb_t filter_cb = {NULL, NULL}; /* Filter callback structure */
|
||||
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 */
|
||||
|
||||
/* Check for root direct block */
|
||||
if(par_info->iblock == NULL)
|
||||
@ -2394,6 +2388,10 @@ H5HF__cache_dblock_notify(H5C_notify_action_t action, void *_thing)
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
|
||||
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
|
@ -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 ) {
|
||||
|
@ -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.
|
||||
|
@ -2608,8 +2608,13 @@ datum_notify(H5C_notify_action_t action, void *thing)
|
||||
}
|
||||
|
||||
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 ) );
|
||||
/* Skip this check when the entry is being dirtied, since the resize
|
||||
* operation sends the message before the len/local_len is updated
|
||||
* (after the resize operation completes successfully) (QAK - 2016/10/19)
|
||||
*/
|
||||
if(H5AC_NOTIFY_ACTION_ENTRY_DIRTIED != action)
|
||||
HDassert( ( entry_ptr->header.size == entry_ptr->len ) ||
|
||||
( entry_ptr->header.size == entry_ptr->local_len ) );
|
||||
|
||||
switch ( action )
|
||||
{
|
||||
@ -2870,6 +2875,54 @@ datum_notify(H5C_notify_action_t action, void *thing)
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED:
|
||||
if ( callbacks_verbose ) {
|
||||
|
||||
HDfprintf(stdout,
|
||||
"%d: notify() action = entry dirty, idx = %d, addr = %ld.\n",
|
||||
world_mpi_rank, idx, (long)entry_ptr->header.addr);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_ENTRY_CLEANED:
|
||||
if ( callbacks_verbose ) {
|
||||
|
||||
HDfprintf(stdout,
|
||||
"%d: notify() action = entry clean, idx = %d, addr = %ld.\n",
|
||||
world_mpi_rank, idx, (long)entry_ptr->header.addr);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_CHILD_DIRTIED:
|
||||
if ( callbacks_verbose ) {
|
||||
|
||||
HDfprintf(stdout,
|
||||
"%d: notify() action = child entry dirty, idx = %d, addr = %ld.\n",
|
||||
world_mpi_rank, idx, (long)entry_ptr->header.addr);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
case H5AC_NOTIFY_ACTION_CHILD_CLEANED:
|
||||
if ( callbacks_verbose ) {
|
||||
|
||||
HDfprintf(stdout,
|
||||
"%d: notify() action = child entry clean, idx = %d, addr = %ld.\n",
|
||||
world_mpi_rank, idx, (long)entry_ptr->header.addr);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
/* do nothing */
|
||||
break;
|
||||
|
||||
default:
|
||||
nerrors++;
|
||||
ret_value = FAIL;
|
||||
|
Loading…
Reference in New Issue
Block a user