Print this page
3525 Persistent L2ARC

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/spa.h
          +++ new/usr/src/uts/common/fs/zfs/sys/spa.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  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) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2012 by Delphix. All rights reserved.
  24   24   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
       25 + * Copyright 2013 Saso Kiselkov. All rights reserved.
  25   26   */
  26   27  
  27   28  #ifndef _SYS_SPA_H
  28   29  #define _SYS_SPA_H
  29   30  
  30   31  #include <sys/avl.h>
  31   32  #include <sys/zfs_context.h>
  32   33  #include <sys/nvpair.h>
  33   34  #include <sys/sysmacros.h>
  34   35  #include <sys/types.h>
↓ open down ↓ 250 lines elided ↑ open up ↑
 285  286          DVA_EQUAL(&(bp1)->blk_dva[0], &(bp2)->blk_dva[0]) &&    \
 286  287          DVA_EQUAL(&(bp1)->blk_dva[1], &(bp2)->blk_dva[1]) &&    \
 287  288          DVA_EQUAL(&(bp1)->blk_dva[2], &(bp2)->blk_dva[2]))
 288  289  
 289  290  #define ZIO_CHECKSUM_EQUAL(zc1, zc2) \
 290  291          (0 == (((zc1).zc_word[0] - (zc2).zc_word[0]) | \
 291  292          ((zc1).zc_word[1] - (zc2).zc_word[1]) | \
 292  293          ((zc1).zc_word[2] - (zc2).zc_word[2]) | \
 293  294          ((zc1).zc_word[3] - (zc2).zc_word[3])))
 294  295  
      296 +#define ZIO_CHECKSUM_BSWAP(_zc) \
      297 +        do { \
      298 +                zio_cksum_t *zc = (_zc); \
      299 +                zc->zc_word[0] = BSWAP_64(zc->zc_word[0]); \
      300 +                zc->zc_word[1] = BSWAP_64(zc->zc_word[1]); \
      301 +                zc->zc_word[2] = BSWAP_64(zc->zc_word[2]); \
      302 +                zc->zc_word[3] = BSWAP_64(zc->zc_word[3]); \
      303 +                _NOTE(NOTREACHED) \
      304 +                _NOTE(CONSTCOND) \
      305 +        } while (0)
      306 +
 295  307  #define DVA_IS_VALID(dva)       (DVA_GET_ASIZE(dva) != 0)
 296  308  
 297  309  #define ZIO_SET_CHECKSUM(zcp, w0, w1, w2, w3)   \
 298  310  {                                               \
 299  311          (zcp)->zc_word[0] = w0;                 \
 300  312          (zcp)->zc_word[1] = w1;                 \
 301  313          (zcp)->zc_word[2] = w2;                 \
 302  314          (zcp)->zc_word[3] = w3;                 \
 303  315  }
 304  316  
↓ open down ↓ 399 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX