Print this page
%B

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zio_compress.c
          +++ new/usr/src/uts/common/fs/zfs/zio_compress.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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  /*
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
       26 +/*
       27 + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
       28 + */
  26   29  
  27   30  #include <sys/zfs_context.h>
  28   31  #include <sys/compress.h>
  29   32  #include <sys/spa.h>
  30   33  #include <sys/zio.h>
  31   34  #include <sys/zio_compress.h>
  32   35  
  33   36  /*
  34   37   * Compression vectors.
  35   38   */
↓ open down ↓ 7 lines elided ↑ open up ↑
  43   46          {gzip_compress,         gzip_decompress,        1,      "gzip-1"},
  44   47          {gzip_compress,         gzip_decompress,        2,      "gzip-2"},
  45   48          {gzip_compress,         gzip_decompress,        3,      "gzip-3"},
  46   49          {gzip_compress,         gzip_decompress,        4,      "gzip-4"},
  47   50          {gzip_compress,         gzip_decompress,        5,      "gzip-5"},
  48   51          {gzip_compress,         gzip_decompress,        6,      "gzip-6"},
  49   52          {gzip_compress,         gzip_decompress,        7,      "gzip-7"},
  50   53          {gzip_compress,         gzip_decompress,        8,      "gzip-8"},
  51   54          {gzip_compress,         gzip_decompress,        9,      "gzip-9"},
  52   55          {zle_compress,          zle_decompress,         64,     "zle"},
       56 +        {lz4_compress,          lz4_decompress,         0,      "lz4"},
       57 +        {lz4_compress,          lz4_decompress,         1,      "lz4hc"},
  53   58  };
  54   59  
  55   60  enum zio_compress
  56   61  zio_compress_select(enum zio_compress child, enum zio_compress parent)
  57   62  {
  58   63          ASSERT(child < ZIO_COMPRESS_FUNCTIONS);
  59   64          ASSERT(parent < ZIO_COMPRESS_FUNCTIONS);
  60   65          ASSERT(parent != ZIO_COMPRESS_INHERIT && parent != ZIO_COMPRESS_ON);
  61   66  
  62   67          if (child == ZIO_COMPRESS_INHERIT)
↓ open down ↓ 70 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX