-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for zpool user properties #11680
Conversation
Error: free(): invalid pointer
|
77a7cf8
to
0e73bf1
Compare
in
But later in |
Fixed style |
0e73bf1
to
2cfa1e1
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.
The code looks good to me. But I think we should add a couple basic test cases to exercise this new functionality. It looks like in particular you could adapt cli_root/zfs_set/user_property_001_pos.ksh
and cli_root/zfs_set/user_property_003_neg.ksh
pretty easily and that would provide some coverage.
2cfa1e1
to
e4b4c71
Compare
e4b4c71
to
017496c
Compare
f15ed65
to
4302fb5
Compare
Mateusz has written the first few tests for this, and cleaned things up. |
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.
You'll want to also update man/man7/zpoolprops.7
to reflect that user properties are supported for the pool. Modeling this after what was done in man/man7/zfsprops.7
seems like a reasonable way to go.
tests/zfs-tests/tests/functional/cli_root/zpool_set/user_property_001_pos.ksh
Outdated
Show resolved
Hide resolved
93de520
to
0da5c12
Compare
tests/zfs-tests/tests/functional/cli_root/zpool_set/zpool_set_common.kshlib
Outdated
Show resolved
Hide resolved
0da5c12
to
82cf774
Compare
The new tests are working correctly now |
Hmm, I pushed the fixes to the https://github.com/allanjude/zfs/tree/zpool_user_props branch but GitHub does not seem to have propagated the changes to this PR... It should be pointing to allanjude@cf20058 now. |
Usage: zpool set org.freebsd:comment="this is my pool" poolname Tests are based on zfs_set's user property tests. Also stop truncating property values at MAXNAMELEN, use ZFS_MAXPROPLEN. Co-authored-by: Mateusz Piotrowski <0mp@FreeBSD.org> Obtained from: OpenZFS PR openzfs/zfs#11680 Sponsored by: Beckhoff Automation GmbH & Co. KG. Sponsored by: Klara Inc.
Summary: Usage: zpool set org.freebsd:comment="this is my pool" poolname Tests are based on zfs_set's user property tests. Also stop truncating property values at MAXNAMELEN, use ZFS_MAXPROPLEN. Co-authored-by: Mateusz Piotrowski <0mp@FreeBSD.org> Obtained from: OpenZFS PR openzfs/zfs#11680 Sponsored by: Beckhoff Automation GmbH & Co. KG. Sponsored by: Klara Inc. Reviewers: allanjude Subscribers: imp, delphij Differential Revision: https://reviews.freebsd.org/D39657
@0mp we're resolved the FreeBSD build failure. Can you rebase on the latest commits to master so we can verify this builds cleanly on FreeBSD. |
Rebased! |
Sorry, it looks like this has some minor conflicts with the recently merged 3e4ed42. One last rebase is needed, then I'll get it merged. |
Usage: zpool set org.freebsd:comment="this is my pool" poolname Tests are based on zfs_set's user property tests. Also stop truncating property values at MAXNAMELEN, use ZFS_MAXPROPLEN. Sponsored-by: Beckhoff Automation GmbH & Co. KG. Sponsored-by: Klara Inc. Co-authored-by: Mateusz Piotrowski <mateusz.piotrowski@klarasystems.com> Signed-off-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Mateusz Piotrowski <mateusz.piotrowski@klarasystems.com>
Hey Brian, I've resolved the conflict, rebased, and pushed the latest version. :) |
Usage: zpool set org.freebsd:comment="this is my pool" poolname Tests are based on zfs_set's user property tests. Also stop truncating property values at MAXNAMELEN, use ZFS_MAXPROPLEN. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Mateusz Piotrowski <mateusz.piotrowski@klarasystems.com> Sponsored-by: Beckhoff Automation GmbH & Co. KG. Sponsored-by: Klara Inc. Closes openzfs#11680
zpool set org.freebsd:comment="this is my pool" poolname
Signed-off-by: Allan Jude allan@klarasystems.com
Motivation and Context
Allow users to create and set arbitrary pool properties, with the same syntax as dataset user properties (a user property is identified by the colon separator, and by convention is formatted org.name:propername)
Description
Allows to set and get user properties on the pool (district from dataset properties on the root dataset)
How Has This Been Tested?
Not very much
Types of changes
Checklist:
Signed-off-by
.