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/dnode_sync.c
          +++ new/usr/src/uts/common/fs/zfs/dnode_sync.c
↓ open down ↓ 294 lines elided ↑ open up ↑
 295  295                  else if (i == end && !trunc)
 296  296                          continue;
 297  297                  ASSERT0(bp->blk_birth);
 298  298          }
 299  299  #endif
 300  300          ASSERT(all || blocks_freed == 0 || db->db_last_dirty);
 301  301          return (all ? ALL : blocks_freed);
 302  302  }
 303  303  
 304  304  /*
 305      - * free_range: Traverse the indicated range of the provided file
      305 + * Traverse the indicated range of the provided file
 306  306   * and "free" all the blocks contained there.
 307  307   */
 308  308  static void
 309  309  dnode_sync_free_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx)
 310  310  {
 311  311          blkptr_t *bp = dn->dn_phys->dn_blkptr;
 312  312          dmu_buf_impl_t *db;
 313  313          int trunc, start, end, shift, i, err;
 314  314          int dnlevel = dn->dn_phys->dn_nlevels;
 315  315  
↓ open down ↓ 47 lines elided ↑ open up ↑
 363  363                  uint64_t off = (dn->dn_phys->dn_maxblkid + 1) *
 364  364                      (dn->dn_phys->dn_datablkszsec << SPA_MINBLOCKSHIFT);
 365  365                  dn->dn_phys->dn_maxblkid = (blkid ? blkid - 1 : 0);
 366  366                  ASSERT(off < dn->dn_phys->dn_maxblkid ||
 367  367                      dn->dn_phys->dn_maxblkid == 0 ||
 368  368                      dnode_next_offset(dn, 0, &off, 1, 1, 0) != 0);
 369  369          }
 370  370  }
 371  371  
 372  372  /*
 373      - * Try to kick all the dnodes dbufs out of the cache...
      373 + * Try to kick all the dnode's dbufs out of the cache...
 374  374   */
 375  375  void
 376  376  dnode_evict_dbufs(dnode_t *dn)
 377  377  {
 378  378          int progress;
 379  379          int pass = 0;
 380  380  
 381  381          do {
 382  382                  dmu_buf_impl_t *db, marker;
 383  383                  int evicting = FALSE;
↓ open down ↓ 313 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX