-
Notifications
You must be signed in to change notification settings - Fork 673
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
Can't list directories in WSL2 #932
Comments
@reidrankin Hi! Are you using the /o option of the mirror? |
No, but I'll test it out real quick... doesn't fix it. (It shouldn't fix it, so that's good.) |
Oh sorry I haven't see the logs and your analysis from the main post. Indeed FILE_ID_EXTD_DIR_INFORMATION is not supported yet and that disappointing they are not doing a fallback when we return not supported. Do you have the possibility to build dokan and try to support this structure with the same data of the non extended version? Would be interesting to knoz if that's enough for the system. |
See my second post on that thread :) |
Ah that's again another case where STATUS_INVALID_PARAMETER is a better option to return :)! We really should one day change all of them. Would you have the possibility to make small pull request with this change? |
(Hold up, you're reading faster than I'm typing! :) I've got the code for the PR ready to go, I'm just filling out the paperwork for posterity.) |
Summary of the analysis on the DrivePool thread mentioned aboveThis issue is caused by a change in the way WSL exposes filesystems to Linux applications in WSL2. While WSL1 translated Linux syscalls into equivalent Windows ones in a kernel driver, WSL2 runs a full-fledged Linux kernel in a lightweight VM. Filesystems on the host are exposed to this Linux instance via a connection to a 9P2000.L fileserver over a Hyper-V Socket. (That's the remote filesystem protocol developed as part of the Plan 9 OS.) 9P2000 models a lightweight interface layer much more closely related to Dokan or FUSE than protocols like SMB/CIFS or NFS. FWIW, the Plan 9 server used by Windows was not developed specifically for WSL2, but was instead added as part of Windows Server Containers. After extensive disassembly and debugging, it was discovered that the server code resides in As far as standards go, [MS-FSCC] sections 2.4 and 2.5 seem to indicate that |
If anyone needs a fix right now and doesn't care how quick and dirty it is, I've cooked up a patch with Cheat Engine that will make WSL 2 compatible with current versions of Dokan. Don't use this unless you understand what it does. |
Environment
Check List
Description
A Dokan-based filesystem mounted into a WSL2 instance returns ENOSYS ("Function not implemented") when attempting to list the contents of a directory. (Note that files and their contents are still accessible.)
This error was discovered while debugging a similar issue with another third-party Windows filesystem, StableBit DrivePool; see here and here for more in-depth analysis.
Logs
mirror.log
driver.log
The text was updated successfully, but these errors were encountered: