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/dmu_objset.h
          +++ new/usr/src/uts/common/fs/zfs/sys/dmu_objset.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  /* Portions Copyright 2010 Robert Milkowski */
  28   29  
  29   30  #ifndef _SYS_DMU_OBJSET_H
  30   31  #define _SYS_DMU_OBJSET_H
  31   32  
  32   33  #include <sys/spa.h>
  33   34  #include <sys/arc.h>
  34   35  #include <sys/txg.h>
↓ open down ↓ 32 lines elided ↑ open up ↑
  67   68          dnode_phys_t os_groupused_dnode;
  68   69  } objset_phys_t;
  69   70  
  70   71  struct objset {
  71   72          /* Immutable: */
  72   73          struct dsl_dataset *os_dsl_dataset;
  73   74          spa_t *os_spa;
  74   75          arc_buf_t *os_phys_buf;
  75   76          objset_phys_t *os_phys;
  76   77          /*
  77      -         * The following "special" dnodes have no parent and are exempt from
  78      -         * dnode_move(), but they root their descendents in this objset using
  79      -         * handles anyway, so that all access to dnodes from dbufs consistently
  80      -         * uses handles.
       78 +         * The following "special" dnodes have no parent, are exempt
       79 +         * from dnode_move(), and are not recorded in os_dnodes, but they
       80 +         * root their descendents in this objset using handles anyway, so
       81 +         * that all access to dnodes from dbufs consistently uses handles.
  81   82           */
  82   83          dnode_handle_t os_meta_dnode;
  83   84          dnode_handle_t os_userused_dnode;
  84   85          dnode_handle_t os_groupused_dnode;
  85   86          zilog_t *os_zil;
  86   87  
       88 +        list_node_t os_evicting_node;
       89 +
  87   90          /* can change, under dsl_dir's locks: */
  88   91          enum zio_checksum os_checksum;
  89   92          enum zio_compress os_compress;
  90   93          uint8_t os_copies;
  91   94          enum zio_checksum os_dedup_checksum;
  92   95          boolean_t os_dedup_verify;
       96 +        boolean_t os_evicting;
  93   97          zfs_logbias_op_t os_logbias;
  94   98          zfs_cache_type_t os_primary_cache;
  95   99          zfs_cache_type_t os_secondary_cache;
  96  100          zfs_sync_type_t os_sync;
  97  101          zfs_redundant_metadata_type_t os_redundant_metadata;
  98  102          int os_recordsize;
  99  103  
 100  104          /* no lock needed: */
 101  105          struct dmu_tx *os_synctx; /* XXX sketchy */
 102  106          blkptr_t *os_rootbp;
↓ open down ↓ 60 lines elided ↑ open up ↑
 163  167  int dmu_objset_open_impl(spa_t *spa, struct dsl_dataset *ds, blkptr_t *bp,
 164  168      objset_t **osp);
 165  169  void dmu_objset_evict(objset_t *os);
 166  170  void dmu_objset_do_userquota_updates(objset_t *os, dmu_tx_t *tx);
 167  171  void dmu_objset_userquota_get_ids(dnode_t *dn, boolean_t before, dmu_tx_t *tx);
 168  172  boolean_t dmu_objset_userused_enabled(objset_t *os);
 169  173  int dmu_objset_userspace_upgrade(objset_t *os);
 170  174  boolean_t dmu_objset_userspace_present(objset_t *os);
 171  175  int dmu_fsname(const char *snapname, char *buf);
 172  176  
      177 +void dmu_objset_evict_done(objset_t *os);
      178 +
 173  179  void dmu_objset_init(void);
 174  180  void dmu_objset_fini(void);
 175  181  
 176  182  #ifdef  __cplusplus
 177  183  }
 178  184  #endif
 179  185  
 180  186  #endif /* _SYS_DMU_OBJSET_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX