Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
Show First 20 Lines • Show All 604 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Initialize the given dmu_buf_user_t instance with the eviction function | * Initialize the given dmu_buf_user_t instance with the eviction function | ||||
* evict_func, to be called when the user is evicted. | * evict_func, to be called when the user is evicted. | ||||
* | * | ||||
* NOTE: This function should only be called once on a given dmu_buf_user_t. | * NOTE: This function should only be called once on a given dmu_buf_user_t. | ||||
* To allow enforcement of this, dbu must already be zeroed on entry. | * To allow enforcement of this, dbu must already be zeroed on entry. | ||||
*/ | */ | ||||
/*ARGSUSED*/ | /*ARGSUSED*/ | ||||
inline void | static inline void | ||||
dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, | dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, | ||||
dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) | dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) | ||||
{ | { | ||||
ASSERT(dbu->dbu_evict_func_sync == NULL); | ASSERT(dbu->dbu_evict_func_sync == NULL); | ||||
ASSERT(dbu->dbu_evict_func_async == NULL); | ASSERT(dbu->dbu_evict_func_async == NULL); | ||||
/* must have at least one evict func */ | /* must have at least one evict func */ | ||||
IMPLY(evict_func_sync == NULL, evict_func_async != NULL); | IMPLY(evict_func_sync == NULL, evict_func_async != NULL); | ||||
▲ Show 20 Lines • Show All 407 Lines • Show Last 20 Lines |