diff options
author | Justin T. Gibbs <[email protected]> | 2015-07-06 03:55:32 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-07-10 12:11:45 -0700 |
commit | 99197f034ea0a7e227116e0cec00fe55061bffa7 (patch) | |
tree | d2394aefc5b53962c03542d763c6950b5ad36484 /include/sys/zio.h | |
parent | 15cfbb38fd6248529bf16f0cdc4ebb7adf38ab98 (diff) |
Illumos 5661 - ZFS: "compression = on" should use lz4 if feature is enabled
5661 ZFS: "compression = on" should use lz4 if feature is enabled
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Josef 'Jeff' Sipek <[email protected]>
Reviewed by: Xin LI <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
References:
https://github.com/illumos/illumos-gate/commit/db1741f
https://www.illumos.org/issues/5661
Ported-by: kernelOfTruth [email protected]
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3571
Diffstat (limited to 'include/sys/zio.h')
-rw-r--r-- | include/sys/zio.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/sys/zio.h b/include/sys/zio.h index d31b2acdd..278b6e086 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -123,14 +123,19 @@ enum zio_compress { */ #define ZIO_COMPRESS_LEGACY_FUNCTIONS ZIO_COMPRESS_LZ4 -#define ZIO_COMPRESS_ON_VALUE ZIO_COMPRESS_LZJB -#define ZIO_COMPRESS_DEFAULT ZIO_COMPRESS_OFF +/* + * The meaning of "compress = on" selected by the compression features enabled + * on a given pool. + */ +#define ZIO_COMPRESS_LEGACY_ON_VALUE ZIO_COMPRESS_LZJB +#define ZIO_COMPRESS_LZ4_ON_VALUE ZIO_COMPRESS_LZ4 + +#define ZIO_COMPRESS_DEFAULT ZIO_COMPRESS_OFF #define BOOTFS_COMPRESS_VALID(compress) \ ((compress) == ZIO_COMPRESS_LZJB || \ (compress) == ZIO_COMPRESS_LZ4 || \ - ((compress) == ZIO_COMPRESS_ON && \ - ZIO_COMPRESS_ON_VALUE == ZIO_COMPRESS_LZJB) || \ + (compress) == ZIO_COMPRESS_ON || \ (compress) == ZIO_COMPRESS_OFF) /* @@ -543,8 +548,8 @@ extern enum zio_checksum zio_checksum_select(enum zio_checksum child, enum zio_checksum parent); extern enum zio_checksum zio_checksum_dedup_select(spa_t *spa, enum zio_checksum child, enum zio_checksum parent); -extern enum zio_compress zio_compress_select(enum zio_compress child, - enum zio_compress parent); +extern enum zio_compress zio_compress_select(spa_t *spa, + enum zio_compress child, enum zio_compress parent); extern void zio_suspend(spa_t *spa, zio_t *zio); extern int zio_resume(spa_t *spa); |