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

Kernel - Remove unnecessary FCB lock for FileName #1060

Open
Liryna opened this issue Jan 30, 2022 · 0 comments
Open

Kernel - Remove unnecessary FCB lock for FileName #1060

Liryna opened this issue Jan 30, 2022 · 0 comments

Comments

@Liryna
Copy link
Member

Liryna commented Jan 30, 2022

The kernel has multiple Fcb readonly locks just to copy the FileName to the request sent to the user filesystem in userland.
This is unnecessary as the FileName is only changing during a rename which userland is aware of.

Like here where the kernel copy the FileName https://github.com/dokan-dev/dokany/blob/master/sys/cleanup.c#L97-L116
so userland can just pass it to the user filesystem here https://github.com/dokan-dev/dokany/blob/master/dokan/cleanup.c#L41

Userland library should store the FileName given during CreateFile in a shared object that is shared between open context (of same FileName) and updated during MoveFile.
The following request (after CreateFile) would use the UserContext to retrieve the FileName instance and pass it (safely) to callbacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant