From 6ca6694036e408c14907d0fbf91be2e173c1ecd4 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Sat, 25 Apr 2026 01:04:31 -0400 Subject: [PATCH] zfs: fix patch inclusion --- modules/zfs.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/zfs.nix b/modules/zfs.nix index 4ed5e9b..933cb8f 100644 --- a/modules/zfs.nix +++ b/modules/zfs.nix @@ -20,10 +20,19 @@ let arcMaxBytes = (totalRamBytes - totalHugepageBytes) * 60 / 100; in { - # remove inline dbuf_evict_one call so the dedicated eviction thread - # handles cache pressure instead of stalling txg_sync on 6.14+. + # Patch ZFS: remove inline dbuf_evict_one from dbuf_evict_notify. # https://github.com/openzfs/zfs/issues/18426 - boot.zfs.package = pkgs.zfs_2_4.overrideAttrs (old: { + # + # boot.zfs.package = userspace (zfs, zpool commands) + # boot.zfs.modulePackage = kernel module (zfs.ko, spl.ko) + # Both must be patched. The kernel module is built separately + # from boot.kernelPackages.zfs_2_3, which we override here. + boot.zfs.package = pkgs.zfs.overrideAttrs (old: { + patches = (old.patches or [ ]) ++ [ + ../patches/zfs/0001-remove-dbuf_evict_one-call.patch + ]; + }); + boot.zfs.modulePackage = config.boot.kernelPackages.zfs_2_3.overrideAttrs (old: { patches = (old.patches or [ ]) ++ [ ../patches/zfs/0001-remove-dbuf_evict_one-call.patch ];