Hi all,
Microsoft documentation says FO_CACHE_SUPPORTED flag should be set by the file system driver when the cache is available, which means the application didn’t request FILE_NO_INTERMEDIATE_BUFFERING on FASTFAT sources.
But what about a redirector? The cache support will change depending on the oplock state. A file can be fully cached on a exclusive open (oplock level 1), but the cache will be disabled if the same file was opened remotely for read/write (oplock broken to none).
I know that flag is checked when a client desires to reach the file content via MDL (IRP_MN_MDL). I also did a couple of tests with SMB and I saw it doesn’t set this flag even having the cache initiated for that file object (FileObject->PrivateCacheMap != NULL).
If my file system driver is a redirector, should I always leave that flag clean?
OR
Should I SET and CLEAR that flag depending on the oplock state?
Thanks in advance,
Fernando Roberto da Silva
DriverEntry Kernel Development
http:\www.driverentry.com.br
As far as I know this flag is implementation specific and can be used by
the FS implementation as a clue as to how the file was opened. The more
important flag, FO_NO_INTERMEDIATE_BUFFERING, drives the caching
behavior in the end. There is more information on this at Alex’s blog
http://fsfilters.blogspot.com/2012_06_01_archive.html
Pete
–
Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295
------ Original Message ------
From: xxxxx@driverentry.com.br
To: “Windows File Systems Devs Interest List”
Sent: 2/10/2015 6:30:02 AM
Subject: [ntfsd] FO_CACHE_SUPPORTED and Oplocks
>Hi all,
>
>Microsoft documentation says FO_CACHE_SUPPORTED flag should be set by
>the file system driver when the cache is available, which means the
>application didn’t request FILE_NO_INTERMEDIATE_BUFFERING on FASTFAT
>sources.
>
>But what about a redirector? The cache support will change depending on
>the oplock state. A file can be fully cached on a exclusive open
>(oplock level 1), but the cache will be disabled if the same file was
>opened remotely for read/write (oplock broken to none).
>
>I know that flag is checked when a client desires to reach the file
>content via MDL (IRP_MN_MDL). I also did a couple of tests with SMB and
>I saw it doesn’t set this flag even having the cache initiated for that
>file object (FileObject->PrivateCacheMap != NULL).
>
>If my file system driver is a redirector, should I always leave that
>flag clean?
>OR
>Should I SET and CLEAR that flag depending on the oplock state?
>
>Thanks in advance,
>–
>Fernando Roberto da Silva
>DriverEntry Kernel Development
>http:\www.driverentry.com.br
>
>—
>NTFSD is sponsored by OSR
>
>OSR is hiring!! Info at http://www.osr.com/careers
>
>For our schedule of debugging and file system seminars visit:
>http://www.osr.com/seminars
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer