IRP_PAGING_IO

What does it mean when an IRP has this flag set ?

Is it as obvious as the current operation is a paging
request - that is - it is currently either reading or writing
to/from the paging file or swap space (executable image) ?

Thanks,
Gary

For reads, this is either:

  • page fault on pagefile
  • page fault on mapped file
  • cache miss
  • cache read-ahead

For writes, this is either:

  • page write to pagefile by MM
  • page write to mapped file by MM
  • cache flush - by lazy writer or explicit CcFlushCache

All paging IO is noncached IO, and IRP_PAGING_IO implies IRP_NOCACHE.

The reason that IRP_PAGING_IO exists and is not equal to IRP_NOCACHE is the
usual IO (ReadFile/WriteFile) on a file opened without any caching. Such IRPs
will have IRP_NOCACHE, but not IRP_PAGING_IO.

FSDs use IRP_PAGING_IO to know that the FCB locks are already grabbed by
the caller - by MM via the FastIo locking callbacks, or by Cc via
AcquireForLazyWrite or such.

Paging writes cannot extend the EOF value, while the non-paging non-cached
writes can.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Thanks Maxim. I get back with questions (if any) once this info sinks in.

Gary

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> For reads, this is either:
>
> - page fault on pagefile
> - page fault on mapped file
> - cache miss
> - cache read-ahead
>
> For writes, this is either:
>
> - page write to pagefile by MM
> - page write to mapped file by MM
> - cache flush - by lazy writer or explicit CcFlushCache
>
> All paging IO is noncached IO, and IRP_PAGING_IO implies IRP_NOCACHE.
>
> The reason that IRP_PAGING_IO exists and is not equal to IRP_NOCACHE
is the
> usual IO (ReadFile/WriteFile) on a file opened without any caching. Such
IRPs
> will have IRP_NOCACHE, but not IRP_PAGING_IO.
>
> FSDs use IRP_PAGING_IO to know that the FCB locks are already grabbed
by
> the caller - by MM via the FastIo locking callbacks, or by Cc via
> AcquireForLazyWrite or such.
>
> Paging writes cannot extend the EOF value, while the non-paging
non-cached
> writes can.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>