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/sys/ddt.h
          +++ new/usr/src/uts/common/fs/zfs/sys/ddt.h
↓ open down ↓ 55 lines elided ↑ open up ↑
  56   56  #define DDT_TYPE_CURRENT                0
  57   57  
  58   58  #define DDT_COMPRESS_BYTEORDER_MASK     0x80
  59   59  #define DDT_COMPRESS_FUNCTION_MASK      0x7f
  60   60  
  61   61  /*
  62   62   * On-disk ddt entry:  key (name) and physical storage (value).
  63   63   */
  64   64  typedef struct ddt_key {
  65   65          zio_cksum_t     ddk_cksum;      /* 256-bit block checksum */
  66      -        uint64_t        ddk_prop;       /* LSIZE, PSIZE, compression */
       66 +        /*
       67 +         * Encoded with logical & physical size, and compression, as follows:
       68 +         *   +-------+-------+-------+-------+-------+-------+-------+-------+
       69 +         *   |   0   |   0   |   0   | comp  |     PSIZE     |     LSIZE     |
       70 +         *   +-------+-------+-------+-------+-------+-------+-------+-------+
       71 +         */
       72 +        uint64_t        ddk_prop;
  67   73  } ddt_key_t;
  68   74  
  69      -/*
  70      - * ddk_prop layout:
  71      - *
  72      - *      +-------+-------+-------+-------+-------+-------+-------+-------+
  73      - *      |   0   |   0   |   0   | comp  |     PSIZE     |     LSIZE     |
  74      - *      +-------+-------+-------+-------+-------+-------+-------+-------+
  75      - */
  76   75  #define DDK_GET_LSIZE(ddk)      \
  77   76          BF64_GET_SB((ddk)->ddk_prop, 0, 16, SPA_MINBLOCKSHIFT, 1)
  78   77  #define DDK_SET_LSIZE(ddk, x)   \
  79   78          BF64_SET_SB((ddk)->ddk_prop, 0, 16, SPA_MINBLOCKSHIFT, 1, x)
  80   79  
  81   80  #define DDK_GET_PSIZE(ddk)      \
  82   81          BF64_GET_SB((ddk)->ddk_prop, 16, 16, SPA_MINBLOCKSHIFT, 1)
  83   82  #define DDK_SET_PSIZE(ddk, x)   \
  84   83          BF64_SET_SB((ddk)->ddk_prop, 16, 16, SPA_MINBLOCKSHIFT, 1, x)
  85   84  
↓ open down ↓ 161 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX