diff options
Diffstat (limited to 'module/zfs/dmu_objset.c')
-rw-r--r-- | module/zfs/dmu_objset.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index bf488384d..b1590d7db 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -30,6 +30,8 @@ * Copyright 2017 Nexenta Systems, Inc. * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. * Copyright (c) 2018, loli10K <[email protected]>. All rights reserved. + * Copyright (c) 2019, Klara Inc. + * Copyright (c) 2019, Allan Jude */ /* Portions Copyright 2010 Robert Milkowski */ @@ -192,8 +194,10 @@ compression_changed_cb(void *arg, uint64_t newval) */ ASSERT(newval != ZIO_COMPRESS_INHERIT); - os->os_compress = zio_compress_select(os->os_spa, newval, - ZIO_COMPRESS_ON); + os->os_compress = zio_compress_select(os->os_spa, + ZIO_COMPRESS_ALGO(newval), ZIO_COMPRESS_ON); + os->os_complevel = zio_complevel_select(os->os_spa, os->os_compress, + ZIO_COMPRESS_LEVEL(newval), ZIO_COMPLEVEL_DEFAULT); } static void @@ -580,6 +584,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dataset_t *ds, blkptr_t *bp, /* It's the meta-objset. */ os->os_checksum = ZIO_CHECKSUM_FLETCHER_4; os->os_compress = ZIO_COMPRESS_ON; + os->os_complevel = ZIO_COMPLEVEL_DEFAULT; os->os_encrypted = B_FALSE; os->os_copies = spa_max_replication(spa); os->os_dedup_checksum = ZIO_CHECKSUM_OFF; |