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