zfs-dkms will not compile on kernel 5.6rc1

Bug #1863136 reported by satmandu
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Fix Released
Medium
Colin Ian King

Bug Description

Bug mentioned here: https://github.com/zfsonlinux/zfs/issues/10001

Patch for zfs master branch here: https://github.com/zfsonlinux/zfs/pull/9961

Patch modified for zfs-dkms_0.8.3-1ubuntu3 here: https://paste.ubuntu.com/p/wsS9GFHjyv/

This is working for me in getting a 5.5.x kernel to access zpools on arm64 and 5.5.2 mainline & 5.6rc1 mainline kernels to access zpools on amd64.

Tags: patch
Revision history for this message
satmandu (satadru-umich) wrote :
Revision history for this message
satmandu (satadru-umich) wrote :

(after patching source I had to run ./autogen.sh in the module folder.)

Revision history for this message
Colin Ian King (colin-king) wrote :

Thanks for confirming that 5.6-rc1 won't yet build with the zfd-dkms. I will roll in all the necessary compat fixes required for 5.5 and 5.6 to build once we get to a later release candidate of the kernel to avoid the extra uploading and regression testing that we run before making a release.

Changed in zfs-linux (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Colin Ian King (colin-king)
status: In Progress → Confirmed
Revision history for this message
satmandu (satadru-umich) wrote :

Thanks. As I understand it there are no new changes needed for 5.5 support though, aside from modifying the META file and rerunning ./autogen.sh.

I've been running with just such changes on arm64 and amd64 (literally sed -i 's/5.4/5.5/' META) with focal builds and 5.5 kernels for a bit now with no issues.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "zfs-dkms-0.8.3-kernel-5.6.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Colin Ian King (colin-king) wrote :

Unfortunately we require some more 5.6 compat fixes as 5.6-rc3 fails to build with the current 2 compat upstream fixes:

make[3]: Entering directory '/usr/src/linux-headers-5.6.0-050600rc3-generic'
  CC [M] /var/lib/dkms/zfs/0.8.3/build/module/avl/avl.o
  CC [M] /var/lib/dkms/zfs/0.8.3/build/module/icp/illumos-crypto.o
  LD [M] /var/lib/dkms/zfs/0.8.3/build/module/avl/zavl.o
  CC [M] /var/lib/dkms/zfs/0.8.3/build/module/lua/lapi.o
In file included from /var/lib/dkms/zfs/0.8.3/build/include/spl/sys/condvar.h:33,
                 from /var/lib/dkms/zfs/0.8.3/build/include/sys/zfs_context.h:38,
                 from /var/lib/dkms/zfs/0.8.3/build/include/sys/crypto/common.h:39,
                 from /var/lib/dkms/zfs/0.8.3/build/module/icp/illumos-crypto.c:35:
/var/lib/dkms/zfs/0.8.3/build/include/spl/sys/time.h:88:15: error: unknown type name ‘time_t’
   88 | static inline time_t
      | ^~~~~~
/var/lib/dkms/zfs/0.8.3/build/include/spl/sys/time.h: In function ‘gethrtime’:
/var/lib/dkms/zfs/0.8.3/build/include/spl/sys/time.h:108:18: error: storage size of ‘ts’ isn’t known
  108 | struct timespec ts;
      | ^~
/var/lib/dkms/zfs/0.8.3/build/include/spl/sys/time.h:109:2: error: implicit declaration of function ‘getrawmonotonic’ [-Werror=implicit-function-declaration]
  109 | getrawmonotonic(&ts);
      | ^~~~~~~~~~~~~~~
/var/lib/dkms/zfs/0.8.3/build/include/spl/sys/time.h:108:18: warning: unused variable ‘ts’ [-Wunused-variable]
  108 | struct timespec ts;
      | ^~
cc1: some warnings being treated as errors

I'll revisit this once the appropriate 5.6 compat fixes have landed.

Changed in zfs-linux (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
satmandu (satadru-umich) wrote :
Revision history for this message
satmandu (satadru-umich) wrote :

Patch updated for 5.6rc3: https://gist.github.com/satmandu/67cbae9c4d461be0e64428a1707aef1c

Adapted from zfs PR PR #9961 & #10064
https://github.com/openzfs/zfs/pull/9961
https://github.com/openzfs/zfs/pull/10064

$ dkms status
zfs, 0.8.3, 5.6.0-050600rc2-generic, x86_64: installed
zfs, 0.8.3, 5.6.0-050600rc3-generic, x86_64: installed

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 0.8.3-1ubuntu6

---------------
zfs-linux (0.8.3-1ubuntu6) focal; urgency=medium

  * Add 5.6 compat fixes (LP: #1863136)
    - Backport 4 upstream zfs fixes that allow zfs to build on Linux 5.6:
    - 2c3a83701dd1 ("Linux 5.6 compat: time_t")
    - 0dd73648532e ("Linux 5.6 compat: struct proc_ops")
    - 795699a6cc28 ("Linux 5.6 compat: timestamp_truncate()")
    - ff5587d65137 ("Linux 5.6 compat: ktime_get_raw_ts64()")

 -- Colin Ian King <email address hidden> Fri, 28 Feb 2020 13:55:15 +0000

Changed in zfs-linux (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.