-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Upstream: Add convenience wrappers for common uio usage #10412
Conversation
Is FreeBSD not including |
Codecov Report
@@ Coverage Diff @@
## master #10412 +/- ##
==========================================
- Coverage 79.58% 79.09% -0.50%
==========================================
Files 391 393 +2
Lines 123872 123859 -13
==========================================
- Hits 98586 97963 -623
- Misses 25286 25896 +610
Continue to review full report at Codecov.
|
51d866b
to
6d16942
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple last nits. Let's also run it by @mattmacy to get his feedback.
522cd82
to
3d47bc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
You definitely got unlucky with the bots. But all the failures are known. If you could rebase this on master we should be able to get a clean run with only the FreeBSD head bot failing due to recent changes they made upstream. |
The macOS uio struct is opaque and the API must be used, this makes the smallest changes to the code for all platforms. Signed-off-by: Jorgen Lundman <lundman@lundman.net>
The macOS uio struct is opaque and the API must be used, this makes the smallest changes to the code for all platforms. Reviewed-by: Matt Macy <mmacy@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #10412
The macOS uio struct is opaque and the API must be used, this makes the smallest changes to the code for all platforms. Reviewed-by: Matt Macy <mmacy@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes openzfs#10412
The macOS uio struct is opaque and the API must be used, this makes the smallest changes to the code for all platforms. Reviewed-by: Matt Macy <mmacy@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes openzfs#10412
Use ZFS specific UIO macros for shared-code.
The first controversial PR!
Motivation and Context
Code that poke around inside uio, like
uio->l_offset
can not work on OsX due to opaqueness of the struct. The API calluio_offset()
should be used. I went with this for readability, if people prefer #ifdef APPLE everywhere, that is also doable.Description
The macOS uio struct is opaque and the API must be used, this
makes the smallest changes to the code for all platforms.
Most affected area is module/icp, which had a lot of code repetition.
It was tricky to make the for loop that skips to first non-empty
iov index look good, so it was moved into a macro. Technically, this
"skip code" is not required in ZFS, as all callers to crypto will not
create empty iov.
For those curious what the macOS versions of the macros look like, they are here:
https://github.com/openzfsonosx/openzfs/blob/sorted2/include/os/macos/zfs/sys/zfs_context_os.h#L69
How Has This Been Tested?
Unable to test, relying on CI.
Types of changes
Checklist:
Signed-off-by
.