Print this page
5056 ZFS deadlock on db_mtx and dn_holds
Reviewed by: Will Andrews <willa@spectralogic.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

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 ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  24   24   * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
       25 + * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  25   26   */
  26   27  
  27   28  #ifndef _SYS_DBUF_H
  28   29  #define _SYS_DBUF_H
  29   30  
  30   31  #include <sys/dmu.h>
  31   32  #include <sys/spa.h>
  32   33  #include <sys/txg.h>
  33   34  #include <sys/zio.h>
  34   35  #include <sys/arc.h>
↓ open down ↓ 184 lines elided ↑ open up ↑
 219  220          dbuf_dirty_record_t *db_last_dirty;
 220  221  
 221  222          /*
 222  223           * Our link on the owner dnodes's dn_dbufs list.
 223  224           * Protected by its dn_dbufs_mtx.
 224  225           */
 225  226          avl_node_t db_link;
 226  227  
 227  228          /* Data which is unique to data (leaf) blocks: */
 228  229  
 229      -        /* stuff we store for the user (see dmu_buf_set_user) */
 230      -        void *db_user_ptr;
 231      -        dmu_buf_evict_func_t *db_evict_func;
      230 +        /* User callback information. */
      231 +        dmu_buf_user_t *db_user;
 232  232  
 233  233          uint8_t db_immediate_evict;
 234  234          uint8_t db_freed_in_flight;
 235  235  
 236  236          uint8_t db_dirtycnt;
 237  237  } dmu_buf_impl_t;
 238  238  
 239  239  /* Note: the dbuf hash table is exposed only for the mdb module */
 240  240  #define DBUF_MUTEXES 256
 241  241  #define DBUF_HASH_MUTEX(h, idx) (&(h)->hash_mutexes[(idx) & (DBUF_MUTEXES-1)])
↓ open down ↓ 132 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX