Hello,
I need to detect paging io in a disk filter.
I added the following code in the Read/Write routine:
if(Irp->Flags & (IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO))
{
DbgPrint(“This is a paging IO\n”);
}
and it works fine when the pagefile is located on a basic disk.
But, if the pagefile is located on a dynamic disk, the Irp->Flags is
always 0.
Does anyone know of a way to identify paging IO on dynamic disks ?
Regards,
Dror.
Are you trying to detect write to a paging file or you want to detect that
write request transfers data from cache to disk?
IRP_PAGING_IO flag is meaningful only for file system drivers. This flag is
set for every request to write data from cache to disk, not only for a
pagefile. Disk filter will see this flag if file system doesn’t create
another IRP to write data to the disk. Normally it creates IRPs only if it
need to split original request but you should not rely on this, it may
create a new IRP under other circumstances as well.
Alexei.
wrote in message news:xxxxx@ntdev…
>
> Hello,
>
> I need to detect paging io in a disk filter.
>
> I added the following code in the Read/Write routine:
> if(Irp->Flags & (IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO))
> {
> DbgPrint(“This is a paging IO\n”);
> }
> and it works fine when the pagefile is located on a basic disk.
>
> But, if the pagefile is located on a dynamic disk, the Irp->Flags is
> always 0.
>
> Does anyone know of a way to identify paging IO on dynamic disks ?
>
> Regards,
> Dror.
>
>
Actually the disk class driver propagates the paging flag by setting
SRB_CLASS_FLAGS_PAGING in the SRB, although this is private to the
classpnp library. Also, it may very well be of interest to know if a disk
IO request is a paging request for storage components below the
filesystem, such as replication services, it just isn’t clear that this
information is reliably propagated.
===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032
-----Original Message-----
From: “Alexei Jelvis”
To: “Windows System Software Devs Interest List”
Date: Fri, 21 Nov 2003 21:17:30 -0500
Subject: [ntdev] Re: Irp->Flags on dynamic disk
> Are you trying to detect write to a paging file or you want to detect
> that
> write request transfers data from cache to disk?
> IRP_PAGING_IO flag is meaningful only for file system drivers. This
> flag is
> set for every request to write data from cache to disk, not only for a
> pagefile. Disk filter will see this flag if file system doesn’t create
> another IRP to write data to the disk. Normally it creates IRPs only if
> it
> need to split original request but you should not rely on this, it may
> create a new IRP under other circumstances as well.
>
> Alexei.
>
> wrote in message news:xxxxx@ntdev…
> >
> > Hello,
> >
> > I need to detect paging io in a disk filter.
> >
> > I added the following code in the Read/Write routine:
> > if(Irp->Flags & (IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO))
> > {
> > DbgPrint(“This is a paging IO\n”);
> > }
> > and it works fine when the pagefile is located on a basic disk.
> >
> > But, if the pagefile is located on a dynamic disk, the Irp->Flags is
> > always 0.
> >
> > Does anyone know of a way to identify paging IO on dynamic disks ?
> >
> > Regards,
> > Dror.
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com