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 compat: Minimum kernel version 3.10 #9566

Merged
merged 1 commit into from
Nov 12, 2019

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

Maintain a healthy code base to support on going development by removing unused, or rarely used, compatibility code.

Linux version 3.10 was selected as the new minimum version in order to continue to support CentOS / RHEL 7, Ubuntu 14.04, and SLES 12. These enterprise distributions are still widely deployed and in the case of CentOS / RHEL 7 / SLES will not be EoL for several years.

Description

Increase the minimum supported kernel version from 2.6.32 to 3.10. This removes support for the following Linux enterprise distributions.

Distribution Kernel End of Life
Ubuntu 12.04 LTS 3.2 Apr 28, 2017
SLES 11 3.0 Mar 32, 2019
RHEL / CentOS 6 2.6.32 Nov 30, 2020

The following changes were made as part of removing support.

  • Updated configure to enforce a minimum kernel version as specified in the META file (Linux-Minimum: 3.10).

      configure: error:
          *** Cannot build against kernel version 2.6.32.
          *** The minimum supported kernel version is 3.10.
    
  • Removed all configure kABI checks and matching C code for interfaces which solely predate the Linux 3.10 kernel.

  • Updated all configure kABI checks to fail when an interface is missing which was in the 3.10 kernel up to the latest 5.1 kernel. Removed the HAVE_* preprocessor defines for these checks and updated the code to unconditionally use the verified interface.

  • Inverted the detection logic in several kABI checks to match the new interface as it appears in 3.10 and newer and not the legacy interface.

  • Consolidated the following checks in to individual files. Due the large number of changes in the checks it made sense to handle this now. It would be desirable to group other related checks in the same fashion, but this as left as future work.

    • config/kernel-blkdev.m4 - Block device kABI checks
    • config/kernel-blk-queue.m4 - Block queue kABI checks
    • config/kernel-bio.m4 - Bio interface kABI checks
  • Removed the kABI checks for sops->nr_cached_objects() and sops->free_cached_objects(). These interfaces are currently unused.

How Has This Been Tested?

  • Compiled on the following kernels.
    • 3.10.0-1062.4.1.el7.x86_64
    • 5.3.7-200.fc30.x86_64

Additional CI testing pending, this PR is expected to fail on certain builders running kernels which are no longer supported. They will be retired after this PR is merged.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Nov 8, 2019
@behlendorf behlendorf mentioned this pull request Nov 8, 2019
12 tasks
@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label Nov 9, 2019
@PrivatePuffin
Copy link
Contributor

PrivatePuffin commented Nov 10, 2019

Maybe add this to Project 25 "OpenZFS integration", under "Code Refactoring"?
As it is quite clearly a part of OpenZFS 2.0 and it's somewhat close to a code refactor, or at least relevant for the refactors.

Increase the minimum supported kernel version from 2.6.32 to 3.10.
This removes support for the following Linux enterprise distributions.

    Distribution     | Kernel | End of Life
    ---------------- | ------ | -------------
    Ubuntu 12.04 LTS | 3.2    | Apr 28, 2017
    SLES 11          | 3.0    | Mar 32, 2019
    RHEL / CentOS 6  | 2.6.32 | Nov 30, 2020

The following changes were made as part of removing support.

* Updated `configure` to enforce a minimum kernel version as
  specified in the META file (Linux-Minimum: 3.10).

    configure: error:
        *** Cannot build against kernel version 2.6.32.
        *** The minimum supported kernel version is 3.10.

* Removed all `configure` kABI checks and matching C code for
  interfaces which solely predate the Linux 3.10 kernel.

* Updated all `configure` kABI checks to fail when an interface is
  missing which was in the 3.10 kernel up to the latest 5.1 kernel.
  Removed the HAVE_* preprocessor defines for these checks and
  updated the code to unconditionally use the verified interface.

* Inverted the detection logic in several kABI checks to match
  the new interface as it appears in 3.10 and newer and not the
  legacy interface.

* Consolidated the following checks in to individual files. Due
  the large number of changes in the checks it made sense to handle
  this now.  It would be desirable to group other related checks in
  the same fashion, but this as left as future work.

  - config/kernel-blkdev.m4 - Block device kABI checks
  - config/kernel-blk-queue.m4 - Block queue kABI checks
  - config/kernel-bio.m4 - Bio interface kABI checks

* Removed the kABI checks for sops->nr_cached_objects() and
  sops->free_cached_objects().  These interfaces are currently unused.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf
Copy link
Contributor Author

Rebased on master to resolve merge conflicts from recent changes. Added to the OpenZFS tracking project, while not required for FreeBSD integration it is semi-related work.

@ahrens
Copy link
Member

ahrens commented Nov 11, 2019

Net deletion of 2000+ lines of code, woohoo!!!

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Nov 11, 2019
@codecov
Copy link

codecov bot commented Nov 12, 2019

Codecov Report

Merging #9566 into master will decrease coverage by 0.02%.
The diff coverage is 80.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9566      +/-   ##
==========================================
- Coverage   79.05%   79.03%   -0.03%     
==========================================
  Files         418      418              
  Lines      123680   123678       -2     
==========================================
- Hits        97777    97743      -34     
- Misses      25903    25935      +32
Flag Coverage Δ
#kernel 79.73% <80.76%> (ø) ⬆️
#user 66.5% <ø> (-0.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a6ac4c...771dadb. Read the comment docs.

@behlendorf behlendorf merged commit 066e825 into openzfs:master Nov 12, 2019
ahrens pushed a commit to ahrens/zfs that referenced this pull request Jul 17, 2020
Increase the minimum supported kernel version from 2.6.32 to 3.10.
This removes support for the following Linux enterprise distributions.

    Distribution     | Kernel | End of Life
    ---------------- | ------ | -------------
    Ubuntu 12.04 LTS | 3.2    | Apr 28, 2017
    SLES 11          | 3.0    | Mar 32, 2019
    RHEL / CentOS 6  | 2.6.32 | Nov 30, 2020

The following changes were made as part of removing support.

* Updated `configure` to enforce a minimum kernel version as
  specified in the META file (Linux-Minimum: 3.10).

    configure: error:
        *** Cannot build against kernel version 2.6.32.
        *** The minimum supported kernel version is 3.10.

* Removed all `configure` kABI checks and matching C code for
  interfaces which solely predate the Linux 3.10 kernel.

* Updated all `configure` kABI checks to fail when an interface is
  missing which was in the 3.10 kernel up to the latest 5.1 kernel.
  Removed the HAVE_* preprocessor defines for these checks and
  updated the code to unconditionally use the verified interface.

* Inverted the detection logic in several kABI checks to match
  the new interface as it appears in 3.10 and newer and not the
  legacy interface.

* Consolidated the following checks in to individual files. Due
  the large number of changes in the checks it made sense to handle
  this now.  It would be desirable to group other related checks in
  the same fashion, but this as left as future work.

  - config/kernel-blkdev.m4 - Block device kABI checks
  - config/kernel-blk-queue.m4 - Block queue kABI checks
  - config/kernel-bio.m4 - Bio interface kABI checks

* Removed the kABI checks for sops->nr_cached_objects() and
  sops->free_cached_objects().  These interfaces are currently unused.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#9566
@behlendorf behlendorf deleted the update-linux-min branch April 19, 2021 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested) Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants