Skip to content
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 ZVOL bookmarks to be listed recursively #5072

Closed
wants to merge 1 commit into from

Conversation

loli10K
Copy link
Contributor

@loli10K loli10K commented Sep 7, 2016

When trying to list bookmarks recursively, if the parent dataset (-r tank/path) is a ZVOL the command fails:

# zfs list -H -o name -t bookmark -r tank/path
cannot open 'tank/path': operation not applicable to datasets of this type

Fix issue #4503

EDIT: fixed checkstyle warning

*/
argtype = types;
if (flags & ZFS_ITER_RECURSE) {
argtype |= ZFS_TYPE_FILESYSTEM;
if (types & ZFS_TYPE_SNAPSHOT)
if (types & ZFS_TYPE_SNAPSHOT ||
types & ZFS_TYPE_BOOKMARK)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be rewritten more clearly one a single line as:

                        if (types & (ZFS_TYPE_SNAPSHOT | ZFS_TYPE_BOOKMARK))

@behlendorf
Copy link
Contributor

behlendorf commented Sep 9, 2016

@loli10K could you rebase this against the latest master, make the suggested style change, and force update the PR. Then you should get a clean test run.

The fix itself looks reasonable.

@loli10K
Copy link
Contributor Author

loli10K commented Sep 9, 2016

Sorry, i'm not a good C programmer.

EDIT: i kind of knew there was a better way to write that conditional statement, but wouldn't dare try my hand

DeHackEd pushed a commit to DeHackEd/zfs that referenced this pull request Oct 19, 2016
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes openzfs#4503
Closes openzfs#5072
DeHackEd pushed a commit to DeHackEd/zfs that referenced this pull request Oct 29, 2016
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes openzfs#4503
Closes openzfs#5072
l1k pushed a commit to l1k/zfs that referenced this pull request Apr 17, 2017
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes openzfs#4503
Closes openzfs#5072
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request May 18, 2017
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes openzfs#4503
Closes openzfs#5072
tonyhutter pushed a commit that referenced this pull request Jun 9, 2017
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #4503
Closes #5072
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants