No description
  • C 68.8%
  • Shell 20.7%
  • Assembly 4.9%
  • M4 1.9%
  • Python 1.5%
  • Other 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
MorganaFuture bbecaa7938 zfs recv: warn when a non-raw incremental diverges a raw IV set
A non-raw incremental received onto a snapshot that was itself received
raw re-stamps the destination's IV set guid with a fresh value, so it no
longer matches the sending lineage.  Nothing rejects this at the time,
but a later raw incremental taken from that snapshot is rejected with an
IV set guid mismatch (#8758).  The failure surfaces arbitrarily later,
often on a different host, with no hint that an earlier non-raw receive
was the cause.

The receive itself cannot tell that a snapshot was received raw from
anything on disk: a raw-received snapshot and an ordinary locally-keyed
one both carry an IV set guid of the same shape, one stamped from the
stream and one from unique_create(), with no recorded provenance.  So
warning on every non-raw incremental into an encrypted dataset would
fire on the common keys-local backup workflow that never hits the bug.

Record the provenance instead.  A raw receive now stamps a
DS_FIELD_RAW_RECEIVED marker on the new snapshot, next to the ivset
stamp it already writes.  A non-raw incremental onto a marked snapshot,
whether fresh or resumed, sets a flag that recv returns to userland, and
'zfs recv' prints a warning naming the divergence and how to avoid it.
The marker is an inert extensible-dataset zap key needing no feature
flag: older code never enumerates it, an unmarked snapshot (any pool
written before this, or a locally-keyed lineage) simply yields no
warning, and the hard late check remains as the backstop.  The warning
fires precisely at the point of divergence, and gives a future opt-in
flag an exact predicate to gate on.

Only the first non-raw hop warns, since the snapshot it creates is left
unmarked; that is when the divergence actually happens, so a warning per
subsequent non-raw incremental would add nothing.

Tests: extend send_mixed_raw to assert the poisoning non-raw incremental
warns and the matching raw incremental does not; verified in a VM that a
non-raw incremental into an encrypted but non-raw-received dataset (a
plain keys-local backup) stays silent.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: MorganaFuture <103630661+MorganaFuture@users.noreply.github.com>
Closes #8758
Closes #18784
2026-07-20 17:04:34 -07:00
.github CI: Update Alpine Linux runner to 3.24.1 2026-07-13 13:03:42 -07:00
cmd zstream: add "drop records" chain module 2026-07-20 10:59:23 -07:00
config Add configure option to disable zfs channel programs 2026-07-16 11:52:24 -07:00
contrib zpool: add condense verb 2026-06-30 11:53:59 -07:00
etc Remove /etc/sudoers.d/zfs 2026-06-04 16:45:13 -07:00
include zfs recv: warn when a non-raw incremental diverges a raw IV set 2026-07-20 17:04:34 -07:00
lib zfs recv: warn when a non-raw incremental diverges a raw IV set 2026-07-20 17:04:34 -07:00
man libzfs: clarify the raw incremental "IV set guid mismatch" error 2026-07-20 17:04:29 -07:00
module zfs recv: warn when a non-raw incremental diverges a raw IV set 2026-07-20 17:04:34 -07:00
rpm Remove /etc/sudoers.d/zfs 2026-06-04 16:45:13 -07:00
scripts coverage_report: produce nice text reports from lcov/geninfo tracefiles 2026-06-04 09:35:25 -07:00
tests zfs recv: warn when a non-raw incremental diverges a raw IV set 2026-07-20 17:04:34 -07:00
udev build: add SPDX license tags to build system files 2026-01-08 15:08:03 -08:00
.editorconfig Add an .editorconfig; document git whitespace settings 2020-01-27 13:32:52 -08:00
.gitignore Add SECURITY.md policy file 2026-07-08 14:35:46 -07:00
.gitmodules .gitmodules: link to openzfs github repository 2021-04-12 09:37:23 -07:00
.mailmap mailmap/AUTHORS: update with recent new contributors 2026-07-10 09:33:46 -07:00
AUTHORS mailmap/AUTHORS: update with recent new contributors 2026-07-10 09:33:46 -07:00
autogen.sh build: add SPDX license tags to build system files 2026-01-08 15:08:03 -08:00
CODE_OF_CONDUCT.md Documentation corrections 2022-12-22 11:34:28 -08:00
configure.ac Disconnect metaslab tracing from default builds 2026-07-06 13:15:53 +02:00
copy-builtin build: add ZFS_DEBUG Kconfig for copy-builtin 2026-05-29 09:40:14 -07:00
COPYRIGHT Fix typos 2020-06-09 21:24:09 -07:00
LICENSE Update build system and packaging 2018-05-29 16:00:33 -07:00
Makefile.am unit: a unit testing framework 2026-05-22 13:29:30 -07:00
META Linux 7.1 compat: META (#18682) 2026-06-17 09:45:38 -07:00
NEWS Fix NEWS file 2020-08-26 21:44:41 -07:00
NOTICE Update build system and packaging 2018-05-29 16:00:33 -07:00
README.md README: update supported FreeBSD release to 15.1 2026-06-23 09:01:01 -04:00
RELEASES.md Update RELEASES.md LTS release to 2.2 2025-01-17 11:04:36 -05:00
SECURITY.md Add SECURITY.md policy file 2026-07-08 14:35:46 -07:00
TEST Remove CI builder customization from TEST 2020-03-16 10:46:03 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

img

OpenZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community. This repository contains the code for running OpenZFS on Linux and FreeBSD.

codecov coverity

Official Resources

Installation

Full documentation for installing OpenZFS on your favorite operating system can be found at the Getting Started Page.

Contribute & Develop

We have a separate document with contribution guidelines.

We have a Code of Conduct.

Release

OpenZFS is released under a CDDL license. For more details see the NOTICE, LICENSE and COPYRIGHT files; UCRL-CODE-235197

Supported Kernels and Distributions

Linux

Given the wide variety of Linux environments, we prioritize development and testing on stable, supported kernels and distributions.

Kernel (kernel.org)

All longterm kernels from kernel.org are supported. stable kernels are usually supported in the next OpenZFS release.

Supported longterm kernels: 6.18, 6.12, 6.6, 6.1, 5.15, 5.10.

Red Hat Enterprise Linux (RHEL)

All RHEL (and compatible systems: AlmaLinux OS, Rocky Linux, etc) on the full or maintenance support tracks are supported.

Supported RHEL releases: 8.10, 9.7, 10.1.

Ubuntu

All Ubuntu LTS releases are supported.

Supported Ubuntu releases: 26.04 “Resolute”, 24.04 “Noble”, 22.04 “Jammy”.

Debian

All Debian stable and LTS releases are supported.

Supported Debian releases: 13 “Trixie”, 12 “Bookworm”, 11 “Bullseye”.

Other Distributions

Generally, if a distribution is following an LTS kernel, it should work well with OpenZFS.

FreeBSD

All FreeBSD releases receiving security support are supported by OpenZFS.

Supported FreeBSD releases: 15.1, 14.4.