-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Support inheriting properties in channel programs #9738
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
Conversation
8e11efb
to
439a110
Compare
Codecov Report
@@ Coverage Diff @@
## master #9738 +/- ##
========================================
+ Coverage 79% 80% +<1%
========================================
Files 385 385
Lines 121615 121645 +30
========================================
+ Hits 96636 96868 +232
+ Misses 24979 24777 -202
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 for pushing this upstream I'm sure it will be useful.
tests/zfs-tests/tests/functional/channel_program/synctask_core/tst.inherit.ksh
Show resolved
Hide resolved
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.
Looks good, and works as intended for me. If you can rebase this on master, which will resolve the make lint
warnings, and resolve the minor man page edits this should be good to go.
This adds support in channel programs to inherit properties analogous to `zfs inherit` by adding `zfs.sync.inherit` and `zfs.check.inherit` functions to the ZFS LUA API. Signed-off-by: Jason King <[email protected]>
778f0d0
to
76465fd
Compare
I'd like to get this merged by next Wednesday, please post any comments you may have by then. |
@jasonbking Sorry I didn't have time to look at this before it was integrated. The code looks good to me. Thanks for extending zfs channel programs! |
This adds support in channel programs to inherit properties analogous to `zfs inherit` by adding `zfs.sync.inherit` and `zfs.check.inherit` functions to the ZFS LUA API. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Jason King <[email protected]> Closes openzfs#9738
Add
zfs.sync.inherit
andzfs.check.inherit
functions for ZFS channel programs that functions like thezfs inherit
command.Motivation and Context
Joyent has been using this as component of our key management system we've been developing for Triton (as described in the OpenZFS summit presentation). The feature itself seems generally useful in more contexts that it makes sense to contribute it to the broader community.
Description
Functions where added to implement the
zfs.sync.inherit
andzfs.check.inherit
LUA functions, following the form of the existing channel program functions. The check function performs the same checks on the property that thezfs inherit
command performs. We did not however implement support forzfs inherit -S
, as it wasn't necessary for our uses, though nothing in the implementation should prohibit adding the functionality in the future if desired.How Has This Been Tested?
This has been running on a SmartOS branch for some time (we want to get wider review before integrating it into the master branch of any repo) using the added functionality. In addition, the added zfs test case runs successfully.
Types of changes
Checklist:
Signed-off-by
.