backport 5.3 zfs support to bionic for HWE kernel support

Bug #1856704 reported by Colin Ian King
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
spl-linux (Ubuntu)
Fix Released
High
Colin Ian King
Bionic
Fix Released
Undecided
Unassigned
zfs-linux (Ubuntu)
Fix Released
High
Colin Ian King
Bionic
Fix Released
Undecided
Unassigned

Bug Description

== SRU Justification Bionic ==

The HWE 5.3 kernel requires ZFS + SPL to support dkms module build functionality for kernels 4.15 through to 5.3. Basically, the ZFS+SPL compat commits between 4.15 and 5.3 are required to allow the modules to build on kernels upto and include the HWE 5.3 kernel.

== The Fix ==

Backport of upstream commits:

SPL:
    - 0002-fix-spl-build-shrinker-callback-check.patch
    - 0003-remove-deprecated-set-fs-pwd-check.patch
    - 0004-Linux-4.18-compat-inode-timespec-timespec64.patch
    - 0005-Linux-4.20-compat-current_kernel_time.patch
    - 0006-Linux-4.18-compat-Use-ktime_get_coarse_real_ts64.patch
    - 0007-Linux-5.0-compat-Use-totalram_pages.patch
    - 0008-Linux-5.0-compat-Fix-SUBDIRs.patch
    - 0009-Linux-4.20-compat-Fix-VERIFY-RW_READ_HELD-hash-mh_co.patch
    - 0010-Linux-5.1-compat-get_ds-removed.patch
    - 0011-Linux-5.0-compat-Use-totalhigh_pages.patch
    - 0012-Linux-5.2-compat-rw_tryupgrade.patch
    - 0013-Linux-5.3-compat-rw_semaphore-owner.patch
    - 0014-Linux-5.3-compat-retire-rw_tryupgrade.patch
    - 0015-Linux-5.3-compat-Makefile-subdir-m-no-longer-support.patch
    - 0016-Linux-compat-4.16-SECTOR_SIZE.patch
    - 0017-Linux-compat-spl-timespec_sub.patch
    - 0018-deprecate-splat-rwlock-test6.patch

ZFS:
    - 3300-Linux-4.16-compat-inode_set_iversion.patch
    - 3301-Linux-4.16-compat-use-correct-_dec_and_test.patch
    - 3302-Linux-4.16-compat-get_disk_and_module.patch
    - 3303-Linux-compat-4.16-blk_queue_flag_-set-clear.patch
    - 3304-Linux-4.18-compat-inode-timespec-timespec64.patch
    - 3305-Linux-4.14-compat-blk_queue_stackable.patch
    - 3306-Linux-4.19-rc3-compat-Remove-refcount_t-compat.patch
    - 3307-Linux-5.0-compat-access_ok-drops-type-parameter.patch
    - 3308-Linux-5.0-compat-Use-totalram_pages.patch
    - 3309-Linux-5.0-compat-Convert-MS_-macros-to-SB_.patch
    - 3310-Linux-5.0-compat-Fix-SUBDIRs.patch
    - 3311-Linux-5.0-compat-Disable-vector-instructions-on-5.0-.patch
    - 3312-Linux-5.0-compat-Fix-bio_set_dev.patch
    - 3313-Linux-5.0-compat-Remove-incorrect-ASSERT.patch
    - 3314-Linux-5.0-compat-Use-totalhigh_pages.patch
    - 3315-Linux-5.0-compat-ASM_BUG-macro.patch
    - 3316-Linux-5.2-compat-rw_tryupgrade.patch
    - 3317-Linux-5.2-compat-Directly-call-wait_on_page_bit.patch
    - 3318-Linux-5.3-compat-Makefile-subdir-m-no-longer-support.patch
    - 3319-Linux-5.3-Fix-switch-fall-though-compiler-errors.patch
    - 3320-zpios-deprecate-current-kernel-time.patch
    - 3321-add-compat-check-disk-size-change.patch

== Testcase ==

Without these commits users who install kernels and kernel headers from 4.16 through to 5.3 inclusive won't be able to build spl + zfs in Bionic because of the lack of the kernel compat fixes. With the commits, zfs + spl dkms modules can build cleanly and pass the ubuntu ZFS regression tests found in the kernel team autotests git repository.

== Risk ==

This is a sizeable backport that touches a fair amount of spl + zfs kernel interfacing code. There is a risk that the backport may cause a regression in functionality that has not been exercised by the ZFS regression tests. This backport with the zfs regression testing ensures that no regression in core zfs functionality has been found. It must be noted that most of the patches are upstream compat fixes that are known to be working with the latest ZFS that is being used in focal, so we are confident the original compat changes work.

Note that these updates have all been build tested on x86-64, arm64 and s390x systems with kernels from 4.16 to 5.3 and regression tested with the ubuntu zfs regression tests.

Changed in spl-linux (Ubuntu):
assignee: nobody → Colin Ian King (colin-king)
Changed in zfs-linux (Ubuntu):
assignee: nobody → Colin Ian King (colin-king)
Changed in spl-linux (Ubuntu):
status: New → Incomplete
importance: Undecided → High
Changed in zfs-linux (Ubuntu):
importance: Undecided → High
Changed in spl-linux (Ubuntu):
status: Incomplete → In Progress
Changed in zfs-linux (Ubuntu):
status: New → In Progress
Changed in zfs-linux (Ubuntu Bionic):
status: New → In Progress
Changed in spl-linux (Ubuntu Bionic):
status: New → In Progress
Changed in spl-linux (Ubuntu):
status: In Progress → Fix Committed
Changed in spl-linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Changed in zfs-linux (Ubuntu):
status: In Progress → Fix Committed
Changed in zfs-linux (Ubuntu Bionic):
status: In Progress → Fix Committed
description: updated
Revision history for this message
James Dingwall (a-james-launchpad) wrote :

Apologies if this isn't the place to ask this question... This bug seems to be only about backporting compatibilty for the current 0.7 module but my system seems to have ended up with 0.8. This isn't a problem for me but I would prefer that the userspace aligns with the module so that new features (trim, encryption) can be used/configured.

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

# uname -a
Linux triplex 5.3.0-26-generic #28~18.04.1-Ubuntu SMP Wed Dec 18 16:40:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

# dpkg -S /lib/modules/5.3.0-26-generic/kernel/zfs/zfs.ko
linux-modules-5.3.0-26-generic: /lib/modules/5.3.0-26-generic/kernel/zfs/zfs.ko

# modinfo zfs | head
filename: /lib/modules/5.3.0-26-generic/kernel/zfs/zfs.ko
version: 0.8.1-1ubuntu14.2
license: CDDL
author: OpenZFS on Linux
description: ZFS
alias: devname:zfs
alias: char-major-10-249
srcversion: 7E9D1C5487A61F836F4A216
depends: zlua,spl,znvpair,zcommon,icp,zunicode,zavl
retpoline: Y

# apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.7.5-1ubuntu16.7
  Candidate: 0.7.5-1ubuntu16.7
  Version table:
 *** 0.7.5-1ubuntu16.7 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.7.5-1ubuntu15 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

# apt-cache policy zfs-dkms
zfs-dkms:
  Installed: (none)
  Candidate: 0.7.5-1ubuntu16.7
  Version table:
     0.7.5-1ubuntu16.7 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
     0.7.5-1ubuntu15 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

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

@ubuntu stable folks - can this be uploaded sometime soon?

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Colin, or anyone else affected,

Accepted zfs-linux into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/zfs-linux/0.7.5-1ubuntu16.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Colin, or anyone else affected,

Accepted spl-linux into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/spl-linux/0.7.5-1ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (zfs-linux/0.7.5-1ubuntu16.8)

All autopkgtests for the newly accepted zfs-linux (0.7.5-1ubuntu16.8) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

lxd/3.0.3-0ubuntu1~18.04.1 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#zfs-linux

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

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

Tested these updates with the kernel team ZFS autotest regression tests on the following architectures:

arm64 - PASSED
amd64 - PASSED
s390x - PASSED
ppc64el - PASSED

I re-ran the failed lxd test as referenced in comment #5 and it passed, so I believe the original failure was an artifact of the test system and not with ZFS per se.

tags: added: verification-done-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package zfs-linux - 0.7.5-1ubuntu16.8

---------------
zfs-linux (0.7.5-1ubuntu16.8) bionic; urgency=medium

  * Backport Linux compat fixes to allow ZFS to build
    on kernels up to 5.3 (LP: #1856704)
    - 3300-Linux-4.16-compat-inode_set_iversion.patch
    - 3301-Linux-4.16-compat-use-correct-_dec_and_test.patch
    - 3302-Linux-4.16-compat-get_disk_and_module.patch
    - 3303-Linux-compat-4.16-blk_queue_flag_-set-clear.patch
    - 3304-Linux-4.18-compat-inode-timespec-timespec64.patch
    - 3305-Linux-4.14-compat-blk_queue_stackable.patch
    - 3306-Linux-4.19-rc3-compat-Remove-refcount_t-compat.patch
    - 3307-Linux-5.0-compat-access_ok-drops-type-parameter.patch
    - 3308-Linux-5.0-compat-Use-totalram_pages.patch
    - 3309-Linux-5.0-compat-Convert-MS_-macros-to-SB_.patch
    - 3310-Linux-5.0-compat-Fix-SUBDIRs.patch
    - 3311-Linux-5.0-compat-Disable-vector-instructions-on-5.0-.patch
    - 3312-Linux-5.0-compat-Fix-bio_set_dev.patch
    - 3313-Linux-5.0-compat-Remove-incorrect-ASSERT.patch
    - 3314-Linux-5.0-compat-Use-totalhigh_pages.patch
    - 3315-Linux-5.0-compat-ASM_BUG-macro.patch
    - 3316-Linux-5.2-compat-rw_tryupgrade.patch
    - 3317-Linux-5.2-compat-Directly-call-wait_on_page_bit.patch
    - 3318-Linux-5.3-compat-Makefile-subdir-m-no-longer-support.patch
    - 3319-Linux-5.3-Fix-switch-fall-though-compiler-errors.patch
    - 3320-zpios-deprecate-current-kernel-time.patch
    - 3321-add-compat-check-disk-size-change.patch

 -- Colin Ian King <email address hidden> Thu, 17 Dec 2019 14:15:16 +0000

Changed in zfs-linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for spl-linux has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package spl-linux - 0.7.5-1ubuntu2.1

---------------
spl-linux (0.7.5-1ubuntu2.1) bionic; urgency=medium

  * Backport Linux compat fixes to allow SPL to build
    on kernels up to 5.3 (LP: #1856704)
    - 0002-fix-spl-build-shrinker-callback-check.patch
    - 0003-remove-deprecated-set-fs-pwd-check.patch
    - 0004-Linux-4.18-compat-inode-timespec-timespec64.patch
    - 0005-Linux-4.20-compat-current_kernel_time.patch
    - 0006-Linux-4.18-compat-Use-ktime_get_coarse_real_ts64.patch
    - 0007-Linux-5.0-compat-Use-totalram_pages.patch
    - 0008-Linux-5.0-compat-Fix-SUBDIRs.patch
    - 0009-Linux-4.20-compat-Fix-VERIFY-RW_READ_HELD-hash-mh_co.patch
    - 0010-Linux-5.1-compat-get_ds-removed.patch
    - 0011-Linux-5.0-compat-Use-totalhigh_pages.patch
    - 0012-Linux-5.2-compat-rw_tryupgrade.patch
    - 0013-Linux-5.3-compat-rw_semaphore-owner.patch
    - 0014-Linux-5.3-compat-retire-rw_tryupgrade.patch
    - 0015-Linux-5.3-compat-Makefile-subdir-m-no-longer-support.patch
    - 0016-Linux-compat-4.16-SECTOR_SIZE.patch
    - 0017-Linux-compat-spl-timespec_sub.patch
    - 0018-deprecate-splat-rwlock-test6.patch

 -- Colin Ian King <email address hidden> Wed, 11 Dec 2019 17:41:23 +0000

Changed in spl-linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in zfs-linux (Ubuntu):
status: Fix Committed → Fix Released
Changed in spl-linux (Ubuntu):
status: Fix Committed → 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.