Print this page
3742 zfs comments need cleaner, more consistent style
Submitted by:   Will Andrews <willa@spectralogic.com>
Submitted by:   Alan Somers <alans@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>
Reviewed by:    George Wilson <george.wilson@delphix.com>
Reviewed by:    Eric Schrock <eric.schrock@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/txg.c
          +++ new/usr/src/uts/common/fs/zfs/txg.c
↓ open down ↓ 553 lines elided ↑ open up ↑
 554  554                  dprintf("quiesce done, handing off txg %llu\n", txg);
 555  555                  tx->tx_quiesced_txg = txg;
 556  556                  DTRACE_PROBE2(txg__quiesced, dsl_pool_t *, dp, uint64_t, txg);
 557  557                  cv_broadcast(&tx->tx_sync_more_cv);
 558  558                  cv_broadcast(&tx->tx_quiesce_done_cv);
 559  559          }
 560  560  }
 561  561  
 562  562  /*
 563  563   * Delay this thread by delay nanoseconds if we are still in the open
 564      - * transaction group and there is already a waiting txg quiesing or quiesced.
 565      - * Abort the delay if this txg stalls or enters the quiesing state.
      564 + * transaction group and there is already a waiting txg quiescing or quiesced.
      565 + * Abort the delay if this txg stalls or enters the quiescing state.
 566  566   */
 567  567  void
 568  568  txg_delay(dsl_pool_t *dp, uint64_t txg, hrtime_t delay, hrtime_t resolution)
 569  569  {
 570  570          tx_state_t *tx = &dp->dp_tx;
 571  571          hrtime_t start = gethrtime();
 572  572  
 573      -        /* don't delay if this txg could transition to quiesing immediately */
      573 +        /* don't delay if this txg could transition to quiescing immediately */
 574  574          if (tx->tx_open_txg > txg ||
 575  575              tx->tx_syncing_txg == txg-1 || tx->tx_synced_txg == txg-1)
 576  576                  return;
 577  577  
 578  578          mutex_enter(&tx->tx_sync_lock);
 579  579          if (tx->tx_open_txg > txg || tx->tx_synced_txg == txg-1) {
 580  580                  mutex_exit(&tx->tx_sync_lock);
 581  581                  return;
 582  582          }
 583  583  
↓ open down ↓ 236 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX