Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 52c112597c6b
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 84f47bfe9ae8
Choose a head ref
  • 5 commits
  • 6 files changed
  • 4 contributors

Commits on Feb 13, 2020

  1. linux: update fpu patches for 5.3

    At the moment we experience bad instabilities with linux 5.3:
    
    openzfs/zfs#9346
    
    as the zfs-native method of disabling the FPU is buggy.
    
    (cherry picked from commit 96097ab)
    Mic92 committed Feb 13, 2020
    Copy the full SHA
    451e319 View commit details
  2. zfsUnstable: drop build patches

    (cherry picked from commit 539e66c)
    Mic92 committed Feb 13, 2020
    Copy the full SHA
    a59e29c View commit details
  3. zfs: fix PATH for zpool.d scripts

    (cherry picked from commit 17f76a9)
    woffs authored and Mic92 committed Feb 13, 2020
    Copy the full SHA
    502654d View commit details
  4. zfs: 0.8.2 -> 0.8.3

    (cherry picked from commit 88de34b)
    sjau authored and Mic92 committed Feb 13, 2020
    Copy the full SHA
    e5d2585 View commit details

Commits on Mar 2, 2020

  1. Merge pull request #80008 from Mic92/fpu-backport

    [backport-19.09] zfs: 0.8.2 -> 0.8.3
    Mic92 authored Mar 2, 2020
    Copy the full SHA
    84f47bf View commit details
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From 1e010beda2896bdf3082fb37a3e49f8ce20e04d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 2 May 2019 05:28:08 +0100
Subject: [PATCH] x86/fpu: Export kernel_fpu_{begin,end}() with
EXPORT_SYMBOL_GPL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We need these symbols in zfs as the fpu implementation breaks userspace:

https://github.com/zfsonlinux/zfs/issues/9346
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
arch/x86/kernel/fpu/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 12c70840980e..352538b3bb5d 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -102,7 +102,7 @@ void kernel_fpu_begin(void)
}
__cpu_invalidate_fpregs_state();
}
-EXPORT_SYMBOL_GPL(kernel_fpu_begin);
+EXPORT_SYMBOL(kernel_fpu_begin);

void kernel_fpu_end(void)
{
@@ -111,7 +111,7 @@ void kernel_fpu_end(void)
this_cpu_write(in_kernel_fpu, false);
preempt_enable();
}
-EXPORT_SYMBOL_GPL(kernel_fpu_end);
+EXPORT_SYMBOL(kernel_fpu_end);

/*
* Save the FPU state (mark it for reload if necessary):
--
2.23.0

10 changes: 8 additions & 2 deletions pkgs/os-specific/linux/kernel/patches.nix
Original file line number Diff line number Diff line change
@@ -59,8 +59,14 @@
};

export_kernel_fpu_functions = {
name = "export_kernel_fpu_functions";
patch = ./export_kernel_fpu_functions.patch;
"4.14" = {
name = "export_kernel_fpu_functions";
patch = ./export_kernel_fpu_functions_4_14.patch;
};
"5.3" = {
name = "export_kernel_fpu_functions";
patch = ./export_kernel_fpu_functions_5_3.patch;
};
};

# patches from https://lkml.org/lkml/2019/7/15/1748
36 changes: 0 additions & 36 deletions pkgs/os-specific/linux/zfs/build-fixes-0.8.patch

This file was deleted.

43 changes: 30 additions & 13 deletions pkgs/os-specific/linux/zfs/default.nix
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
, libtirpc
, nfs-utils
, gawk, gnugrep, gnused, systemd
, smartmontools, sysstat, sudo

# Kernel dependencies
, kernel ? null
@@ -19,7 +20,7 @@ let

common = { version
, sha256
, extraPatches
, extraPatches ? []
, rev ? "zfs-${version}"
, isUnstable ? false
, incompatibleKernelVersion ? null }:
@@ -55,6 +56,22 @@ let
substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d"
substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc"
substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc"
substituteInPlace ./contrib/initramfs/hooks/Makefile.am \
--replace "/usr/share/initramfs-tools/hooks" "$out/usr/share/initramfs-tools/hooks"
substituteInPlace ./contrib/initramfs/Makefile.am \
--replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools"
substituteInPlace ./contrib/initramfs/scripts/Makefile.am \
--replace "/usr/share/initramfs-tools/scripts" "$out/usr/share/initramfs-tools/scripts"
substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \
--replace "/usr/share/initramfs-tools/scripts/local-top" "$out/usr/share/initramfs-tools/scripts/local-top"
substituteInPlace ./contrib/initramfs/scripts/Makefile.am \
--replace "/usr/share/initramfs-tools/scripts" "$out/usr/share/initramfs-tools/scripts"
substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \
--replace "/usr/share/initramfs-tools/scripts/local-top" "$out/usr/share/initramfs-tools/scripts/local-top"
substituteInPlace ./etc/systemd/system/Makefile.am \
--replace '$(DESTDIR)$(systemdunitdir)' "$out"'$(DESTDIR)$(systemdunitdir)'
substituteInPlace ./etc/systemd/system/zfs-share.service.in \
--replace "/bin/rm " "${coreutils}/bin/rm "
@@ -103,6 +120,7 @@ let
installFlags = [
"sysconfdir=\${out}/etc"
"DEFAULT_INITCONF_DIR=\${out}/default"
"INSTALL_MOD_PATH=\${out}"
];

postInstall = optionalString buildKernel ''
@@ -130,6 +148,13 @@ let
(cd $out/share/bash-completion/completions; ln -s zfs zpool)
'';

postFixup = ''
path="PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat sudo ]}"
for i in $out/libexec/zfs/zpool.d/*; do
sed -i "2i$path" $i
done
'';

outputs = [ "out" ] ++ optionals buildUser [ "lib" "dev" ];

meta = {
@@ -154,27 +179,19 @@ in {
# incompatibleKernelVersion = "4.20";

# this package should point to the latest release.
version = "0.8.2";

sha256 = "0miax0h2wg4b2kn8n93804faajy2n1sh25knyy2hg3k77nlr4pni";
version = "0.8.3";

extraPatches = [
./build-fixes-0.8.patch
];
sha256 = "0viql8rnqr32diapkpdsrwm6xj8vw5vi4dk2x2m7s7g0q2zdkahw";
};

zfsUnstable = common {
# comment/uncomment if breaking kernel versions are known
# incompatibleKernelVersion = "4.19";

# this package should point to a version / git revision compatible with the latest kernel release
version = "0.8.2";
version = "0.8.3";

sha256 = "0miax0h2wg4b2kn8n93804faajy2n1sh25knyy2hg3k77nlr4pni";
sha256 = "0viql8rnqr32diapkpdsrwm6xj8vw5vi4dk2x2m7s7g0q2zdkahw";
isUnstable = true;

extraPatches = [
./build-fixes-0.8.patch
];
};
}
9 changes: 6 additions & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -15762,21 +15762,24 @@ in
# when adding a new linux version
kernelPatches.cpu-cgroup-v2."4.11"
kernelPatches.modinst_arg_list_too_long
kernelPatches.export_kernel_fpu_functions
kernelPatches.export_kernel_fpu_functions."4.14"
];
};

linux_4_19 = callPackage ../os-specific/linux/kernel/linux-4.19.nix {
kernelPatches =
[ kernelPatches.bridge_stp_helper
kernelPatches.modinst_arg_list_too_long
kernelPatches.export_kernel_fpu_functions
kernelPatches.export_kernel_fpu_functions."4.14"
];
};

# Update this when adding the newest kernel major version!
linux_latest = callPackage ../os-specific/linux/kernel/linux-5.4.nix {
kernelPatches = [ kernelPatches.bridge_stp_helper ];
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.export_kernel_fpu_functions."5.3"
];
};

linux_testing = callPackage ../os-specific/linux/kernel/linux-testing.nix {