Print this page
patch first-pass
*** 56,66 ****
static boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
static void dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx);
#ifndef __lint
extern inline void dmu_buf_init_user(dmu_buf_user_t *dbu,
! dmu_buf_evict_func_t *evict_func, dmu_buf_t **clear_on_evict_dbufp);
#endif /* ! __lint */
/*
* Global data structures and functions for the dbuf cache.
*/
--- 56,67 ----
static boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
static void dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx);
#ifndef __lint
extern inline void dmu_buf_init_user(dmu_buf_user_t *dbu,
! dmu_buf_evict_func_t *evict_func_prep, dmu_buf_evict_func_t *evict_func,
! dmu_buf_t **clear_on_evict_dbufp);
#endif /* ! __lint */
/*
* Global data structures and functions for the dbuf cache.
*/
*** 297,306 ****
--- 298,310 ----
#ifdef ZFS_DEBUG
if (dbu->dbu_clear_on_evict_dbufp != NULL)
*dbu->dbu_clear_on_evict_dbufp = NULL;
#endif
+ if (dbu->dbu_evict_func_prep != NULL)
+ dbu->dbu_evict_func_prep(dbu);
+
/*
* Invoke the callback from a taskq to avoid lock order reversals
* and limit stack depth.
*/
taskq_dispatch_ent(dbu_evict_taskq, dbu->dbu_evict_func, dbu, 0,