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

"zfs list -d <depth> -o name" output depth is wrong when -H is given #5594

Closed
mailinglists35 opened this issue Jan 14, 2017 · 7 comments
Closed

Comments

@mailinglists35
Copy link

System information

Type Version/Name
Distribution Name debian
Distribution Version stretch
Linux Kernel 4.8.15-2
Architecture amd64
ZFS Version 0.7.0-rc2_104_g42b64e50c
SPL Version 0.7.0-rc2_8_g8e99d66

Describe the problem you're observing

root@linux:~# zfs list -t filesystem -d1 -H -o name pool/iphone
pool/iphone

root@linux:~# zfs list -t filesystem -d1 -o name pool/iphone
NAME
pool/iphone
pool/iphone/private

the output without -H seems to be the correct one, conform to the manual page which says

       -d depth

           Recursively  display  any children of the dataset, limiting the recursion to depth. A depth of 1 will dis‐
           play only the dataset and its direct children.

Describe how to reproduce the problem

create recursive datasets, then list them with / without -H

Include any warning/errors/backtraces from the system logs

@mailinglists35
Copy link
Author

the same manual says nothing about -H altering the -d parameter

       -H

           Used for scripting mode. Do not print headers and separate fields by a single  tab  instead  of  arbitrary
           white space.

@mailinglists35
Copy link
Author

so effectively when -H is used, -d N acts as -d N-1

@mailinglists35
Copy link
Author

possibly related issue #4287

@mailinglists35
Copy link
Author

they are both from git master

@mailinglists35
Copy link
Author

uhm, I was not running latest master at the time of reporting, but the other issue is indeed running latest master. updating to master makes this go away. closing.

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

No branches or pull requests

2 participants
@mailinglists35 and others