Print this page
4045 zfs write throttle & i/o scheduler performance work
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/sa_impl.h
          +++ new/usr/src/uts/common/fs/zfs/sys/sa_impl.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  23      - * Copyright (c) 2012 by Delphix. All rights reserved.
       23 + * Copyright (c) 2013 by Delphix. All rights reserved.
  24   24   */
  25   25  
  26   26  #ifndef _SYS_SA_IMPL_H
  27   27  #define _SYS_SA_IMPL_H
  28   28  
  29   29  #include <sys/dmu.h>
  30   30  #include <sys/refcount.h>
  31   31  #include <sys/list.h>
  32   32  
  33   33  /*
↓ open down ↓ 112 lines elided ↑ open up ↑
 146  146          avl_tree_t      sa_layout_hash_tree; /* keyed by layout hash value */
 147  147          int             sa_user_table_sz;
 148  148          sa_attr_type_t  *sa_user_table; /* user name->attr mapping table */
 149  149  };
 150  150  
 151  151  /*
 152  152   * header for all bonus and spill buffers.
 153  153   *
 154  154   * The header has a fixed portion with a variable number
 155  155   * of "lengths" depending on the number of variable sized
 156      - * attribues which are determined by the "layout number"
      156 + * attributes which are determined by the "layout number"
 157  157   */
 158  158  
 159  159  #define SA_MAGIC        0x2F505A  /* ZFS SA */
 160  160  typedef struct sa_hdr_phys {
 161  161          uint32_t sa_magic;
      162 +        /* BEGIN CSTYLED */
 162  163          /*
 163  164           * Encoded with hdrsize and layout number as follows:
 164  165           * 16      10       0
 165  166           * +--------+-------+
 166  167           * | hdrsz  |layout |
 167  168           * +--------+-------+
 168  169           *
 169  170           * Bits 0-10 are the layout number
 170  171           * Bits 11-16 are the size of the header.
 171  172           * The hdrsize is the number * 8
 172  173           *
 173  174           * For example.
 174  175           * hdrsz of 1 ==> 8 byte header
 175  176           *          2 ==> 16 byte header
 176  177           *
 177  178           */
      179 +        /* END CSTYLED */
 178  180          uint16_t sa_layout_info;
 179  181          uint16_t sa_lengths[1]; /* optional sizes for variable length attrs */
 180  182          /* ... Data follows the lengths.  */
 181  183  } sa_hdr_phys_t;
 182  184  
 183  185  #define SA_HDR_LAYOUT_NUM(hdr) BF32_GET(hdr->sa_layout_info, 0, 10)
 184  186  #define SA_HDR_SIZE(hdr) BF32_GET_SB(hdr->sa_layout_info, 10, 6, 3, 0)
 185  187  #define SA_HDR_LAYOUT_INFO_ENCODE(x, num, size) \
 186  188  { \
 187  189          BF32_SET_SB(x, 10, 6, 3, 0, size); \
↓ open down ↓ 100 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX