Print this page
zpool import speedup

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zil.c
          +++ new/usr/src/uts/common/fs/zfs/zil.c
↓ open down ↓ 625 lines elided ↑ open up ↑
 626  626  int
 627  627  zil_claim(const char *osname, void *txarg)
 628  628  {
 629  629          dmu_tx_t *tx = txarg;
 630  630          uint64_t first_txg = dmu_tx_get_txg(tx);
 631  631          zilog_t *zilog;
 632  632          zil_header_t *zh;
 633  633          objset_t *os;
 634  634          int error;
 635  635  
 636      -        error = dmu_objset_own(osname, DMU_OST_ANY, B_FALSE, FTAG, &os);
      636 +        error = dmu_objset_own_nolock(osname, DMU_OST_ANY, B_FALSE, FTAG, &os);
 637  637          if (error != 0) {
 638  638                  cmn_err(CE_WARN, "can't open objset for %s", osname);
 639  639                  return (0);
 640  640          }
 641  641  
 642  642          zilog = dmu_objset_zil(os);
 643  643          zh = zil_header_in_syncing_context(zilog);
 644  644  
 645  645          if (spa_get_log_state(zilog->zl_spa) == SPA_LOG_CLEAR) {
 646  646                  if (!BP_IS_HOLE(&zh->zh_log))
↓ open down ↓ 37 lines elided ↑ open up ↑
 684  684  int
 685  685  zil_check_log_chain(const char *osname, void *tx)
 686  686  {
 687  687          zilog_t *zilog;
 688  688          objset_t *os;
 689  689          blkptr_t *bp;
 690  690          int error;
 691  691  
 692  692          ASSERT(tx == NULL);
 693  693  
 694      -        error = dmu_objset_hold(osname, FTAG, &os);
      694 +        error = dmu_objset_hold_nolock(osname, FTAG, &os);
 695  695          if (error != 0) {
 696  696                  cmn_err(CE_WARN, "can't open objset for %s", osname);
 697  697                  return (0);
 698  698          }
 699  699  
 700  700          zilog = dmu_objset_zil(os);
 701  701          bp = (blkptr_t *)&zilog->zl_header->zh_log;
 702  702  
 703  703          /*
 704  704           * Check the first block and determine if it's on a log device
↓ open down ↓ 1419 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX