-
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
Skip snapshot in zfs_iter_mounted() #12448
Conversation
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
No idea why tests/functional/cli_root/zfs_rename/zfs_rename_007_pos failed on Fedora 33 x86_64.
|
This is a trivial fix, not sure why it sits still with no feedback. |
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.
This logic was added as part of 0c6d093 which also added the tests/functional/cli_root/zfs_unmount/zfs_unmount_nested.ksh
test case. It looks to me like there's a check for exactly this in the test. Can you look in to why the test case wasn't catching this and fix it as part of this PR.
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
In #12358 there's an explicit request to enable mounting and unmounting of snapshots from the command line. I think this PR as it exists would essentially prevent that one. Rather than skipping snapshots, would it be better to suppress the message?I haven't tested it, but I suspect the changes to zfs_open in that PR would prevent the confusing message. |
Signed-off-by: Youzhong Yang <yyang@mathworks.com>
I disagree. This line of code skips the snapshot. This PR does not change the functionality, but it suppresses the annoying stderr message. |
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.
Looks good. Thanks for the fix and explanation.
I did not mean to imply that this PR changes current functionality. Apologies for being unclear. What I meant to say is that while @lundman thoughts? |
Ah hmm, sorry didn't see the mention - I'll have to check to see if it still works ok. |
It didn't seem to break anything over here;
|
Signed-off-by: Youzhong Yang yyang@mathworks.com
The intention of the zfs_iter_mounted() is to traverse the dataset and its descendants, not the snapshots. The current code can cause a mounted snapshot to be included and thus zfs_open() on the snapshot with ZFS_TYPE_FILESYSTEM would print confusing message such as "cannot open 'rpool/fs@snap': snapshot delimiter '@' is not expected here".
See #12447.
Motivation and Context
Description
How Has This Been Tested?
Manually.
Types of changes
Checklist:
Signed-off-by
.