Re[4]: Cache Manager

Hello Maxim,

Thanks a lot


Roman Kudinov

mailto:xxxxx@rbcmail.ru

Monday, August 30, 2004, 1:07:09 PM, you wrote:

MSS> IRP_PAGING_IO in Irp->Flags.

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

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

MSS> ----- Original Message -----
MSS> From: “Roman Kudinov”
MSS> To: “Windows File Systems Devs Interest List”
MSS> Sent: Monday, August 30, 2004 11:09 AM
MSS> 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
MSS> 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

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

You cannot assume that the system process PID will be 4. It has changed
in the past, it is likely to change in the future. If you need to know
the PID of the system process, acquire it in your DriverEntry function
(since drivers are always initialized by the system process).

So long as IRQL < DISPATCH_LEVEL you can call KeWaitForSingleObject with
an arbitrary timeout. If IRQL == DISPATCH_LEVEL you can call
KeWaitForSingleObject with a zero timeout value (not a NULL pointer, but
a pointer to a 64-bit zero number).

Regards,

Tony

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

Looking forward to seeing you at the Next OSR File Systems Class October
18, 2004 in Silicon Valley!

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roman Kudinov
Sent: Saturday, August 28, 2004 6:01 AM
To: ntfsd redirect
Subject: [ntfsd] Cache Manager

Hi,

My filesystem filter driver shows that process which flushes buffers
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?

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?


Roman Kudinov

mailto:xxxxx@rbcmail.ru


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