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.c
          +++ new/usr/src/uts/common/fs/zfs/dnode.c
↓ open down ↓ 1795 lines elided ↑ open up ↑
1796 1796          if (space > 0)
1797 1797                  space = spa_get_asize(os->os_spa, space);
1798 1798  
1799 1799          if (ds)
1800 1800                  dsl_dir_willuse_space(ds->ds_dir, space, tx);
1801 1801  
1802 1802          dmu_tx_willuse_space(tx, space);
1803 1803  }
1804 1804  
1805 1805  /*
1806      - * This function scans a block at the indicated "level" looking for
1807      - * a hole or data (depending on 'flags').  If level > 0, then we are
1808      - * scanning an indirect block looking at its pointers.  If level == 0,
1809      - * then we are looking at a block of dnodes.  If we don't find what we
1810      - * are looking for in the block, we return ESRCH.  Otherwise, return
1811      - * with *offset pointing to the beginning (if searching forwards) or
1812      - * end (if searching backwards) of the range covered by the block
1813      - * pointer we matched on (or dnode).
     1806 + * Scans a block at the indicated "level" looking for a hole or data,
     1807 + * depending on 'flags'.
     1808 + *
     1809 + * If level > 0, then we are scanning an indirect block looking at its
     1810 + * pointers.  If level == 0, then we are looking at a block of dnodes.
     1811 + *
     1812 + * If we don't find what we are looking for in the block, we return ESRCH.
     1813 + * Otherwise, return with *offset pointing to the beginning (if searching
     1814 + * forwards) or end (if searching backwards) of the range covered by the
     1815 + * block pointer we matched on (or dnode).
1814 1816   *
1815 1817   * The basic search algorithm used below by dnode_next_offset() is to
1816 1818   * use this function to search up the block tree (widen the search) until
1817 1819   * we find something (i.e., we don't return ESRCH) and then search back
1818 1820   * down the tree (narrow the search) until we reach our original search
1819 1821   * level.
1820 1822   */
1821 1823  static int
1822 1824  dnode_next_offset_level(dnode_t *dn, int flags, uint64_t *offset,
1823 1825          int lvl, uint64_t blkfill, uint64_t txg)
↓ open down ↓ 177 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX