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

A couple of Linux 5.16 fixes #12975

Closed
wants to merge 4 commits into from

Conversation

rincebrain
Copy link
Contributor

(Draft b/c my first run through the CI failed in the ENOSPC checks for some reason, and because I feel like sendfile shouldn't have broken even in that case unless we want to make that a fatal check error?)

Motivation and Context

I went down the hole for #12971 and adjusted a few things before I found one that helped.

Description

Three patches.

  • add_disk gained an error return code, so detect and conditionally set error to it
  • kvmalloc is no longer in mm.h, it's in slab.h
  • iov_iter_fault_in_readable is now fault_in_iov_iter_readable, so again, detect and map that

How Has This Been Tested?

Ran it through -r sanity and -T functional on a Fedora rawhide VM running the 5.16 kernel

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:

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

This all looks pretty straight forward, thanks for checking it out.

config/kernel-add-disk.m4 Show resolved Hide resolved
config/kernel-vfs-iov_iter.m4 Outdated Show resolved Hide resolved
@jonathonf
Copy link
Contributor

As a fairly random data point, this also fixed an issue with profile-sync-daemon using overlayfs over ZFS (working with 5.15, broken with 5.16).

@behlendorf
Copy link
Contributor

@rincebrain I believe the draft status could be removed from this PR. While not a comprehensive set of patches for 5.16, these all look good to me and should be included. Unless you have a few more in the works? For example, it appears some work will need to be done to address #12926.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jan 18, 2022
@rincebrain
Copy link
Contributor Author

I can take a look at that, but no, I didn't have any more patches to push in this.

@rincebrain rincebrain marked this pull request as ready for review January 19, 2022 01:38
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

@ckane mind having a look at this.

@behlendorf behlendorf added this to In progress in Linux via automation Jan 19, 2022
@gamanakis gamanakis mentioned this pull request Jan 19, 2022
13 tasks
@ckane
Copy link
Contributor

ckane commented Jan 20, 2022

Thanks, I'll build this tonight and test it out on my laptop and give feedback tomorrow. Looks fairly clear to me though.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jan 21, 2022
@ckane
Copy link
Contributor

ckane commented Jan 22, 2022

ok seems to be working stable on my laptop

@behlendorf
Copy link
Contributor

@rincebrain would you mind squashing these commits appropriately. We've also been using the convention of prefixing Linux kernel compatibility fixes with Linux 5.16 compat: in the subject line. It just makes it easier to make sure we're got all the relevant kernel changes when backporting the commits. For example:

  • Linux 5.16 compat: Added FALLOC_FL_ZERO_RANGE to allowed flags
  • Linux 5.16 compat: Added mapping for renamed iov_iter_fault_in_readable
  • Linux 5.16 compat: Added add_disk check for return
  • Linux 5.16 compat: Include another header so we find kvmalloc

As it says on the tin - the folio work moved a bunch out of mm.h.

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
add_disk went from void to must-check int return.

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Linux decided to rename this for some reason. At some point, we
should probably invert this mapping, but for now...

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
For us, I think it's always just FALLOC_FL_PUNCH_HOLE with a fake
mustache on.

Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
@rincebrain
Copy link
Contributor Author

rincebrain commented Jan 22, 2022 via email

behlendorf pushed a commit that referenced this pull request Jan 24, 2022
add_disk went from void to must-check int return.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12975
behlendorf pushed a commit that referenced this pull request Jan 24, 2022
Linux decided to rename this for some reason. At some point, we
should probably invert this mapping, but for now...

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12975
behlendorf pushed a commit that referenced this pull request Jan 24, 2022
For us, I think it's always just FALLOC_FL_PUNCH_HOLE with a fake
mustache on.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12975
Linux automation moved this from In progress to Done Jan 24, 2022
@sunilvaltix
Copy link

@behlendorf Is this going to be cherry picked into 2.1.x as well?

@jonathonf
Copy link
Contributor

Is this going to be cherry picked into 2.1.x as well?

It's very likely to be picked up into the zfs-2.1.3-staging branch.

tonyhutter pushed a commit that referenced this pull request Feb 4, 2022
As it says on the tin - the folio work moved a bunch out of mm.h.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12975
tonyhutter pushed a commit that referenced this pull request Feb 4, 2022
add_disk went from void to must-check int return.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12975
tonyhutter pushed a commit that referenced this pull request Feb 4, 2022
Linux decided to rename this for some reason. At some point, we
should probably invert this mapping, but for now...

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12975
tonyhutter pushed a commit that referenced this pull request Feb 4, 2022
For us, I think it's always just FALLOC_FL_PUNCH_HOLE with a fake
mustache on.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12975
@sunilvaltix
Copy link

@jonathonf Is there a release criteria for 2.1.3 release? What is blocking the release of 2.1.3 at this point? I see that patches have landed in staging.

@jonathonf
Copy link
Contributor

I don't know - I don't control the release cycle, I just try to help here and there.

@tonyhutter
Copy link
Contributor

All these commits are included in our upcoming 2.1.3 release: #13063

There's a few others we'd like to include though (like #13059)

nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
As it says on the tin - the folio work moved a bunch out of mm.h.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
add_disk went from void to must-check int return.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Linux decided to rename this for some reason. At some point, we
should probably invert this mapping, but for now...

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
For us, I think it's always just FALLOC_FL_PUNCH_HOLE with a fake
mustache on.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
As it says on the tin - the folio work moved a bunch out of mm.h.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
add_disk went from void to must-check int return.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Linux decided to rename this for some reason. At some point, we
should probably invert this mapping, but for now...

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
For us, I think it's always just FALLOC_FL_PUNCH_HOLE with a fake
mustache on.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 22, 2022
For us, I think it's always just FALLOC_FL_PUNCH_HOLE with a fake
mustache on.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 22, 2022
For us, I think it's always just FALLOC_FL_PUNCH_HOLE with a fake
mustache on.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 23, 2022
For us, I think it's always just FALLOC_FL_PUNCH_HOLE with a fake
mustache on.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Coleman Kane <ckane@colemankane.org>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes openzfs#12975
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
Linux
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants