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/dsl_pool.c
          +++ new/usr/src/uts/common/fs/zfs/dsl_pool.c
↓ 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) 2011, 2014 by Delphix. All rights reserved.
  24   24   * Copyright (c) 2013 Steven Hartland. All rights reserved.
       25 + * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  25   26   */
  26   27  
  27   28  #include <sys/dsl_pool.h>
  28   29  #include <sys/dsl_dataset.h>
  29   30  #include <sys/dsl_prop.h>
  30   31  #include <sys/dsl_dir.h>
  31   32  #include <sys/dsl_synctask.h>
  32   33  #include <sys/dsl_scan.h>
  33   34  #include <sys/dnode.h>
  34   35  #include <sys/dmu_tx.h>
↓ open down ↓ 275 lines elided ↑ open up ↑
 310  311                  dmu_objset_evict(dp->dp_meta_objset);
 311  312  
 312  313          txg_list_destroy(&dp->dp_dirty_datasets);
 313  314          txg_list_destroy(&dp->dp_dirty_zilogs);
 314  315          txg_list_destroy(&dp->dp_sync_tasks);
 315  316          txg_list_destroy(&dp->dp_dirty_dirs);
 316  317  
 317  318          arc_flush(dp->dp_spa);
 318  319          txg_fini(dp);
 319  320          dsl_scan_fini(dp);
      321 +        dmu_buf_user_evict_wait();
      322 +
 320  323          rrw_destroy(&dp->dp_config_rwlock);
 321  324          mutex_destroy(&dp->dp_lock);
 322  325          taskq_destroy(dp->dp_vnrele_taskq);
 323  326          if (dp->dp_blkstats)
 324  327                  kmem_free(dp->dp_blkstats, sizeof (zfs_all_blkstats_t));
 325  328          kmem_free(dp, sizeof (dsl_pool_t));
 326  329  }
 327  330  
 328  331  dsl_pool_t *
 329  332  dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64_t txg)
↓ open down ↓ 719 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX