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/zap_leaf.h
          +++ new/usr/src/uts/common/fs/zfs/sys/zap_leaf.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  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 + * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  23   24   */
  24   25  
  25   26  #ifndef _SYS_ZAP_LEAF_H
  26   27  #define _SYS_ZAP_LEAF_H
  27   28  
  28   29  #include <sys/zap.h>
  29   30  
  30   31  #ifdef  __cplusplus
  31   32  extern "C" {
  32   33  #endif
↓ open down ↓ 112 lines elided ↑ open up ↑
 145  146                  uint16_t la_next;               /* next blk or CHAIN_END */
 146  147          } l_array;
 147  148          struct zap_leaf_free {
 148  149                  uint8_t lf_type;                /* always ZAP_CHUNK_FREE */
 149  150                  uint8_t lf_pad[ZAP_LEAF_ARRAY_BYTES];
 150  151                  uint16_t lf_next;       /* next in free list, or CHAIN_END */
 151  152          } l_free;
 152  153  } zap_leaf_chunk_t;
 153  154  
 154  155  typedef struct zap_leaf {
      156 +        dmu_buf_user_t l_dbu;
 155  157          krwlock_t l_rwlock;
 156  158          uint64_t l_blkid;               /* 1<<ZAP_BLOCK_SHIFT byte block off */
 157  159          int l_bs;                       /* block size shift */
 158  160          dmu_buf_t *l_dbuf;
 159  161  } zap_leaf_t;
 160  162  
 161  163  inline zap_leaf_phys_t *
 162  164  zap_leaf_phys(zap_leaf_t *l)
 163  165  {
 164  166          return (l->l_dbuf->db_data);
↓ open down ↓ 82 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX