-
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
Allow for '-o feature@<feature>=disabled' on the command line. #5324
Conversation
@loli10K, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ahrens, @behlendorf and @ryao to be potential reviewers. |
|
||
for feature in async_destroy bookmarks embedded_data empty_bpobj enabled_txg \ | ||
extensible_dataset filesystem_limits hole_birth large_blocks \ | ||
lz4_compress spacemap_histogram |
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.
We're the large_dnode and userobj_accounting intentionally skipped?
... [\fB-m\fR \fImountpoint\fR] [\fB-R\fR \fIroot\fR] [\fB-t\fR \fItname\fR] \fIpool\fR \fIvdev\fR ... | ||
\fBzpool create\fR [\fB-fnd\fR] [\fB-o\fR \fIproperty=value\fR] ... [\fB-o\fR feature@\fIfeature=value\fR] | ||
... [\fB-O\fR \fIfile-system-property=value\fR] ... [\fB-m\fR \fImountpoint\fR] [\fB-R\fR \fIroot\fR] [\fB-t\fR \fItname\fR] | ||
... \fIpool\fR \fIvdev\fR ... |
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 fix the line wrapping here. [-t name] needs to be moved to the last line with ... pool vdev ...
zpool create [-fnd] [-o property=value] ... [-o feature@feature=value]
... [-O file-system-property=value] ... [-m mountpoint] [-R root]
[-t tname]
... pool vdev ...
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.
Nice job. This is a nice clean way to handle this, I didn't run in to any issues testing it locally aside from the error message. Is there some reason you didn't take this in the original patch? Aside from the two minor inline comments that's the only remaining issue I see holding up merging this.
Superceeds #3465. @FransUrbo, @gordan-bobic, @DeHackEd if you get a chance can you please review and test this. |
I just wanted to stay as close as possible to the original PR, i will update that error message in libzfs along with the other stuff. EDIT: @behlendorf should i also add feature@sha512 feature@skein and feature@edonr? |
@loli10K yes, we might as well add the full set of supported features. |
Changes up. Also i just realized this should probably fix #5142. |
Sometimes it is desired to specifically disable a feature directly on the 'zpool create' command line. Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Updated the test case so it behaves in the manor originally indended. * Consistent sytle with other test cases * log_pass causes immediate exit, moved outside loop * Simplified check_features function * log_must added to check_features call * Several features removed to keep test time short Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
LGTM, but now i wonder if we should also test multiple EDIT: i can't review the code, Github says i can't approve my own PR. |
@loli10K that would be a nice addition but I don't think it's critical. The parsing logic is pretty straight forward and I did manually run some of those kind of tests and it did work as expected. Thanks for the quick review. |
@loli10K thanks for tackling this, I know this is something quite a few people were requesting. |
@behlendorf that's the reason i did it, i saw different issues being open for this and i thought someone had to implement it. I know i'm being offtopic here, but do you happen to know if some other developer is working on recv property overrides (-x|-o)? |
@loli10K I don't know of anyone working on the recv property overrides. There was a WIP patch in 1867 along with a first round of review comments. |
On the recv property overrides, IIRC my comments were essentially, "why are the semantics subtly different from those of Oracle Solaris"? |
@ahrens yes, that's exactly as i read them. Is anyone in the Illumos community working on this? The open issue here https://www.illumos.org/issues/2745 doesn't show much activity either ... |
@loli10K I can confirm @behlendorf's remark about not knowing anyone working on recv property overrides in the Linux community. I don't know of anyone either. |
Based on @FransUrbo original work from previous PR #3465.
Enables new test script
zpool_create_features_005_pos
in Linux runfile and updates existingzpool_create_features_004_neg
test case.In case of invalid property value libzfs still emits a misleading error "cannot create 'tank': property 'feature@async_destroy' can only be set to 'enabled'" even if now 'disabled' is also accepted ...
Should fix #3460.