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

Linux 6 compatibility in and tracking discussion of the 2.1.7 patchset #14024

Closed
almereyda opened this issue Oct 12, 2022 · 14 comments
Closed

Linux 6 compatibility in and tracking discussion of the 2.1.7 patchset #14024

almereyda opened this issue Oct 12, 2022 · 14 comments
Labels
Type: Feature Feature request or new feature

Comments

@almereyda
Copy link

Describe the feature would like to see added to OpenZFS

I would like to see the META file increase the Linux version to 6, in order to allow for builds against newer Kernels.

How will this feature improve OpenZFS?

This will allow to build in rolling release and fast-paced distributions, such as Gentoo, Arch Linux, NixOS or Fedora.

Additional context

It has previously been suggested to already open a tracking PR for the zfs-2.1.7-staging branch:

It was previously stated that LInux 6 compatibility is already present in zfs-2.1.6-staging, but not thoroughly tested:

A PR for tracking the status of the zfs-2.1.7-staging branch has the advantage over merely comparing the branch against master, that discussions can be held and further code review employed.

@almereyda almereyda added the Type: Feature Feature request or new feature label Oct 12, 2022
@almereyda almereyda mentioned this issue Oct 12, 2022
13 tasks
@lvd2
Copy link

lvd2 commented Oct 25, 2022

The situation is quite disappointing actually, and that's not for the first (and even not for the second!) time. Now I'm left with 2.1.6 and EOLed 5.19 kernel in gentoo. As it is not known which kernel version would become the next LTS, I have no other realistic option except for downgrading to 5.15.

@DerVerruckteFuchs
Copy link

@lvd2 While it is not 100% percent certain, 6.1 is likely to be the next LTS kernel. Though that is assuming nothing unexpected happens during Linux development and testing.

@toastal
Copy link

toastal commented Oct 26, 2022

@lvd2 at least you have the option of downgrading--my laptop won't work prior to 5.17 or 18 (and has severe bugs < 5.19). I'm hoping nixpkgs holds onto the kernel a little longer than normal.

@behlendorf
Copy link
Contributor

The version in the META file represents latest kernel which we have tested. Fast moving downstream distributions, and end users building from source, are always welcome to perform their own testing and bump that max version as they see fit. What we want to avoid is misleading anyone about what has, and has not, been tested by the developers.

@almereyda
Copy link
Author

On a Fedora 36 machine, with the 2.1.6 sources installed to /usr/src/zfs-2.1.6/ through dnf download --source zfs and rpm -ivh zfs-2.1.6-1.fc36.src.rpm, the build succeeded on their recent Linux 6 kernel with patching META to 6 and installing the DKMS module manually:

$ sed -i 's/Linux-Maximum: 5.19/Linux-Maximum: 6.00/g' /usr/src/zfs-2.1.6/META
$ dkms install zfs/2.1.6
$ modprobe zfs
$ zfs version
zfs-2.1.6-1
zfs-kmod-2.1.6-1
$ uname -r
6.0.5-200.fc36.x86_64

@Marietto2008
Copy link

Marietto2008 commented Oct 31, 2022

Can someone help me,too ? I've tried several methods and actually I'm confused. I'm on Ubuntu 22.10 kinetic with the "6.0.0-6.1-liquorix-amd64" kernel. I tried to repeat your commands,but in my case it didn't work. Can you give a look at the log below ? thanks.

https://pastebin.ubuntu.com/p/KwgByTtNpr/

this is the META file located inside the folder /usr/src/zfs-2.1.99 :

Meta:          1
Name:          zfs
Branch:        1.0
Version:       2.1.99
Release:       1521_gb37d495e0
Release-Tags:  relext
License:       CDDL
Author:        OpenZFS
Linux-Maximum: 6.0
Linux-Minimum: 3.10

on /usr/src I have another folder,called zfs-2.1.6 and inside of it there is only one file,called META6,that has this content inside

Meta:          1
Name:          zfs
Branch:        1.0
Version:       2.1.6
Release:      0york1~22.04
Release-Tags:  relext
License:       CDDL
Author:        OpenZFS
Linux-Maximum: 6.0
Linux-Minimum: 3.10

this is what happens if I try to build the DKMS module for zfs 2.1.6 :

dkms install zfs/2.1.6
Sign command: /usr/lib/linux-kbuild-6.0.0-6/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Binary kmod-sign not found, modules won't be signed
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/zfs/2.1.6/source/dkms.conf does not exist.

@bit2shift
Copy link

On a Fedora 36 machine, with the 2.1.6 sources installed to /usr/src/zfs-2.1.6/ through dnf download --source zfs and rpm -ivh zfs-2.1.6-1.fc36.src.rpm, the build succeeded on their recent Linux 6 kernel with patching META to 6 and installing the DKMS module manually:

@almereyda I think you don't need to patch META.
Today I installed 6.0.5-200.fc36.x86_64 on my main rig (also Fedora 36) just by doing a bog-standard update with sudo dnf upgrade and zfs got built without any issues, just like with previous 5.19 kernel releases.
(Not yet rebooted into the newer kernel, so not tested yet)

$ cat /usr/src/zfs-2.1.6/META 
Meta:          1
Name:          zfs
Branch:        1.0
Version:       2.1.6
Release:      1
Release-Tags:  relext
License:       CDDL
Author:        OpenZFS
Linux-Maximum: 5.19
Linux-Minimum: 3.10
$ dkms status
zfs/2.1.6, 5.19.16-200.fc36.x86_64, x86_64: installed
zfs/2.1.6, 6.0.5-200.fc36.x86_64, x86_64: installed

@Marietto2008
Copy link

Marietto2008 commented Oct 31, 2022 via email

@almereyda
Copy link
Author

@szubersk
Copy link
Contributor

szubersk commented Nov 6, 2022

@Marietto2008 OpenZFS sources are incorrectly installed in your case.

Please try fetching sources from git (the master branch), build deb-dkms source package and install it. dkms will compile the kernel module correctly.

./autogen.sh
./configure --prefix=/usr --with-config=srpm
make -j8 deb-dkms
sudo dpkg -i zfs-dkms*.deb
sudo dkms install -m zfs/2.1.99 -k 6.0.0-7.1-liquorix-amd64

Results:

config.status: executing libtool commands
config.status: executing po-directories commands

Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.0.0-7.1-liquorix-amd64........................................

Running the post_build script:
Cleaning build area...

zfs.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.0.0-7.1-liquorix-amd64/updates/dkms/

spl.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.0.0-7.1-liquorix-amd64/updates/dkms/
depmod...

@GerMalaz
Copy link

GerMalaz commented Nov 6, 2022

There is an issue with linux-6.1

In /usr/src/linux-headers-6.1.0-0-common/include/linux/memory_hotplug.h this function was added:

static inline void pgdat_kswapd_lock_init(pg_data_t *pgdat) { mutex_init(&pgdat->kswapd_lock); }

It clashes with:
/var/lib/dkms/zfs/2.1.6/build/include/os/linux/spl/sys/mutex.h:99:
99 | #define mutex_init(mp, name, type, ibc)

@thesamesam
Copy link
Contributor

thesamesam commented Nov 7, 2022

There is an issue with linux-6.1

In /usr/src/linux-headers-6.1.0-0-common/include/linux/memory_hotplug.h this function was added:

static inline void pgdat_kswapd_lock_init(pg_data_t *pgdat) { mutex_init(&pgdat->kswapd_lock); }

It clashes with: /var/lib/dkms/zfs/2.1.6/build/include/os/linux/spl/sys/mutex.h:99: 99 | #define mutex_init(mp, name, type, ibc)

Please confirm which commit you built at, as 212ba9b should fix that. Note that 2.1.6 won't work, you need to build from 2.1.7-staging.

jakubgs added a commit to jakubgs/nixos-config that referenced this issue Nov 20, 2022
The 6.0 kernel is not yet compatible with ZFS:
openzfs/zfs#14024

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@almereyda
Copy link
Author

is now here and on a good run to being completed fairly soon.

@almereyda
Copy link
Author

This has long been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

10 participants