Print this page
%B

@@ -21,10 +21,11 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  */
 
 #ifndef _ZIO_H
 #define _ZIO_H
 

@@ -104,18 +105,23 @@
         ZIO_COMPRESS_GZIP_6,
         ZIO_COMPRESS_GZIP_7,
         ZIO_COMPRESS_GZIP_8,
         ZIO_COMPRESS_GZIP_9,
         ZIO_COMPRESS_ZLE,
+        ZIO_COMPRESS_LZ4,
+        ZIO_COMPRESS_LZ4HC,
         ZIO_COMPRESS_FUNCTIONS
 };
 
+/* N.B. when altering this value, also change BOOTFS_COMPRESS_VALID below */
 #define ZIO_COMPRESS_ON_VALUE   ZIO_COMPRESS_LZJB
 #define ZIO_COMPRESS_DEFAULT    ZIO_COMPRESS_OFF
 
 #define BOOTFS_COMPRESS_VALID(compress)                 \
         ((compress) == ZIO_COMPRESS_LZJB ||             \
+        (compress) == ZIO_COMPRESS_LZ4HC ||             \
+        (compress) == ZIO_COMPRESS_LZ4 ||               \
         ((compress) == ZIO_COMPRESS_ON &&               \
         ZIO_COMPRESS_ON_VALUE == ZIO_COMPRESS_LZJB) ||  \
         (compress) == ZIO_COMPRESS_OFF)
 
 #define ZIO_FAILURE_MODE_WAIT           0