From 371a8196076f92b9d21111f714fd0a0061d98af7 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Thu, 25 Jun 2026 23:24:47 -0700 Subject: [PATCH] zfs_2_4: apply patch for #18366 (dedup=on data corruption) This was reproducible with substitution of large NARs with a lot of files and a dedup=on Nix store. While Nix would correctly produce a signature verification error if the hash was known, builds could silently be corrupt. TrueNAS backported this, so let's as well so this doesn't bite anyone else. See: https://github.com/truenas/zfs/pull/390 See: https://github.com/openzfs/zfs/issues/18366 See: https://github.com/openzfs/zfs/pull/18544 Signed-off-by: Morgan Jones --- pkgs/os-specific/linux/zfs/2_4.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/os-specific/linux/zfs/2_4.nix b/pkgs/os-specific/linux/zfs/2_4.nix index 6f4cbc6861d4..7de7664f4dff 100644 --- a/pkgs/os-specific/linux/zfs/2_4.nix +++ b/pkgs/os-specific/linux/zfs/2_4.nix @@ -18,6 +18,15 @@ callPackage ./generic.nix args { # this package should point to the latest release. version = "2.4.3"; + extraPatches = [ + # https://github.com/openzfs/zfs/issues/18366 + # dedup data corruption fix unreleased as of OpenZFS 2.4.3 + (fetchpatch { + url = "https://github.com/openzfs/zfs/commit/6fb72fda0f60d9efb591e320f83f78b19ec451cc.patch?full_index=1"; + hash = "sha256-UuSVmO61Ux5S3F+JAtRnHyeVS4EFobDTKBuD5s8PI+k="; + }) + ]; + tests = { inherit (nixosTests.zfs) series_2_4; }