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/vdev_impl.h
          +++ new/usr/src/uts/common/fs/zfs/sys/vdev_impl.h
↓ open down ↓ 237 lines elided ↑ open up ↑
 238  238          vdev_phys_t     vl_vdev_phys;                           /* 112K */
 239  239          char            vl_uberblock[VDEV_UBERBLOCK_RING];      /* 128K */
 240  240  } vdev_label_t;                                                 /* 256K total */
 241  241  
 242  242  /*
 243  243   * vdev_dirty() flags
 244  244   */
 245  245  #define VDD_METASLAB    0x01
 246  246  #define VDD_DTL         0x02
 247  247  
      248 +/* Offset of embedded boot loader region on each label */
      249 +#define VDEV_BOOT_OFFSET        (2 * sizeof (vdev_label_t))
 248  250  /*
 249      - * Size and offset of embedded boot loader region on each label.
      251 + * Size of embedded boot loader region on each label.
 250  252   * The total size of the first two labels plus the boot area is 4MB.
 251  253   */
 252      -#define VDEV_BOOT_OFFSET        (2 * sizeof (vdev_label_t))
 253      -#define VDEV_BOOT_SIZE          (7ULL << 19)                    /* 3.5M */
      254 +#define VDEV_BOOT_SIZE          (7ULL << 19)                    /* 3.5M */
 254  255  
 255  256  /*
 256  257   * Size of label regions at the start and end of each leaf device.
 257  258   */
 258  259  #define VDEV_LABEL_START_SIZE   (2 * sizeof (vdev_label_t) + VDEV_BOOT_SIZE)
 259  260  #define VDEV_LABEL_END_SIZE     (2 * sizeof (vdev_label_t))
 260  261  #define VDEV_LABELS             4
 261  262  #define VDEV_BEST_LABEL         VDEV_LABELS
 262  263  
 263  264  #define VDEV_ALLOC_LOAD         0
↓ open down ↓ 46 lines elided ↑ open up ↑
 310  311  extern vdev_ops_t vdev_spare_ops;
 311  312  
 312  313  /*
 313  314   * Common size functions
 314  315   */
 315  316  extern uint64_t vdev_default_asize(vdev_t *vd, uint64_t psize);
 316  317  extern uint64_t vdev_get_min_asize(vdev_t *vd);
 317  318  extern void vdev_set_min_asize(vdev_t *vd);
 318  319  
 319  320  /*
 320      - * zdb uses this tunable, so it must be declared here to make lint happy.
      321 + * Global variables
 321  322   */
      323 +/* zdb uses this tunable, so it must be declared here to make lint happy. */
 322  324  extern int zfs_vdev_cache_size;
 323  325  
 324  326  /*
 325  327   * The vdev_buf_t is used to translate between zio_t and buf_t, and back again.
 326  328   */
 327  329  typedef struct vdev_buf {
 328  330          buf_t   vb_buf;         /* buffer that describes the io */
 329  331          zio_t   *vb_io;         /* pointer back to the original zio_t */
 330  332  } vdev_buf_t;
 331  333  
 332  334  #ifdef  __cplusplus
 333  335  }
 334  336  #endif
 335  337  
 336  338  #endif  /* _SYS_VDEV_IMPL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX