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

Fix error handling in FreeBSD's get/putpages VOPs #13311

Closed
wants to merge 2 commits into from

Conversation

markjdb
Copy link
Contributor

@markjdb markjdb commented Apr 9, 2022

Motivation and Context

In FreeBSD, most VOPs return errno values to signal an error, but a couple that are used by the VM system expect Mach error codes, owing to the fact that that subsystem was ported from Mach. Currently VOP_GET/PUTPAGES will return EIO if ZFS_ENTER() fails, and this violates some invariants in the VM system.

Description

The change adds variants of the ZFS_ENTER() and ZFS_VERIFY_ZP() macros which allow the user to specify a return value. Then it converts VOP_GETPAGES and VOP_PUTPAGES to make use of these variants to return Mach error statuses.

How Has This Been Tested?

We have a stress test which was able to trigger a panic based on this bug: https://github.com/freebsd/freebsd-src/blob/main/tools/test/stress2/misc/zfs14.sh

With the patch, it runs for hours without any observed problems.

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:

markjdb added 2 commits April 8, 2022 09:55
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Signed-off-by: Mark Johnston <[email protected]>
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
@behlendorf behlendorf requested a review from a user April 11, 2022 18:48
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Apr 11, 2022
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Apr 13, 2022
behlendorf pushed a commit that referenced this pull request Apr 13, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes #13311
ghost pushed a commit to truenas/zfs that referenced this pull request Apr 15, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
ghost pushed a commit to truenas/zfs that referenced this pull request Apr 15, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
@ghost ghost mentioned this pull request Apr 15, 2022
13 tasks
behlendorf pushed a commit that referenced this pull request Apr 19, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes #13311
behlendorf pushed a commit that referenced this pull request Apr 19, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes #13311
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Sep 2, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Sep 2, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
beren12 pushed a commit to beren12/zfs that referenced this pull request Sep 19, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
beren12 pushed a commit to beren12/zfs that referenced this pull request Sep 19, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
For legacy reasons, a couple of VOPs have to return error numbers that
don't come from the usual errno namespace.  To handle the cases where
ZFS_ENTER or ZFS_VERIFY_ZP fail, we need to be able to override the
default error return value of EIO.  Extend the macros to permit this.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 23, 2022
FreeBSD's memory management system uses its own error numbers and gets
confused when these VOPs return EIO.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Reported-by: Peter Holm <[email protected]>
Signed-off-by: Mark Johnston <[email protected]>
Closes openzfs#13311
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.

2 participants