Re[2]: Cache Manager

Hello Maxim,


Roman Kudinov

mailto:xxxxx@rbcmail.ru

Monday, August 30, 2004, 2:06:23 AM, you wrote:

> from cache runs with PsGetCurrentProcessId()=4. Can I assume that it
> has ProcID==4 always on all OSes starting from Win2k? If not, is there
> a way to get know what ProcID does Cache Manager have?

MSS> Why do you need this?

I don’t want to intercept I/O requests twice for a single operation.
First my filter gets FAST I/O request and and in some time the lazy
writer sends a corresponding IRP_MJ_xxx request for the same file. So
if I could know that the current process is system then I could just
pass IRP_MJ_xxx request through.
On the other hand if I could use KeWaitForSingleObject in system
thread context I could pass through all FAST I/O requests.

> If I intercept an IRP in the context of Cache Manager does it mean
> that the dispatch routine is running in nonarbitrary thread context,
> i.e. can I use KeWaitForSingleObject in it?

MSS> You cannot block the paging writes.

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

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

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

Hello Maxim,

Is there a way to determine if the write is paging?


Roman Kudinov

mailto:xxxxx@rbcmail.ru

Monday, August 30, 2004, 2:06:23 AM, you wrote:

> from cache runs with PsGetCurrentProcessId()=4. Can I assume that it
> has ProcID==4 always on all OSes starting from Win2k? If not, is there
> a way to get know what ProcID does Cache Manager have?

MSS> Why do you need this?

> If I intercept an IRP in the context of Cache Manager does it mean
> that the dispatch routine is running in nonarbitrary thread context,
> i.e. can I use KeWaitForSingleObject in it?

MSS> You cannot block the paging writes.

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

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

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

> I don’t want to intercept I/O requests twice for a single operation.

Then intercept the noncached IO only, so that the cache will contain the
filtered data, and there will be no need in filtering FastIo.

You cannot block (wait on objects) in paging write paths, doing so will cause
the OS to hang.

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

IRP_PAGING_IO in Irp->Flags.

You cannot block in such a path. Pend the IRP instead.

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

----- Original Message -----
From: “Roman Kudinov”
To: “Windows File Systems Devs Interest List”
Sent: Monday, August 30, 2004 11:09 AM
Subject: Re[2]: [ntfsd] Cache Manager

> Hello Maxim,
>
> Is there a way to determine if the write is paging?
>
> –
> Roman Kudinov
>
>
> mailto:xxxxx@rbcmail.ru
>
>
> Monday, August 30, 2004, 2:06:23 AM, you wrote:
>
> >> from cache runs with PsGetCurrentProcessId()=4. Can I assume that it
> >> has ProcID==4 always on all OSes starting from Win2k? If not, is there
> >> a way to get know what ProcID does Cache Manager have?
>
> MSS> Why do you need this?
>
> >> If I intercept an IRP in the context of Cache Manager does it mean
> >> that the dispatch routine is running in nonarbitrary thread context,
> >> i.e. can I use KeWaitForSingleObject in it?
>
> MSS> You cannot block the paging writes.
>
>
> MSS> Maxim Shatskih, Windows DDK MVP
> MSS> StorageCraft Corporation
> MSS> xxxxx@storagecraft.com
> MSS> http://www.storagecraft.com
>
>
> MSS> —
> MSS> Questions? First check the IFS FAQ at
> MSS> https://www.osronline.com/article.cfm?id=17
>
> MSS> You are currently subscribed to ntfsd as: xxxxx@rbcmail.ru
> MSS> To unsubscribe send a blank email to
> MSS> xxxxx@lists.osr.com
>
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com