backport upstream fixes for 5.9 Linux support

Bug #1899826 reported by Colin Ian King
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Fix Released
Medium
Colin Ian King
Groovy
Won't Fix
Undecided
Unassigned
Hirsute
Fix Released
Medium
Colin Ian King

Bug Description

== SRU Request Groovy ==

Upstream zfs supports 5.9. it would be useful to backport these for users who want newer kernels.

== The Fix ==

Although 6 fixes are required, 2 add changes that get removed by a later change, so one can backport this with just the following 4 changes:

1823c8fe6a4a20971463e9b51615dad412aea9a9 ("Linux 5.9 compat: add linux/blkdev.h include")
3e29e1971bbb4ab63dafeb592b747ef56bad3534 ("Linux 5.9 compat: NR_SLAB_RECLAIMABLE")
d817c17100183b266aa6bf8b868e016805d51d16 ("Linux 5.9 compat: make_request_fn replaced with submit_bio")
4b59c195ffbaebfdd5f0971a54613c0ed7c42005 ("Increase Supported Linux Kernel to 5.9")

== Regression potential ==

The first patch just includes blkdev.h to workaround a build warning, so the results in no functional change to the working code.

The second patch removes legacy arc page free estimation by droping the accounting for inactive anonymous pages and reclaimable pages on the slab. This change removes a very minor component of the free memory calculation and speeds up arc free stats calculations. There is a potential that this small change in free page calculation may impact systems where memory is more constrained, but the change is so small I believe this really is insignificant.

The third patch is a build time detection of the kernel block allocation queue due to API changes, so should not change behaviour for current 5.8 kernels, only change behaviour for newer kernels with the newer kernel API. Hence for the released 5.8 groovy kernel the code will not be changed, so the regression potential for 5.8 is zero.

The final patch changes the META build data to allow the driver to build on newer kernels, so the risk on this change is effectively zero.

== Testing ==

Run the autotest client tests for ZFS tests:
  ubuntu_zfs_smoke_tests (general functionality smoke tests)
  ubuntu_zfs_fstests (file system semantics tests)
  ubuntu_zfs_xfs_generic (subset of XFS tests on ZFS)
  ubuntu_zfs_stress (stress-ng file system tests on a wide range of ZFS mount options)

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

This bug was fixed in the package zfs-linux - 0.8.4-1ubuntu13

---------------
zfs-linux (0.8.4-1ubuntu13) hirsute; urgency=medium

  * Add Linux 5.9 compat fixes (LP: #1899826)
    - 4800-Linux-5.9-compat-add-linux-blkdev.h-include.patch
      include blkdev.h in various sources
    - 4801-Linux-5.9-compat-NR_SLAB_RECLAIMABLE.patch
      deprecate some older page free stats for arc free page calculation
    - 4802-Linux-5.9-compat-make_request_fn-replaced-with-submi.patch
      API change for block allocation
    - 4805-Increase-Supported-Linux-Kernel-to-5.9.patch
      allows driver to be built against 5.9
  * Add Linux 5.10 compat fixes
    - 4710-Use-percpu_counter-for-obj_alloc-counter-of-Linux-ba.patch
      prerequisite for 4804-Linux-5.10-compat-frame.h-renamed-objtool.h.patch
    - 4720-Linux-5.7-compat-Include-linux-sched.h-in-spl-sys-mu.patch
      prerequisite for next set of patches
    - 4804-Linux-5.10-compat-frame.h-renamed-objtool.h.patch
      rename check of linux/frame.h to linux/frame.h
    - 4805-Linux-5.10-compat-percpu_ref-added-data-member.patch
      API check to the percpu_ref structure
    - 4806-Linux-5.10-compat-check_disk_change-removed.patch
      check_disk_change removed, functionality moved to zfs_check_media_change
    - 4807-Linux-5.10-compat-revalidate_disk_size-added.patch
      use revalidate_disk_size where necessary

 -- Colin Ian King <email address hidden> Tue, 3 Nov 2020 12:22:22 +0000

Changed in zfs-linux (Ubuntu Hirsute):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zfs-linux (Ubuntu Groovy):
status: New → Confirmed
Revision history for this message
Trent Lloyd (lathiat) wrote :

Accidentally posted the above comment in the wrong bug, sorry, was meant for https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1906476 - where I suspect this bug as having caused a regression.

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

This backport for Hirsute will soon be removed once ZFS 2.0.1 lands

Revision history for this message
Brian Murray (brian-murray) wrote :

The Groovy Gorilla has reached end of life, so this bug will not be fixed for that release

Changed in zfs-linux (Ubuntu Groovy):
status: Confirmed → Won't Fix
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.