Skip to content

zpl_super: prefer "new" mount API when available - #18260

Merged
behlendorf merged 1 commit into
openzfs:masterfrom
robn:prefer-new-mount-api
Feb 25, 2026
Merged

behlendorf merged 1 commit into
openzfs:masterfrom
robn:prefer-new-mount-api

Conversation

@robn

@robn robn commented Feb 24, 2026

Copy link
Copy Markdown
Member

[Sponsors: TrueNAS]

Motivation and Context

#18216 added shims to wire our old-style mount callbacks to the newer kernel mount API, since the old API was removed in 7.0. I'm keen to refactor a lot of our old mount handing to use the new mount API, but first I want to see what effect this has on the versions we support. Easiest way to do that is to throw CI at it and see what happens.

Description

Effectively inverting the check. Rather then checking for the presence of the mount callbacks, we instead check for the present of fs_context, which should make the new code compile back to 5.2.

How Has This Been Tested?

Compile and sanity run on 4.19.325 (old), 5.10.240, 6.18.9 and 7.0-rc1 (new). FS_HAVE_CONTEXT not defined on 4.19, defined on the others.

If CI passes, I would like to see this merged to master so we have until 2.5 to see if there's any fallout. I would suggest not backporting it to 2.4, even if the Linux 7.0 support patches do land there.

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)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • 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:

This API has been available since kernel 5.2, and having it available
(almost) everywhere should give us a lot more flexibility for mount
management in the future.

Sponsored-by: TrueNAS
Signed-off-by: Rob Norris <rob.norris@truenas.com>
@behlendorf
behlendorf merged commit f3d4c79 into openzfs:master Feb 25, 2026
26 of 27 checks passed
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Feb 25, 2026
tonyhutter pushed a commit that referenced this pull request May 12, 2026
This API has been available since kernel 5.2, and having it available
(almost) everywhere should give us a lot more flexibility for mount
management in the future.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes #18260
tonyhutter pushed a commit that referenced this pull request May 12, 2026
This API has been available since kernel 5.2, and having it available
(almost) everywhere should give us a lot more flexibility for mount
management in the future.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes #18260
bugclerk pushed a commit to truenas/zfs that referenced this pull request May 14, 2026
This API has been available since kernel 5.2, and having it available
(almost) everywhere should give us a lot more flexibility for mount
management in the future.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes openzfs#18260
(cherry picked from commit 1ace2bf)
@robn
robn deleted the prefer-new-mount-api branch June 14, 2026 05:36
lundman pushed a commit to openzfsonosx/openzfs-fork that referenced this pull request Jul 30, 2026
This API has been available since kernel 5.2, and having it available
(almost) everywhere should give us a lot more flexibility for mount
management in the future.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes openzfs#18260
pull Bot pushed a commit to A-Archives-and-Forks/openzfs that referenced this pull request Sep 26, 2026
This API has been available since kernel 5.2, and having it available
(almost) everywhere should give us a lot more flexibility for mount
management in the future.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes openzfs#18260
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.

3 participants