Print this page
patch first-pass

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dbuf.c
          +++ new/usr/src/uts/common/fs/zfs/dbuf.c
↓ open down ↓ 50 lines elided ↑ open up ↑
  51   51   * a zfs receive.  A nonzero value indicates a potential performance problem.
  52   52   */
  53   53  uint64_t zfs_free_range_recv_miss;
  54   54  
  55   55  static void dbuf_destroy(dmu_buf_impl_t *db);
  56   56  static boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
  57   57  static void dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx);
  58   58  
  59   59  #ifndef __lint
  60   60  extern inline void dmu_buf_init_user(dmu_buf_user_t *dbu,
  61      -    dmu_buf_evict_func_t *evict_func, dmu_buf_t **clear_on_evict_dbufp);
       61 +    dmu_buf_evict_func_t *evict_func_prep, dmu_buf_evict_func_t *evict_func,
       62 +    dmu_buf_t **clear_on_evict_dbufp);
  62   63  #endif /* ! __lint */
  63   64  
  64   65  /*
  65   66   * Global data structures and functions for the dbuf cache.
  66   67   */
  67   68  static kmem_cache_t *dbuf_cache;
  68   69  static taskq_t *dbu_evict_taskq;
  69   70  
  70   71  /* ARGSUSED */
  71   72  static int
↓ open down ↓ 219 lines elided ↑ open up ↑
 291  292          if (dbu == NULL)
 292  293                  return;
 293  294  
 294  295          dbuf_verify_user(db, DBVU_EVICTING);
 295  296          db->db_user = NULL;
 296  297  
 297  298  #ifdef ZFS_DEBUG
 298  299          if (dbu->dbu_clear_on_evict_dbufp != NULL)
 299  300                  *dbu->dbu_clear_on_evict_dbufp = NULL;
 300  301  #endif
      302 +
      303 +        if (dbu->dbu_evict_func_prep != NULL)
      304 +                dbu->dbu_evict_func_prep(dbu);
 301  305  
 302  306          /*
 303  307           * Invoke the callback from a taskq to avoid lock order reversals
 304  308           * and limit stack depth.
 305  309           */
 306  310          taskq_dispatch_ent(dbu_evict_taskq, dbu->dbu_evict_func, dbu, 0,
 307  311              &dbu->dbu_tqent);
 308  312  }
 309  313  
 310  314  boolean_t
↓ open down ↓ 2902 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX