From a File System Minifilter: If FLT_IS_IRP_OPERATION returns non-zero, is it guaranteed that the file read/write is going to access the storage device? Does FLT_IS_FASTIO_OPERATION returning non-zero mean the read/write is definitely NOT going to access the storage device?
No to both you cannot use this to guarantee anything about whether this
is going to access storage.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
“xxxxx@yahoo.com” wrote in message
news:xxxxx@ntfsd:
> From a File System Minifilter: If FLT_IS_IRP_OPERATION returns non-zero, is it guaranteed that the file read/write is going to access the storage device? Does FLT_IS_FASTIO_OPERATION returning non-zero mean the read/write is definitely NOT going to access the storage device?
So, Fast IO is not 100% guaranteed to be reading from the cache? I guess maybe that is just where it is going to look 1st?
What the file system does is totally dependent on its design, you cannot
use this to predict much at all.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
“xxxxx@yahoo.com” wrote in message
news:xxxxx@ntfsd:
> So, Fast IO is not 100% guaranteed to be reading from the cache? I guess maybe that is just where it is going to look 1st?
What if I guarantee NTFS?
I think FastIo is designed to do nonblocking operations, and cannot block, it returns FALSE to if blocking is needed, and the OS goes the IRP way.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
“Don Burn” wrote in message news:xxxxx@ntfsd…
> What the file system does is totally dependent on its design, you cannot
> use this to predict much at all.
>
>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “xxxxx@yahoo.com” wrote in message
> news:xxxxx@ntfsd:
>
>> So, Fast IO is not 100% guaranteed to be reading from the cache? I guess maybe that is just where it is going to look 1st?
>
>
Max you are correct, but as someone who has worked on file systems for
windows (not just filters) it is amazing what the code can do. So yes
it will not block, but assuming that it gets things from the cache is
also not valid in the general case. For Microsoft file systems, that is
probably an ok assumption.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd:
> I think FastIo is designed to do nonblocking operations, and cannot block, it returns FALSE to if blocking is needed, and the OS goes the IRP way.
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> “Don Burn” wrote in message news:xxxxx@ntfsd…
> > What the file system does is totally dependent on its design, you cannot
> > use this to predict much at all.
> >
> >
> > Don Burn (MVP, Windows DKD)
> > Windows Filesystem and Driver Consulting
> > Website: http://www.windrvr.com
> > Blog: http://msmvps.com/blogs/WinDrvr
> >
> >
> >
> >
> > “xxxxx@yahoo.com” wrote in message
> > news:xxxxx@ntfsd:
> >
> >> So, Fast IO is not 100% guaranteed to be reading from the cache? I guess maybe that is just where it is going to look 1st?
> >
> >
The definition of “Blocking” here is entirely FSD defined.
For a cache-integrated FSD, the typical way to implement a fast I/O call is going to be to call CcCopyRead/CcCopyWrite (FAT does this indirectly by using the FsRtl implementations, but most other file systems seem to build this on their own these days.) Note that CcCopyRead/CcCopyWrite do not guarantee the data is in the cache - if it isn’t, there’s a secondary IRP generated to satisfy the page fault.
What you DO know about this is that if the I/O originated with the I/O Manager, the file object has been set up for caching already (FileObject->PrivateCacheMap != NULL, and for a cache integrated FSD this points to a cache manager data structure.) Otherwise the I/O Manager will take the IRP path.
Tony
OSR
>seem to build this on their own these days.) Note that CcCopyRead/CcCopyWrite do not guarantee the data is in
the cache - if it isn’t, there’s a secondary IRP generated to satisfy the page fault.
Yes, but the BOOLEAN Wait parameter can be set to FALSE if CcCopyRead is called from FastIo path.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com