Genkernel fails when rebuilding the ZFS kernel modules with a 6.2.8 Linux kernel: (...) make -f ./scripts/Makefile.modpost scripts/mod/modpost -o /var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9/module/Module.symvers -n -T /var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9/module/modules.order -i Module.symvers -e ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'bio_start_io_acct' ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'bio_end_io_acct_remapped' make[4]: *** [scripts/Makefile.modpost:138: /var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9/module/Module.symvers] Error 1 make[3]: *** [Makefile:1973: modpost] Error 2 make[2]: *** [Makefile:55: modules-Linux] Error 2 make[2]: Leaving directory '/var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9/module' make[1]: *** [Makefile:933: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9' make: *** [Makefile:794: all] Error 2 * ERROR: sys-fs/zfs-kmod-2.1.9::gentoo failed (compile phase): * emake failed The root cause is a backport from Linux 6.3-RC3 which breaks the kernel API. See the linked upstream bug. Also discussed in Gentoo bug #902821.
A working solution exists here => https://github.com/CachyOS/zfs/commit/00e580bca282bf30913fcf5832fc58191cf0ff32?diff=unified So far no issues while running with Linux 6.2.8 + ZFS 2.1.9 :) Will post the individual patches in comments below.
Created attachment 859039 [details, diff] config/kernel-generic_io_acct.m4 patched for Linux 6.2.8 compatibility
Created attachment 859041 [details, diff] blkdev_compat.h patched for Linux 6.2.8 compatibility
Created attachment 859043 [details, diff] All-in-one version of the previously patches
we don't officially support 6.2 with our ebuild. or policy is to strictly adhere to META/release notes supported release to avoid confusion and backport only exceptional patches/cases, like when between kernel releases when old is kernel is gone and new is broken to prevent kernel downgrades. users are free to specify ZFS_KERNEL_COMPAT_OVERRIDE=6.2 and patch it for newer kernel compat. this will work with gentoo-sources and dist-kernel patch is staged for 2.1.10 https://github.com/openzfs/zfs/pull/14677
Linux 6.2 kernel series have been removed several weeks ago. Issue is obsolete.