aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/dmu.c')
-rw-r--r--module/zfs/dmu.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
index 7e8328e77..7d3945433 100644
--- a/module/zfs/dmu.c
+++ b/module/zfs/dmu.c
@@ -1864,19 +1864,15 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp)
* 3. all other level 0 blocks
*/
if (ismd) {
- /*
- * XXX -- we should design a compression algorithm
- * that specializes in arrays of bps.
- */
- boolean_t lz4_ac = spa_feature_is_active(os->os_spa,
- SPA_FEATURE_LZ4_COMPRESS);
-
if (zfs_mdcomp_disable) {
compress = ZIO_COMPRESS_EMPTY;
- } else if (lz4_ac) {
- compress = ZIO_COMPRESS_LZ4;
} else {
- compress = ZIO_COMPRESS_LZJB;
+ /*
+ * XXX -- we should design a compression algorithm
+ * that specializes in arrays of bps.
+ */
+ compress = zio_compress_select(os->os_spa,
+ ZIO_COMPRESS_ON, ZIO_COMPRESS_ON);
}
/*
@@ -1909,7 +1905,8 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp)
compress = ZIO_COMPRESS_OFF;
checksum = ZIO_CHECKSUM_OFF;
} else {
- compress = zio_compress_select(dn->dn_compress, compress);
+ compress = zio_compress_select(os->os_spa, dn->dn_compress,
+ compress);
checksum = (dedup_checksum == ZIO_CHECKSUM_OFF) ?
zio_checksum_select(dn->dn_checksum, checksum) :