ZSTD Project Weekly Status Update

Allan Jude allanjude at freebsd.org
Tue Jun 30 01:42:03 UTC 2020

In my continued effort to finish the integration of ZSTD into ZFS, here
is my second weekly status report:

There is still a number of existing feedback items and known issues that
need to be addressed. I am trying to work through those now.

- Addressed an issue where the user could manually set the hidden
compress_level property, causing incorrect operation. The property is
not marked with the PROP_READONLY flag because it requires PROP_INHERIT

- It has been pointed out again recently that setting the compress=zstd
property on a dataset, but not actually writing any blocks, does not set
the zstd feature flag to 'active'. If this pool is then exported, and
imported using an older version of ZFS that does not know of zstd, it
will trigger an ASSERT() when the value of the compression property enum
is out-of-range. The plan is to fully activate the feature when the
property is set, but the details of how (and where) to do still still
need to be worked out.

- I am still working on the issue of inheritance for both the compress
and the hidden compress_level properties. If you create a child dataset
with the compress property set to zstd-13, it works as expected. But if
you `zfs inherit compress` on that dataset, the output of `zfs get
compress,compress_level` changes from:

zof/inherit/zstd-10/zstd-13       compression     zstd-13
zof/inherit/zstd-10/zstd-13       compress_level  13


zof/inherit/zstd-10/zstd-13       compression     zstd-13
            inherited from zof/inherit/zstd-10
zof/inherit/zstd-10/zstd-13       compress_level  13

This is due to the fact that both the parent, and the child, actually
have compress=16 (zstd), and the zstd-10 or zstd-13 is determined by
combining the hidden compress_level property.

The expected behaviour in this case would be that the compression type
(and therefore the compress_level) would get reset to the value from the

There is a related problem when the child's compression setting is set
to lz4 (or any other type that doesn't use a level).

This project was sponsored by the FreeBSD Foundation.

Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20200629/1680a5f7/attachment.sig>

More information about the freebsd-fs mailing list