Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-18247

btrfs not working on Cygwin, NtQueryInformationFile broken on btrfs



    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None


      Detected on 0.4.14-release-15
      Last tested on 0.4.15-dev-5045

      btrfs filesystems are utterly broken on Cygwin.
      Tested on Cygwin 2.5.2 with some very crude logging added:

      I have tested the the btrfs driver on Windows Server 2003 Standard SP2
      (pre-compiled versions 1.5, 1.6, 1.7, 1.8 and 1.8.1) and all of them work with
      the same version of Cygwin.

      After a lot of digging, I've found that NtQueryInformationFile returns STATUS_ACCESS_DENIED on btrfs volumes.

      I made a test program for testing NtQueryInformationFile on both windows 2003 and ReactOS,
      I've attached the source code and the results with comments to this issue.

      Nothing is logged when running the test program:

      (dll/ntdll/ldr/ldrinit.c:1683) LdrpInitializeProcessCompat: Found guid for winver 0x600 in manifest from C:\Documents and Settings\Administrator\Desktop\test.exe
      (win32ss/user/ntuser/desktop.c:2726) err: Attempted to close thread desktop

      Nothing special is logged on shutdown either.

      Symptoms seen in Cygwin:

      • Most operations result in either "Not a directory" (I guess because /cygdrive/d appears as a regular file) or permission denied.
      • Both files and directories appear as files and their size is very wrong.
      • It is possible to execute files but not read and write.
      • open(2) works
      • read(2) fails with errno==ENOTDIR or errno==EPERM
      • mount options 'dos' and 'noacl' do not help
      • /cygdrive/d appears as a regular file with a size less than but close to 2^63-1 (This is NOT from NtQueryInformationFile)


        1. ReactOS.txt
          2 kB
        2. test.c
          4 kB
        3. W2003.txt
          2 kB



            Unassigned Unassigned
            oskog97 Oskar Skog
            1 Vote for this issue
            1 Start watching this issue