-
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 macOS calls to AVL #10390
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10390 +/- ##
==========================================
- Coverage 79.68% 79.44% -0.24%
==========================================
Files 391 391
Lines 123603 123624 +21
==========================================
- Hits 98492 98217 -275
- Misses 25111 25407 +296
Continue to review full report at Codecov.
|
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.
Thanks, it looks like only one minor addition is needed. Providing these extra public library functions shouldn't be a problem for any of the platforms, plus now that they're available we may find they'll be useful elsewhere. I also verified the code matches what's in illumos, just for good measure.
*/ | ||
extern boolean_t avl_update(avl_tree_t *, void *); | ||
extern boolean_t avl_update_lt(avl_tree_t *, void *); | ||
extern boolean_t avl_update_gt(avl_tree_t *, void *); |
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.
Can you add these three new functions in order to the list of exported symbols at the end of module/avl/avl.c
. The EXPORT_SYMBOL
line is needed on Linux to be able to call the functions from a different kmod.
macOS kmem uses avl_update() and related functions. If other platforms get "defined but not used" warnings, they may need to be wrapped in #ifdefs. Signed-off-by: Jorgen Lundman <lundman@lundman.net>
The macOS kmem implementation uses avl_update() and related functions. These same function exist in the Solaris AVL code but were removed because they were unused. Restore them. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes openzfs#10390 (cherry picked from commit 081de9a)
The macOS kmem implementation uses avl_update() and related functions. These same function exist in the Solaris AVL code but were removed because they were unused. Restore them. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes openzfs#10390
macOS kmem uses avl_update() and related functions. If other platforms
get "defined but not used" warnings, they may need to be wrapped
in #ifdefs.
This is the first PR to add macOS support to the OpenZFS repo. Will start slow to work out the procedure and find a good balance. Also unsure how upstream platforms handle functions defined but not used.
Be extra picky here, so future PRs will go smoother :)
For a sneak peek of future PRs have a look at;
openzfsonosx/openzfs#4
Motivation and Context
Assuming a macOS port is desired, this is required.
Description
Additional AVL methods lifted directly from illumos.
How Has This Been Tested?
Running zfs-tests on macOS VMs.
Types of changes
Checklist:
Signed-off-by
.