shomeier / dokan

Automatically exported from code.google.com/p/dokan
0 stars 0 forks source link

Create file don't report flag FILE_FLAG_WRITE_THROUGH and FILE_FLAG_NO_BUFFERING #216

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create file with flag  FILE_FLAG_NO_BUFFERING or FILE_FLAG_WRITE_THROUGH on 
a dokan mirror mounted disk
like that :
FileR = CreateFile(FileName, GENERIC_READ, 0, NULL, OPEN_EXISTING, 
FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH | FILE_ATTRIBUTE_NORMAL, 0);
2.
3.

What is the expected output? What do you see instead?

in MirrorCreateFile we should see the flag with :
    MirrorCheckFlag(FlagsAndAttributes, FILE_FLAG_WRITE_THROUGH);
    MirrorCheckFlag(FlagsAndAttributes, FILE_FLAG_NO_BUFFERING);
but no flag is set

What version of the product are you using? On what operating system?
Dokan 0.6.0 Win 7 x64

Please provide any additional information below.
Used for testing the disk speed in my case.

Original issue reported on code.google.com by david102...@gmail.com on 20 Mar 2011 at 6:59

GoogleCodeExporter commented 9 years ago
Aren't those flags included in the DokanInfo structure? e,g from .Net
   public class DokanFileInfo
   {
      public ulong refFileHandleContext; // Used by the ops.cs files to store a lookup to the FileStream etc.
      public bool IsDirectory;
      public uint ProcessId;
      public bool DeleteOnClose;
      public bool PagingIo;
      public bool SynchronousIo;               <---------
      public bool Nocache;                     <---------
      public bool WriteToEndOfFile;               <---------
   }
Have a look at the CreateFile handler in this:
http://liquesce.codeplex.com/SourceControl/changeset/view/63045#1409114

Original comment by smurf...@gmail.com on 23 Mar 2011 at 9:06

GoogleCodeExporter commented 9 years ago
Thanks, I found this flag is set in the sys\read.c file, line 150, not in the 
create file. I have the flag "Nocache" set in MirrorReadFile, not in 
MirrorCreateFile. This flag Shouldn't be set in MirrorCreateFile ?

Original comment by david102...@gmail.com on 23 Mar 2011 at 10:18