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

os: os.Root: use OBJ_DONT_REPARSE on Windows #73080

Open
neild opened this issue Mar 27, 2025 · 0 comments
Open

os: os.Root: use OBJ_DONT_REPARSE on Windows #73080

neild opened this issue Mar 27, 2025 · 0 comments
Labels
Implementation Issues describing a semantics-preserving change to the Go implementation. NeedsFix The path to resolution is known, but the work has not been done. OS-Windows Performance

Comments

@neild
Copy link
Contributor

neild commented Mar 27, 2025

Windows's NtCreateFile takes an OBJECT_ATTRIBUTES struct indicating the file to open. Setting the OBJ_DONT_REPARSE flag in this struct disables following symlinks (and other forms of reparse point). We can use this to implement a fast path in the common case when the target of an os.Root operation does not contain any reparse points.

@gabyhelp gabyhelp added the Implementation Issues describing a semantics-preserving change to the Go implementation. label Mar 27, 2025
@dmitshur dmitshur added Performance OS-Windows NeedsFix The path to resolution is known, but the work has not been done. labels Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation Issues describing a semantics-preserving change to the Go implementation. NeedsFix The path to resolution is known, but the work has not been done. OS-Windows Performance
Projects
None yet
Development

No branches or pull requests

3 participants