Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 728104 - sys-fs/zfs-kmod-0.8.4 can be built with Linux kernel 5.7 series although ebuild limits to 5.6 kernel series only
Summary: sys-fs/zfs-kmod-0.8.4 can be built with Linux kernel 5.7 series although ebui...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-13 02:27 UTC by Adrien Dessemond
Modified: 2020-10-16 17:36 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Dessemond 2020-06-13 02:27:20 UTC
The release notes (https://github.com/openzfs/zfs/releases/tag/zfs-0.8.4) states that the code has some changes for Linux 5.7 as well although the kernel compatibility is 2.6.32-5.6. My Gentoo system here now runs under Linux 5.7.2 and sys-fs/zfs-kmod-0.8.4 (I just changed the latest supported kernel version) no issues.
Comment 1 Georgy Yakovlev archtester gentoo-dev 2020-06-13 03:20:08 UTC
ebuild set's what is set in META file for release
https://github.com/openzfs/zfs/blob/6b18d7df3772cffa6469b00866d7eae585b912ae/META

on rare occasions we can disregard it, but it's the source of truth for ebuild on release.
@ryao might provide more insight, I think he wanted to test compat and bump it if everything is ok, but it has not happened yet.



BTW:
not sure if you use it,

we provide special magical variable for zfs-kmod package

if you for example

export ZFS_KERNEL_COMPAT_OVERRIDE=5.7

and emerge it, you don't have to edit the ebuild by hand.

to save it permanently, you have to do something like this:

> mkdir -p /etc/portage/env/sys-fs
> echo 'export ZFS_KERNEL_COMPAT_OVERRIDE=5.7' >> /etc/portage/env/sys-fs/zfs-kmod-0.8.4'


of course it voids the warranty =)
Comment 2 Adrien Dessemond 2020-06-13 13:02:05 UTC
No I was not using it. Suggestion: put an elog at this subject?
Comment 3 Leonid Kopylov 2020-08-22 06:57:04 UTC
I have this issue with 5.8 kernel - should it support it?
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-08-22 09:39:40 UTC
no.
but you can use 9999 ebuild if you really want linux-5.8
Comment 5 devsk 2020-08-24 06:15:29 UTC
@ryao: any ideas when a version with support for 5.8 be released? I get this error with 5.8.3:

/var/tmp/portage/sys-fs/zfs-kmod-0.8.4-r1/work/zfs-0.8.4/module/spl/spl-kmem.c: In function 'spl_kmem_alloc_impl':
/var/tmp/portage/sys-fs/zfs-kmod-0.8.4-r1/work/zfs-0.8.4/module/spl/spl-kmem.c:183:11: error: too many arguments to function '__vmalloc'
  183 |     ptr = __vmalloc(size, lflags | __GFP_HIGHMEM,
      |           ^~~~~~~~~
In file included from /var/tmp/portage/sys-fs/zfs-kmod-0.8.4-r1/work/zfs-0.8.4/include/spl/sys/vmem.h:30,
                 from /var/tmp/portage/sys-fs/zfs-kmod-0.8.4-r1/work/zfs-0.8.4/module/spl/spl-kmem.c:28:
./include/linux/vmalloc.h:111:14: note: declared here
  111 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask);
      |              ^~~~~~~~~
make[5]: *** [scripts/Makefile.build:281: /var/tmp/portage/sys-fs/zfs-kmod-0.8.4-r1/work/zfs-0.8.4/module/spl/spl-kmem.o] Error 1
Comment 6 Adrien Dessemond 2020-08-25 00:48:50 UTC
The vmalloc issue had been spotted and the code has been merged on Jun 8th, 2020, see =>`https://github.com/openzfs/zfs/pull/10422

Also another issue has been reported for Linux 5.8.x :

https://github.com/openzfs/zfs/issues/10533
Comment 7 Georgy Yakovlev archtester gentoo-dev 2020-08-25 02:10:24 UTC
if you want to try - you can use this patch

https://aur.archlinux.org/cgit/aur.git/plain/linux-5.8-compat-__vmalloc.patch?h=zfs-linux


place it to:

> /etc/portage/patches/sys-fs/zfs-kmod-0.8.4-r1/linux-5.8-compat-__vmalloc.patch


also you'll need to define post_src_prepare() function for ebuild which runs eautoreconf.


for example

> mkdir /etc/portage/env/sys-fs
> echo 'export ZFS_KERNEL_COMPAT_OVERRIDE=5.8' > /etc/portage/env/sys-fs/zfs-kmod-0.8.4-r1
> echo 'post_src_prepare() { eautoreconf ; }' >> /etc/portage/env/sys-fs/zfs-kmod-0.8.4-r1


after that

> emerge --oneshot =sys-fs/zfs-kmod-0.8.4-r1

probably will produce a working build =)

but all warranty is void. make backups.

or just wait a bit, 0.8.5 should be out soon-ish.
Comment 8 Larry the Git Cow gentoo-dev 2020-08-25 22:30:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e911c5f26d1ed8ca53b8e829560b458bf34cff7

commit 1e911c5f26d1ed8ca53b8e829560b458bf34cff7
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-08-25 22:26:59 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-08-25 22:27:56 +0000

    sys-fs/zfs: bump to 2.0.0-rc1
    
    Bug: https://bugs.gentoo.org/728104
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs/Manifest             |   1 +
 sys-fs/zfs/zfs-2.0.0_rc1.ebuild | 217 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 218 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0ca3696c21a7eb7878b11e8b043ee1ed0bc5d1

commit 4c0ca3696c21a7eb7878b11e8b043ee1ed0bc5d1
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-08-25 22:19:31 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-08-25 22:27:50 +0000

    sys-fs/zfs-kmod: bump to 2.0.0-rc1
    
    Bug: https://bugs.gentoo.org/728104
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs-kmod/Manifest                  |   1 +
 sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild | 172 ++++++++++++++++++++++++++++++
 2 files changed, 173 insertions(+)
Comment 9 Georgy Yakovlev archtester gentoo-dev 2020-08-25 22:30:22 UTC
2.0.0-rc1 available as well (experimental, please make backups) and is compatible with 5.8 kernels.
Comment 10 Georgy Yakovlev archtester gentoo-dev 2020-10-07 00:04:20 UTC
zfs-0.8.5 just landed, it should be compatible with 5.8 kernels and probably 5.9 as well, once it's out, but for now ebuild enforces 5.8, subject to change.


I'm closing this, will try to stabilize 0.8.5 sooner than 30 days, it's mostly bugfix/compat release anyway.
Comment 11 Larry the Git Cow gentoo-dev 2020-10-16 17:36:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b7c6afa3c7f4162ccdb21a1013bc02785c1319d

commit 0b7c6afa3c7f4162ccdb21a1013bc02785c1319d
Author:     Jonathan Davies <jpds@protonmail.com>
AuthorDate: 2020-10-16 16:44:02 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-10-16 17:35:33 +0000

    sys-fs/zfs-kmod: 0.8.5: Marked compatiable with 5.9 kernels.
    
    Bug: https://bugs.gentoo.org/728104
    Signed-off-by: Jonathan Davies <jpds@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/17950
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs-kmod/zfs-kmod-0.8.5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)