Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs: fix build with linux-rt #106534

Merged
merged 2 commits into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pkgs/os-specific/linux/kernel/export-rt-sched-migrate.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Export linux-rt (PREEMPT_RT) specific symbols needed by ZFS.
(Regular kernel provides them static inline in linux/preempt.h.)

--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1812 +1812 @@ void migrate_disable(void)
-EXPORT_SYMBOL_GPL(migrate_disable);
+EXPORT_SYMBOL(migrate_disable);
@@ -1843 +1843 @@ void migrate_enable(void)
-EXPORT_SYMBOL_GPL(migrate_enable);
+EXPORT_SYMBOL(migrate_enable);
5 changes: 5 additions & 0 deletions pkgs/os-specific/linux/kernel/patches.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
};
};

export-rt-sched-migrate = {
name = "export-rt-sched-migrate";
patch = ./export-rt-sched-migrate.patch;
};

# patches from https://lkml.org/lkml/2019/7/15/1748
mac_nvme_t2 = rec {
name = "mac_nvme_t2";
Expand Down
9 changes: 9 additions & 0 deletions pkgs/os-specific/linux/zfs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ let
maintainers = with maintainers; [ hmenke jcumming jonringer wizeman fpletz globin mic92 ];
};
};

linux-rt-patch = fetchpatch {
url = "https://github.com/openzfs/zfs/commit/ab4fb9b74e9d089fc9a261c4f41e19697ad6a4ca.patch";
sha256 = "1nrxmb4rhrkgncav6dzwm66l0700fi72qkkcs0w6pkm850srws36";
};
in {
# also check if kernel version constraints in
# ./nixos/modules/tasks/filesystems/zfs.nix needs
Expand All @@ -188,6 +193,8 @@ in {
version = "2.0.0";

sha256 = "1kriz6pg8wj98izvjc60wp23lgcp4k3mzhpkgj74np73rzgy6v8r";

extraPatches = [ linux-rt-patch ];
};

zfsUnstable = common {
Expand All @@ -198,5 +205,7 @@ in {
version = "2.0.0";

sha256 = "1kriz6pg8wj98izvjc60wp23lgcp4k3mzhpkgj74np73rzgy6v8r";

extraPatches = [ linux-rt-patch ];
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18363,6 +18363,7 @@ in
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
kernelPatches.export_kernel_fpu_functions."5.3"
kernelPatches.export-rt-sched-migrate
];
};

Expand Down