Print this page
6267 dn_bonus evicted too early
Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Xin LI <delphij@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/dbuf.h
          +++ new/usr/src/uts/common/fs/zfs/sys/dbuf.h
↓ open down ↓ 225 lines elided ↑ open up ↑
 226  226           * Our link on the owner dnodes's dn_dbufs list.
 227  227           * Protected by its dn_dbufs_mtx.
 228  228           */
 229  229          avl_node_t db_link;
 230  230  
 231  231          /* Data which is unique to data (leaf) blocks: */
 232  232  
 233  233          /* User callback information. */
 234  234          dmu_buf_user_t *db_user;
 235  235  
 236      -        uint8_t db_immediate_evict;
      236 +        /*
      237 +         * Evict user data as soon as the dirty and reference
      238 +         * counts are equal.
      239 +         */
      240 +        uint8_t db_user_immediate_evict;
      241 +
      242 +        /*
      243 +         * This block was freed while a read or write was
      244 +         * active.
      245 +         */
 237  246          uint8_t db_freed_in_flight;
 238  247  
      248 +        /*
      249 +         * dnode_evict_dbufs() or dnode_evict_bonus() tried to
      250 +         * evict this dbuf, but couldn't due to outstanding
      251 +         * references.  Evict once the refcount drops to 0.
      252 +         */
      253 +        uint8_t db_pending_evict;
      254 +
 239  255          uint8_t db_dirtycnt;
 240  256  } dmu_buf_impl_t;
 241  257  
 242  258  /* Note: the dbuf hash table is exposed only for the mdb module */
 243  259  #define DBUF_MUTEXES 256
 244  260  #define DBUF_HASH_MUTEX(h, idx) (&(h)->hash_mutexes[(idx) & (DBUF_MUTEXES-1)])
 245  261  typedef struct dbuf_hash_table {
 246  262          uint64_t hash_table_mask;
 247  263          dmu_buf_impl_t **hash_table;
 248  264          kmutex_t hash_mutexes[DBUF_MUTEXES];
↓ open down ↓ 131 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX