Skip to content

Creation of a disk file system may fail #88

@billziss-gh

Description

@billziss-gh

There is a report that creation of a disk file system on 32-bit Windows may fail with STATUS_NOT_IMPLEMENTED (c000002) during FspFsctlCreateVolume. The issue happens on 32-bit Windows only. See issue hasse69/rar2fs#75.

According to @hasse69 this happens when mounting a cygfuse file system as a "disk" drive (\Device\WinFsp.Disk), but not a "network" drive (\Device\WinFsp.Net). After adding debug log instructions to the WinFsp DLL we were able to isolate this problem in the following DeviceIoControl call:

https://github.com/billziss-gh/winfsp/blob/v1.0/src/dll/fsctl.c#L83-L90

    if (!DeviceIoControl(VolumeHandle, FSP_FSCTL_VOLUME_NAME,
        0, 0,
        VolumeNameBuf, (DWORD)VolumeNameSize,
        &Bytes, 0))
    {
        Result = FspNtStatusFromWin32(GetLastError());
        goto exit;
    }

This fails with ERROR_INVALID_FUNCTION (which gets translated to STATUS_NOT_IMPLEMENTED). The likely reason for the ERROR_INVALID_FUNCTION error return is a STATUS_INVALID_DEVICE_REQUEST response from the FSD.

I am unable to reproduce this problem on any of my local 32-bit VM's. Complete diag.bat output from @hasse69 below:

WINFSP INSTALLATION DIRECTORY AND LAUNCHER REGISTRATIONS

HKEY_LOCAL_MACHINE\SOFTWARE\WinFsp
    InstallDir    REG_SZ    C:\Program Files\WinFsp\

HKEY_LOCAL_MACHINE\SOFTWARE\WinFsp\Services

HKEY_LOCAL_MACHINE\SOFTWARE\WinFsp\Services\memfs-dotnet
    Executable    REG_SZ    C:\Program Files\WinFsp\bin\memfs-dotnet-msil.exe
    CommandLine    REG_SZ    -i -F NTFS -n 65536 -s 67108864 -u %1 -m %2
    Security    REG_SZ    D:P(A;;RPWPLC;;;WD)
    JobControl    REG_DWORD    0x1

HKEY_LOCAL_MACHINE\SOFTWARE\WinFsp\Services\memfs32
    Executable    REG_SZ    C:\Program Files\WinFsp\bin\memfs-x86.exe
    CommandLine    REG_SZ    -i -F NTFS -n 65536 -s 67108864 -u %1 -m %2
    Security    REG_SZ    D:P(A;;RPWPLC;;;WD)
    JobControl    REG_DWORD    0x1

HKEY_LOCAL_MACHINE\SOFTWARE\WinFsp\Services\memfs64
    Executable    REG_SZ    C:\Program Files\WinFsp\bin\memfs-x64.exe
    CommandLine    REG_SZ    -i -F NTFS -n 65536 -s 67108864 -u %1 -m %2
    Security    REG_SZ    D:P(A;;RPWPLC;;;WD)
    JobControl    REG_DWORD    0x1


WINFSP DLL REGISTRATIONS

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
    ProviderOrder    REG_SZ    LanmanWorkstation,RDPNP,webclient,Dokan1,WinFsp.Np


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinFsp.Np\NetworkProvider
    Name    REG_SZ    Windows File System Proxy
    ProviderPath    REG_SZ    C:\Program Files\WinFsp\bin\winfsp-x86.dll


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\WinFsp
    EventMessageFile    REG_SZ    C:\Program Files\WinFsp\bin\winfsp-x86.dll
    TypesSupported    REG_DWORD    0x7


WINFSP FSD CONFIGURATION AND STATUS

SERVICE_NAME: WinFsp
        TYPE               : 2  FILE_SYSTEM_DRIVER
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: WinFsp
        TYPE               : 2  FILE_SYSTEM_DRIVER
        START_TYPE         : 3   DEMAND_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : \??\C:\Program Files\WinFsp\bin\winfsp-x86.sys
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : WinFsp
        DEPENDENCIES       :
        SERVICE_START_NAME :

D:(A;;LCRP;;;WD)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)

WINFSP LAUNCHER SERVICE CONFIGURATION AND STATUS

SERVICE_NAME: WinFsp.Launcher
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: WinFsp.Launcher
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 0   IGNORE
        BINARY_PATH_NAME   : "C:\Program Files\WinFsp\bin\launcher-x86.exe"
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : WinFsp.Launcher
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem

D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)

OS INFORMATION

Host Name:                 LURCH
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.14393 N/A Build 14393
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          Hasse
Registered Organization:
Product ID:                00330-80000-00000-AA460
Original Install Date:     2016-08-09, 07:32:46
System Boot Time:          2017-05-22, 23:43:19
System Manufacturer:       System manufacturer
System Model:              P5K PRO
System Type:               X86-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: x64 Family 6 Model 23 Stepping 7 GenuineIntel ~2830 Mhz
BIOS Version:              American Megatrends Inc. 1303   , 2008-12-16
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             sv;Swedish
Input Locale:              sv;Swedish
Time Zone:                 (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
Total Physical Memory:     3▒327 MB
Available Physical Memory: 1▒488 MB
Virtual Memory: Max Size:  6▒655 MB
Virtual Memory: Available: 3▒606 MB
Virtual Memory: In Use:    3▒049 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\LURCH
Hotfix(s):                 8 Hotfix(s) Installed.
                           [01]: KB3150513
                           [02]: KB3176936
                           [03]: KB3199209
                           [04]: KB3199986
                           [05]: KB3211320
                           [06]: KB4013418
                           [07]: KB4020821
                           [08]: KB4019472
Network Card(s):           2 NIC(s) Installed.
                           [01]: VMware Virtual Ethernet Adapter for VMnet1
                                 Connection Name: Ethernet
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.119.254
                                 IP address(es)
                                 [01]: 192.168.119.1
                                 [02]: fe80::6023:349e:8ad2:ebe8
                           [02]: Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller
                                 Connection Name: Local Area Connection
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.0.1
                                 IP address(es)
                                 [01]: 192.168.0.10
                                 [02]: fe80::60f4:ba3b:1d53:3521
Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: No
                           Data Execution Prevention Available: Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions