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.
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.
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#L41Userland library should store the FileName given during
CreateFile
in a shared object that is shared between open context (of same FileName) and updated duringMoveFile
. The following request (after CreateFile) would use theUserContext
to retrieve the FileName instance and pass it (safely) to callbacks.