You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 9, 2022. It is now read-only.
In our current trial implementation of GVFS.Platform.Linux/LinuxFileSystemVirtualizer, we don't wait after calling the ProjFS.LinuxStartVirtualizationInstance() method for our FUSE mount to actually be ready.
This may result in problems where the GVFS provider code proceeds, expecting the mount to be complete, while the asynchronous libfuse/libprojfs threads are still coordinating with the FUSE kernel module to bring up the mount.
We know from experience with the libprojfs test suite that waiting until the mount point's device ID changes is necessary, so we likely should implement the same logic from wait_mount.c in LinuxFileSystemVirtualizer.TryStart():
Read the current device ID of the Enlistment.WorkingDirectoryRoot (i.e., the src/ directory) using stat(2).
Invoke virtualizationInstance.StartVirtualizationInstance() as is done now.
On successful return, poll at short intervals using stat(2) until the device ID changes.
If the device ID doesn't change after some reasonable timeout period (e.g., 30 seconds?), execute virtualizationInstance.StopVirtualizationInstance() and return an error.
One implementation note involves the complexity of calling stat(2), which is non-trivial; see the current use in MirrorProvider.Linux/LinuxFileSystemVirtualizer and also in GVFS/GVFS.Platform.Linux/LinuxFileSystem. Before we introduce another clone of this code, we should refactor it down to a common set of __xstat64() and __lxstat64() wrappers, perhaps provided by ProjFS.Linux, which can then be used in both LinuxFileSystem and LinuxFileSystemVirtualizer, and elsewhere as needed.
The text was updated successfully, but these errors were encountered:
In our current trial implementation of
GVFS.Platform.Linux/LinuxFileSystemVirtualizer
, we don't wait after calling theProjFS.Linux
StartVirtualizationInstance()
method for our FUSE mount to actually be ready.This may result in problems where the GVFS provider code proceeds, expecting the mount to be complete, while the asynchronous libfuse/libprojfs threads are still coordinating with the FUSE kernel module to bring up the mount.
We know from experience with the libprojfs test suite that waiting until the mount point's device ID changes is necessary, so we likely should implement the same logic from
wait_mount.c
inLinuxFileSystemVirtualizer.TryStart()
:Enlistment.WorkingDirectoryRoot
(i.e., thesrc/
directory) usingstat(2)
.virtualizationInstance.StartVirtualizationInstance()
as is done now.stat(2)
until the device ID changes.If the device ID doesn't change after some reasonable timeout period (e.g., 30 seconds?), execute
virtualizationInstance.StopVirtualizationInstance()
and return an error.One implementation note involves the complexity of calling
stat(2)
, which is non-trivial; see the current use inMirrorProvider.Linux/LinuxFileSystemVirtualizer
and also inGVFS/GVFS.Platform.Linux/LinuxFileSystem
. Before we introduce another clone of this code, we should refactor it down to a common set of__xstat64()
and__lxstat64()
wrappers, perhaps provided byProjFS.Linux
, which can then be used in bothLinuxFileSystem
andLinuxFileSystemVirtualizer
, and elsewhere as needed.The text was updated successfully, but these errors were encountered: