
Category: ZFS
-
Original Motivation
SHA-256, SHA-512 and SHA-512/256 are secure hash algorithms specified in FIPS 180-4, NIST’s Secure Hash Standard. ZFS uses the above as block checksums (
checksum=sha256,checksum=sha512) for data integrity and deduplication. There is currently no unit test coverage for this family of hash algorithms.What does this commit introduce?
It adds a
tests/unit/test_sha2.cwith three types of tests that follow the FIPS 180-4 standard as defined in https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.180-4.pdf :- known answer tests (KAT) for SHA-256, SHA-512 and SHA-512/256, using the same NIST test messages and digests as
tests/zfs-tests/cmd/checksum/sha2_test.c - an incremental test: split updates across the 64- and 128-byte message block boundaries must produce the same digest as a single update
- a cross-implementation test via
zfs_impl_get_ops(): every supported implementation must reproduce the known answer and compute the same digest for a multi-block message
Testing perfomed:
$ make unit T=sha2UNITTEST tests/unit/test_sha2Running test suite with seed 0xcf392006...sha2.sha256_known [ OK ] [ 0.00002286 / 0.00001675 CPU ]sha2.sha512_known [ OK ] [ 0.00002044 / 0.00001995 CPU ]sha2.sha512_256_known [ OK ] [ 0.00001542 / 0.00001524 CPU ]sha2.incremental [ OK ] [ 0.00019737 / 0.00019336 CPU ]sha2.impls [ OK ] [ 0.00026169 / 0.00026171 CPU ]5 of 5 (100%) tests successful, 0 (0%) test skipped. - known answer tests (KAT) for SHA-256, SHA-512 and SHA-512/256, using the same NIST test messages and digests as
-
This deterministic test suite performs a scalar, incremental, native as well byteswap checksum verification of the fletcher2 and fletcher4 hash, non cryptographic algorithms. Additionally it verifies matching between different implementations supported by the host.

-
An interesting article by Klara Systems:
1. Different problems:
Ceph is built for distributed storage across many servers; ZFS optimizes performance, reliability, and simplicity on a single system.
2. Distributed = overhead:Ceph scales horizontally and survives multiple node failures, but adds networking, coordination, and management complexity that raises latency.
3. Most don’t need it:Modern ZFS delivers strong capacity, performance, and availability with far less operational complexity — a solid fit for virtualization, databases, backups, and enterprise storage.
https://klarasystems.com/articles/zfs-vs-ceph-do-you-actually-need-ceph/
-
Just added a new unit test suite that covers basic B-Tree operations including empty trees, add_find (), remove () and iteration functions.
> make unit T=btreeCC tests/unit/test_btree-test_btree.oCCLD tests/unit/test_btreeUNITTEST tests/unit/test_btreeRunning test suite with seed 0xd9494352...btree.empty [ OK ] [ 0.00000157 / 0.00000060 CPU ]btree.add_find [ OK ] [ 0.00000719 / 0.00000690 CPU ]btree.remove [ OK ] [ 0.00000606 / 0.00000575 CPU ]btree.walk [ OK ] [ 0.00000379 / 0.00000380 CPU ]4 of 4 (100%) tests successful, 0 (0%) test skipped. -
-
“OpenZFS 2.4.3 is out today as the newest stable point release to this open-source ZFS file-system implementation as well as point releases for the OpenZFS 2.3 and 2.2 series too.
One month after OpenZFS 2.4.2, OpenZFS 2.4.3 is now available with additional fixes. On the Linux side the kernel support still extends up through the Linux 7.0 stable kernel even with Linux v7.1 expected for release this coming Sunday. Hopefully another OpenZFS point release will be out shortly thereafter with blessed Linux 7.1 kernel support.
OpenZFS 2.4.3 adds an encryption key check for block cloning in ZVOL, some FreeBSD-specific work like being able to build the kernel module with sanitizers, fixing some double free conditions, fixing a possible panic, some Linux compatibility updates, a number of continuous integration (CI) updates, and various other minor fixes throughout.
Details on the OpenZFS 2.4.3 changes in full and downloads via GitHub.
In addition to the OpenZFS 2.4.3 point release, OpenZFS 2.3.8 and OpenZFS 2.2.10 are available with many of the same bug fixes back-ported to those prior series plus other relevant fixes.”
-
Along with zfs-2.2.10 and zfs-2.3.8.

-
Unit tests are deterministic tests that complement the ZTS testing infrastructure. They were first implemented by robn in test_zap.c to cover the ZAP API including microzap and fatzap.
My commit introduces a new namecheck validity testing framework for zfs pools, datasets, snapshots etc. It covers the full namecheck.c functions.
To run the test, execute make unit T=namecheck
> make unit T=namecheckUNITTEST tests/unit/test_namecheckRunning test suite with seed 0x5842ef3e...namecheck.pool [ OK ] [ 0.00000954 / 0.00000873 CPU ]namecheck.dataset [ OK ] [ 0.00001064 / 0.00000984 CPU ]namecheck.snapshot [ OK ] [ 0.00000589 / 0.00000590 CPU ]namecheck.bookmark [ OK ] [ 0.00000654 / 0.00000605 CPU ]namecheck.component [ OK ] [ 0.00000508 / 0.00000508 CPU ]namecheck.permset [ OK ] [ 0.00000608 / 0.00000561 CPU ]namecheck.mountpoint [ OK ] [ 0.00000337 / 0.00000329 CPU ]namecheck.depth [ OK ] [ 0.00000204 / 0.00000159 CPU ]8 of 8 (100%) tests successful, 0 (0%) test skipped.
https://github.com/chrislongros/zfs/commit/7e054b2e7ea80c7c838f7fd44b7d517eea5c9d18
-
The patch set with 64 commits has been created!








