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

mountinfo: GetMountsFromReader() remove workaround for kernel < 3.10 #83

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thaJeztah
Copy link
Member

follow-up to #81

In Linux <= 3.9 mounting a cifs with spaces in a share name (like "//srv/My Docs")
may end up having a space in the last field of mountinfo (like "unc=//serv/My Docs").

Since kernel 3.10-rc1, cifs option "unc=" is ignored, so spaces should not appear.

Given that all major distros are now on at least kernel 3.10, and (e.g.) docker
has not supported older kernel versions for 5 Years 1, it should be save to
remove this special handling.

@@ -504,66 +499,6 @@ func TestParseFedoraMountinfoFilterFields(t *testing.T) {
}
}

func TestParseMountinfoWithSpaces(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand how removing this test is relevant to this commit.

In Linux <= 3.9 mounting a cifs with spaces in a share name (like "//srv/My Docs")
_may_ end up having a space in the last field of mountinfo (like "unc=//serv/My Docs").

Since kernel 3.10-rc1, cifs option "unc=" is ignored, so spaces should not appear.

Given that all major distros are now on at least kernel 3.10, and (e.g.) docker
has not supported older kernel versions for 5 Years [1], it should be save to
remove this special handling.

[1]: moby/moby@51b23d8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the mountinfo_remove_kernel_3.9_support branch from 8832f96 to 955e12d Compare August 23, 2021 16:29
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.

None yet

2 participants