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
mount: On Windows mounting two directorys in a row fails for the second one #12
Comments
This is a limitation of WinFsp-FUSE (i.e. the FUSE layer of WinFsp): you can only have one file system per process. The reason is explained below. There is no such limitation in the core WinFsp layer. You can have as many file systems as you want in a process either simultaneously or one after another. However file systems in Windows need to often be run as services and for this reason the core WinFsp layer also provides an API to facilitate this. The WinFsp-FUSE layer uses both the file system and service API's. This way a WinFsp-FUSE file system can easily become a Windows service. There is a problem: once a Windows process starts acting as a service and then stops being a service, it cannot become a service again (this is true of the WinFsp Service API, although I do not remember if this is an inherent limitation of the Windows Service API). Having FUSE file systems being able to act as Windows services is valuable. The downside is that you can only have one FUSE file system per process. Unfortunately this is not a limitation that I can fix as FUSE file systems would lose the "free" ability to act as Windows services. |
Might be a silly question, but isn't it possible to leave it up to the user to decide if he either wants the service thing or multiple mounts per process? In our case we'd decide for the latter. |
@overheadhunter not a silly question :) Unfortunately this is not how it was done! Changing it to support both scenarios is non-trivial at this point. May I ask why you need to have more than one fs per process? Is it for testing purposes or do you actually need this in your final product? |
Currently our software uses one process and is able to mount and unmount different directorys repeatedly (over webdav). Due some drawbacks of webdav we want to offer an alternative (FUSE), but changing to a multiple process architecture would mean a lot of refactoring. Therefore it would be cool when using FUSE/WinFsp this just needs one process at all 😄 |
This is a serious issue for me. I have two separate use cases that need this:
I am using WinFSP with jnr-fuse. And on my Mac OS X jnr-fuse works pretty well. But the Windows port has been spotty and my unit tests can't run at all on Windows because of the above reasons. Do you think there is anything that can be done to have a workaround? |
@billziss-gh as some time has passed, can you give us an update on this topic? We're about to release the first beta of Cryptomator with FUSE support for Mac and Linux and might need to think about an alternative for Windows otherwise. I really like how simple WinFsp works and would like to stick with it! |
@overheadhunter I understand. I have not had the chance to look into this as I have been busy with other projects. |
Closing this, as we no longer aim to support Windows. We're moving to dokany-nio-adapter. |
Basic Info
OS: Windows 10
fuse-nio-adapter: commit 426439b
Description
Mounting a directory after another mount operation was executed fails. (No matter if the latter directory is still mounted or already unmounted.)
On linux with the native fuse-layer it works.
Also noteworthy is the fact, that with two independent processes it works but with two threads it fails.
Attachments
The text was updated successfully, but these errors were encountered: