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
Remove requirement for -d 1 for zfs list and zfs get with bookmarks #9589
Conversation
df58307 removed the need to specify -d 1 when zfs list and zfs get are called with -t snapshot on a datset. This commit extends the same behaviour to -t bookmark. This commit also introduces the 'snap' shorthand for snapshots from zfs list to zfs get. Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #9589 +/- ##
==========================================
- Coverage 79.23% 74.73% -4.51%
==========================================
Files 419 389 -30
Lines 123696 120898 -2798
==========================================
- Hits 98014 90352 -7662
- Misses 25682 30546 +4864
Continue to review full report at Codecov.
|
|
I went over the failed test: doesn't seem to be related to this PR. "zpool_reopen_002_pos" ran fine, in the right spot, doing the same thing. As do all other tests doing poolcreation. |
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.
Very neat solution, love how clean the lack of break in case 2 leads to case 3 being used for both case 2 (Snapshot) and case 3 (snap). Very KISS
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, can you also add a basic test for the snap alias and bookmark in cli_root/zfs_get/zfs_get_009_pos.ksh test case. The same as what as done in df58307.
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. Definitely add the test cases @behlendorf asked for. Thanks for extending this.
Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
|
I've taken a stab at extending the tests in the easiest ways that seemed remotely reasonable to me. Does the extension of |
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.
Thank's for adding the test coverage, this looks right to me.
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
df58307 removed the need to specify -d 1 when zfs list and zfs get are called with -t snapshot on a datset. This commit extends the same behaviour to -t bookmark. This commit also introduces the 'snap' shorthand for snapshots from zfs list to zfs get. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Signed-off-by: InsanePrawn <insane.prawny@gmail.com> Closes openzfs#9589
df58307 removed the need to specify -d 1 when zfs list and zfs get are called with -t snapshot on a datset. This commit extends the same behaviour to -t bookmark. This commit also introduces the 'snap' shorthand for snapshots from zfs list to zfs get. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Signed-off-by: InsanePrawn <insane.prawny@gmail.com> Closes openzfs#9589
df58307 removed the need to specify -d 1 when zfs list and zfs get are called with -t snapshot on a datset. This commit extends the same behaviour to -t bookmark. This commit also introduces the 'snap' shorthand for snapshots from zfs list to zfs get. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Signed-off-by: InsanePrawn <insane.prawny@gmail.com> Closes #9589
as discussed in #9574:
df58307 removed the need to specify -d 1 when zfs list and zfs get are
called with -t snapshot on a datset. This commit extends the same
behaviour to -t bookmark.
This commit also introduces the 'snap' shorthand for snapshots from
zfs list to zfs get.
Signed-off-by: InsanePrawn insane.prawny@gmail.com
Motivation and Context
Basically UX.
Description
zfs listandzfs getcan now be used with-t snapshotor-t bookmarkto list snapshots/bookmarks of a dataset without the need to specify-d 1anymore.Also, you can now use
zfs get -t snapinstead ofzfs get -t snapshot.How Has This Been Tested?
Compiled, manually tested.
Types of changes
Checklist:
Signed-off-by.