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

[backport] Kernel 5.12 compat patches for 2.0.* #12009

Merged
merged 2 commits into from
May 20, 2021
Merged

[backport] Kernel 5.12 compat patches for 2.0.* #12009

merged 2 commits into from
May 20, 2021

Conversation

jonathonf
Copy link
Contributor

Motivation and Context

This PR backports two additional compat patches necessary for kernel 5.12 support for the 2.0.* series.

Description

This cherry-picks both e2a8296 and ffd6978 for kernel 5.12 compatibility.

How Has This Been Tested?

This has been tested on several systems running Arch Linux and kernels 5.12.0 and 5.12.1 using the PR eli-schwartz/pkgbuilds#24 (which will be updated pending this PR).

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)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@jonathonf jonathonf marked this pull request as ready for review May 6, 2021 18:33
@jonathonf jonathonf marked this pull request as draft May 6, 2021 18:47
ckane and others added 2 commits May 6, 2021 19:54
In Linux 5.12, the filesystem API was modified to support ipmapped
mounts by adding a "struct user_namespace *" parameter to a number
functions and VFS handlers. This change adds the needed autoconf
macros to detect the new interfaces and updates the code appropriately.
This change does not add support for idmapped mounts, instead it
preserves the existing behavior by passing the initial user namespace
where needed.  A subsequent commit will be required to add support
for idmapped mounted.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #11712
(cherry picked from commit e2a8296)
Signed-off-by: Jonathon Fernyhough <jonathon@m2x.dev>
The BIO_MAX_PAGES macro is being retired in favor of a bio_max_segs()
function that implements the typical MIN(x,y) logic used throughout the
kernel for bounding the allocation, and also the new implementation is
intended to be signed-safe (which the former was not).

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #11765
(cherry picked from commit ffd6978)
Signed-off-by: Jonathon Fernyhough <jonathon@m2x.dev>
@jonathonf jonathonf marked this pull request as ready for review May 6, 2021 19:04
@jonathonf jonathonf marked this pull request as draft May 6, 2021 19:23
@jonathonf jonathonf marked this pull request as ready for review May 6, 2021 19:25
Copy link
Contributor

@tonyhutter tonyhutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for these backports!

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label May 7, 2021
@behlendorf behlendorf merged commit 77352db into openzfs:zfs-2.0.5-staging May 20, 2021
zer0def pushed a commit to zer0def/PKGBUILDs that referenced this pull request Sep 10, 2021
Backport kernel 5.12 compat and update patches

This backports the upstream compat patches
openzfs/zfs@e2a8296
and openzfs/zfs@ffd6978
via openzfs/zfs#12009

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants