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/zil.c
          +++ new/usr/src/uts/common/fs/zfs/zil.c
↓ open down ↓ 58 lines elided ↑ open up ↑
  59   59   * A log record holds a system call transaction. Log blocks can
  60   60   * hold many log records and the blocks are chained together.
  61   61   * Each ZIL block contains a block pointer (blkptr_t) to the next
  62   62   * ZIL block in the chain. The ZIL header points to the first
  63   63   * block in the chain. Note there is not a fixed place in the pool
  64   64   * to hold blocks. They are dynamically allocated and freed as
  65   65   * needed from the blocks available. Figure X shows the ZIL structure:
  66   66   */
  67   67  
  68   68  /*
  69      - * This global ZIL switch affects all pools
       69 + * Disable intent logging replay.  This global ZIL switch affects all pools.
  70   70   */
  71      -int zil_replay_disable = 0;    /* disable intent logging replay */
       71 +int zil_replay_disable = 0;
  72   72  
  73   73  /*
  74   74   * Tunable parameter for debugging or performance analysis.  Setting
  75   75   * zfs_nocacheflush will cause corruption on power loss if a volatile
  76   76   * out-of-order write cache is enabled.
  77   77   */
  78   78  boolean_t zfs_nocacheflush = B_FALSE;
  79   79  
  80   80  static kmem_cache_t *zil_lwb_cache;
  81   81  
↓ open down ↓ 790 lines elided ↑ open up ↑
 872  872          if (lwb->lwb_zio == NULL) {
 873  873                  lwb->lwb_zio = zio_rewrite(zilog->zl_root_zio, zilog->zl_spa,
 874  874                      0, &lwb->lwb_blk, lwb->lwb_buf, BP_GET_LSIZE(&lwb->lwb_blk),
 875  875                      zil_lwb_write_done, lwb, ZIO_PRIORITY_LOG_WRITE,
 876  876                      ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE, &zb);
 877  877          }
 878  878  }
 879  879  
 880  880  /*
 881  881   * Define a limited set of intent log block sizes.
      882 + *
 882  883   * These must be a multiple of 4KB. Note only the amount used (again
 883  884   * aligned to 4KB) actually gets written. However, we can't always just
 884  885   * allocate SPA_MAXBLOCKSIZE as the slog space could be exhausted.
 885  886   */
 886  887  uint64_t zil_block_buckets[] = {
 887  888      4096,               /* non TX_WRITE */
 888  889      8192+4096,          /* data base */
 889  890      32*1024 + 4096,     /* NFS writes */
 890  891      UINT64_MAX
 891  892  };
↓ open down ↓ 1224 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX