NT I/O Mgr does not request FastIoRead to my FSD.

Hi all,

I’m developing a kind of network FSD.

I have noticed there must follow FastIoRead after IRP_MJ_READ for normal FSD
(NTFS or Fastfat).
Those steps are IRP_MJ_CREATE -> IRP_MJ_READ -> FastIoRead -> FastIoRead ->
… -> IRP_MJ_CLOSE .

But there was no FastIoRead request to my FSD.
IRP_M_CREATE -> IRP_MJ_READ -> IRP_MJ_CLOSE.

I have checked IRP_MJ_QUERY_INFORMATION, it returns the file size correctly,
IRP_MJ_READ, it changes FileObject->CurrentByteOffset.
What should I check for this problem ? How the NT I/O Manager request
FastIoRead ?

Thanks,
Eddie

Have you set up caching in your file system?

When you call CcInitializeCacheMap the Cache Manager sets
FileObject->SectionObjectPointers.SharedCacheMap and
FileObject->PrivateCacheMap. The I/O Manager notices when this is done
and invokes your fast I/O function as a result.

Note that just because it is CALLED fast I/O doesn’t mean that it will
provide you with any measurable benefit. The one operation that does
benefit most is in fact the one that takes an IRP (it rolls create,
query information, cleanup and close into a single operation.) In fact,
if you implement just that one and ignore the others you’ve likely
gained 80% of the total potential optimization.

But for read and write, the idea is that once you’re integrated with the
cache you can use the FsRtl functions (FsRtlCopyRead and FsRtlCopyWrite)
for your fast I/O implementation with minimal overhead. That’s the
theory, but not every file system does that…

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of EddieShim
Sent: Monday, September 11, 2006 6:54 PM
To: ntfsd redirect
Subject: [ntfsd] NT I/O Mgr does not request FastIoRead to my FSD.

Hi all,

I’m developing a kind of network FSD.

I have noticed there must follow FastIoRead after IRP_MJ_READ for normal
FSD
(NTFS or Fastfat).
Those steps are IRP_MJ_CREATE -> IRP_MJ_READ -> FastIoRead -> FastIoRead
->
… -> IRP_MJ_CLOSE .

But there was no FastIoRead request to my FSD.
IRP_M_CREATE -> IRP_MJ_READ -> IRP_MJ_CLOSE.

I have checked IRP_MJ_QUERY_INFORMATION, it returns the file size
correctly,
IRP_MJ_READ, it changes FileObject->CurrentByteOffset.
What should I check for this problem ? How the NT I/O Manager request
FastIoRead ?

Thanks,
Eddie


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hello,

Yes, I have setted caching.
The actual processes for read requests are,
IRP_M_CREATE -> IRP_MJ_READ(Cached) -> IRP_MJ_READ(NonCached, from CM)->
IRP_MJ_CLOSE.

Thanks,
Eddie

“Tony Mason” wrote in message news:xxxxx@ntfsd…
Have you set up caching in your file system?

When you call CcInitializeCacheMap the Cache Manager sets
FileObject->SectionObjectPointers.SharedCacheMap and
FileObject->PrivateCacheMap. The I/O Manager notices when this is done
and invokes your fast I/O function as a result.

Note that just because it is CALLED fast I/O doesn’t mean that it will
provide you with any measurable benefit. The one operation that does
benefit most is in fact the one that takes an IRP (it rolls create,
query information, cleanup and close into a single operation.) In fact,
if you implement just that one and ignore the others you’ve likely
gained 80% of the total potential optimization.

But for read and write, the idea is that once you’re integrated with the
cache you can use the FsRtl functions (FsRtlCopyRead and FsRtlCopyWrite)
for your fast I/O implementation with minimal overhead. That’s the
theory, but not every file system does that…

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of EddieShim
Sent: Monday, September 11, 2006 6:54 PM
To: ntfsd redirect
Subject: [ntfsd] NT I/O Mgr does not request FastIoRead to my FSD.

Hi all,

I’m developing a kind of network FSD.

I have noticed there must follow FastIoRead after IRP_MJ_READ for normal
FSD
(NTFS or Fastfat).
Those steps are IRP_MJ_CREATE -> IRP_MJ_READ -> FastIoRead -> FastIoRead
->
… -> IRP_MJ_CLOSE .

But there was no FastIoRead request to my FSD.
IRP_M_CREATE -> IRP_MJ_READ -> IRP_MJ_CLOSE.

I have checked IRP_MJ_QUERY_INFORMATION, it returns the file size
correctly,
IRP_MJ_READ, it changes FileObject->CurrentByteOffset.
What should I check for this problem ? How the NT I/O Manager request
FastIoRead ?

Thanks,
Eddie


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I found the problem by myself.
I missed set the Fcb->Header->FileSize.
Anyway, thank you very much.

Regards,
Eddie

“Tony Mason” wrote in message news:xxxxx@ntfsd…
Have you set up caching in your file system?

When you call CcInitializeCacheMap the Cache Manager sets
FileObject->SectionObjectPointers.SharedCacheMap and
FileObject->PrivateCacheMap. The I/O Manager notices when this is done
and invokes your fast I/O function as a result.

Note that just because it is CALLED fast I/O doesn’t mean that it will
provide you with any measurable benefit. The one operation that does
benefit most is in fact the one that takes an IRP (it rolls create,
query information, cleanup and close into a single operation.) In fact,
if you implement just that one and ignore the others you’ve likely
gained 80% of the total potential optimization.

But for read and write, the idea is that once you’re integrated with the
cache you can use the FsRtl functions (FsRtlCopyRead and FsRtlCopyWrite)
for your fast I/O implementation with minimal overhead. That’s the
theory, but not every file system does that…

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of EddieShim
Sent: Monday, September 11, 2006 6:54 PM
To: ntfsd redirect
Subject: [ntfsd] NT I/O Mgr does not request FastIoRead to my FSD.

Hi all,

I’m developing a kind of network FSD.

I have noticed there must follow FastIoRead after IRP_MJ_READ for normal
FSD
(NTFS or Fastfat).
Those steps are IRP_MJ_CREATE -> IRP_MJ_READ -> FastIoRead -> FastIoRead
->
… -> IRP_MJ_CLOSE .

But there was no FastIoRead request to my FSD.
IRP_M_CREATE -> IRP_MJ_READ -> IRP_MJ_CLOSE.

I have checked IRP_MJ_QUERY_INFORMATION, it returns the file size
correctly,
IRP_MJ_READ, it changes FileObject->CurrentByteOffset.
What should I check for this problem ? How the NT I/O Manager request
FastIoRead ?

Thanks,
Eddie


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com