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/dmu_traverse.c
          +++ new/usr/src/uts/common/fs/zfs/dmu_traverse.c
↓ open down ↓ 524 lines elided ↑ open up ↑
 525  525          } else {
 526  526                  td.td_hole_birth_enabled_txg = 0;
 527  527          }
 528  528  
 529  529          pd.pd_blks_max = zfs_pd_blks_max;
 530  530          pd.pd_flags = flags;
 531  531          mutex_init(&pd.pd_mtx, NULL, MUTEX_DEFAULT, NULL);
 532  532          cv_init(&pd.pd_cv, NULL, CV_DEFAULT, NULL);
 533  533  
 534  534          /* See comment on ZIL traversal in dsl_scan_visitds. */
 535      -        if (ds != NULL && !dsl_dataset_is_snapshot(ds) && !BP_IS_HOLE(rootbp)) {
      535 +        if (ds != NULL && !ds->ds_is_snapshot && !BP_IS_HOLE(rootbp)) {
 536  536                  arc_flags_t flags = ARC_FLAG_WAIT;
 537  537                  objset_phys_t *osp;
 538  538                  arc_buf_t *buf;
 539  539  
 540  540                  err = arc_read(NULL, td.td_spa, rootbp,
 541  541                      arc_getbuf_func, &buf,
 542  542                      ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, NULL);
 543  543                  if (err != 0)
 544  544                          return (err);
 545  545  
↓ open down ↓ 103 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX