cache information.

Is it possible somehow to got to know what all files are mapped in the
system cache along with their respective offset.

Thanks in advance.

I want the cache information (file maps with their offset) that WinDbg gives
in my filter driver to the file system. Is this thing possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible somehow to got to know what all files are mapped in the
> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>

No, there is no way to programmatically ask the cache manager or memory
manager to enumerate all the files (with our without offsets) that
currently have views mapped in the system cache.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Monday, February 16, 2004 10:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

I want the cache information (file maps with their offset) that WinDbg
gives in my filter driver to the file system. Is this thing possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible somehow to got to know what all files are mapped in the

> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>


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

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

Using a windbg debugger extension command, Is it possible to traverse the list of file objects that are referenced by either the VMM or the CM or both.

This is useful in debugging potential referencing bugs wrt the FCB that is maintained by an FSD.

For example, at the time of reboot, if could traverse the list of all File Objects that are referenced by the VMM/CM, then I can tally the corresponding FCB structures that I maintain in my FSD. This could help in determining if there is any extra FCB reference leaked in my FSD code. Obviously this would be very useful in a running system as well.

Regards,

Manish

Molly Brown wrote:
No, there is no way to programmatically ask the cache manager or memory
manager to enumerate all the files (with our without offsets) that
currently have views mapped in the system cache.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Monday, February 16, 2004 10:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

I want the cache information (file maps with their offset) that WinDbg
gives in my filter driver to the file system. Is this thing possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible somehow to got to know what all files are mapped in the

> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to 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@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

The “!filecache” debugger extension will tell you what files are
currently mapped into the system cache. This extension can take a few
minutes to process the necessary information before printing out a chart
with a line for each stream that is mapped into the system cache.

The first column in this chart is Mm’s CONTROL_AREA structure, which can
be viewed using the “!ca” extension to give you the file object Mm has
remembered for the mappings.

Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Manish Apte
Sent: Tuesday, February 17, 2004 7:51 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] cache information.

Using a windbg debugger extension command, Is it possible to traverse
the list of file objects that are referenced by either the VMM or the CM
or both.

This is useful in debugging potential referencing bugs wrt the FCB that
is maintained by an FSD.

For example, at the time of reboot, if could traverse the list of all
File Objects that are referenced by the VMM/CM, then I can tally the
corresponding FCB structures that I maintain in my FSD. This could help
in determining if there is any extra FCB reference leaked in my FSD
code. Obviously this would be very useful in a running system as well.

Regards,

Manish

Molly Brown wrote:

No, there is no way to programmatically ask the cache manager or
memory
manager to enumerate all the files (with our without offsets)
that
currently have views mapped in the system cache.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers
no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Monday, February 16, 2004 10:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

I want the cache information (file maps with their offset) that
WinDbg
gives in my filter driver to the file system. Is this thing
possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible somehow to got to know what all files are
mapped in the

> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>


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

You are currently subscribed to ntfsd as:
xxxxx@windows.microsoft.com
To unsubscribe send a blank email to
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@yahoo.com
To unsubscribe send a blank email to
xxxxx@lists.osr.com

________________________________

Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
http:
— Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently subscribed
to ntfsd as: xxxxx@windows.microsoft.com To unsubscribe send a blank
email to xxxxx@lists.osr.com</http:>

Molly,

Thank for the information. I am familier with these very useful commands.

On a related note, Given a FCB in which I maintain a required members of type ‘FSRTL_COMMON_FCB_HEADER’ and ‘SECTION_OBJECT_POINTERS’, Is there a quick way to determine (using fields in the above structures), if the file is memory mapped by a client of the FSD (the client could be a user mode app or another kernel mode driver) ?

Is it possible that a file be memory mapped but has no open handles and no Cache Mgr references on the FIleObject/FCB, but the only reason why the FCB exists in memory is due to the ‘explicit’ memory mapping by a client (and not due to the ‘implicit’ memory mapping done by the Cache Mgr).

If I understand correcntly, the Mm’s CONTROL_AREA exists either because the client has requested a ‘explicit’ memory mapping or the Cache Mgr has requested Mm to create a memory mapping (which I refer to as ‘implicit’).

Regards,

Manish

Molly Brown wrote:
The “!filecache” debugger extension will tell you what files are
currently mapped into the system cache. This extension can take a few
minutes to process the necessary information before printing out a chart
with a line for each stream that is mapped into the system cache.

The first column in this chart is Mm’s CONTROL_AREA structure, which can
be viewed using the “!ca” extension to give you the file object Mm has
remembered for the mappings.

Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Manish Apte
Sent: Tuesday, February 17, 2004 7:51 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] cache information.

Using a windbg debugger extension command, Is it possible to traverse
the list of file objects that are referenced by either the VMM or the CM
or both.

This is useful in debugging potential referencing bugs wrt the FCB that
is maintained by an FSD.

For example, at the time of reboot, if could traverse the list of all
File Objects that are referenced by the VMM/CM, then I can tally the
corresponding FCB structures that I maintain in my FSD. This could help
in determining if there is any extra FCB reference leaked in my FSD
code. Obviously this would be very useful in a running system as well.

Regards,

Manish

Molly Brown wrote:

No, there is no way to programmatically ask the cache manager or
memory
manager to enumerate all the files (with our without offsets)
that
currently have views mapped in the system cache.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers
no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Monday, February 16, 2004 10:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

I want the cache information (file maps with their offset) that
WinDbg
gives in my filter driver to the file system. Is this thing
possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible somehow to got to know what all files are
mapped in the

> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>


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

You are currently subscribed to ntfsd as:
xxxxx@windows.microsoft.com
To unsubscribe send a blank email to
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@yahoo.com
To unsubscribe send a blank email to
xxxxx@lists.osr.com



Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

— Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently subscribed
to ntfsd as: xxxxx@windows.microsoft.com To unsubscribe send a blank
email to 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@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Both Mm and Cc take a reference on a file object for a stream if either
has data structures which reference that stream. If Mm has a data
structure referencing the stream, it will be the CONTROL_AREA; if Cc has
a data structure referencing the stream, it would be the
SHARED_CACHE_MAP. If there is a CONTROL_AREA for the stream, it will be
in the SectionObjectPointers->DataSectionObject field (NULL means no
CONTROL_AREA is currently setup for the file). If there is a
SHARED_CACHE_MAP around for the file, it will be in the
SectionObjectPointers->SharedCacheMap (NULL means no caching is setup
for the stream).

These can be useful fields to check during debugging, but if you check
them in code then execute code that requires that condition to remain
true (i.e., you see that there is no data section for the stream then
you take some action that is only valid if there are no data sections
for the stream), you need to make sure that you are properly
synchronized with section creation and cached IO operations to make sure
that the condition will not change while you execute the dependent code.

Mm and Cc will keep their references a file object for a stream as long
as either is still tracking data for this file.

Yes, it is possible for a file to be memory mapped, have no remaining
handles opened, and caching is not setup for the file. The user views
to the file may still be active and file data can be read and/or
modified through these views. When the dirty pages get flushed to disk,
the file system will see the writes as paging writes, but there is no
way to know that all dirty data has been flushed until you see the
IRP_MJ_CLOSE. At that point, you know that Mm has no more views backed
by this stream and all dirty data has been flushed to disk.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Manish Apte
Sent: Tuesday, February 17, 2004 1:38 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] cache information.

Molly,

Thank for the information. I am familier with these very useful
commands.

On a related note, Given a FCB in which I maintain a required members of
type ‘FSRTL_COMMON_FCB_HEADER’ and ‘SECTION_OBJECT_POINTERS’, Is there a
quick way to determine (using fields in the above structures), if the
file is memory mapped by a client of the FSD (the client could be a user
mode app or another kernel mode driver) ?

Is it possible that a file be memory mapped but has no open handles and
no Cache Mgr references on the FIleObject/FCB, but the only reason why
the FCB exists in memory is due to the ‘explicit’ memory mapping by a
client (and not due to the ‘implicit’ memory mapping done by the Cache
Mgr).

If I understand correcntly, the Mm’s CONTROL_AREA exists either because
the client has requested a ‘explicit’ memory mapping or the Cache Mgr
has requested Mm to create a memory mapping (which I refer to as
‘implicit’).

Regards,

Manish

Molly Brown wrote:

The “!filecache” debugger extension will tell you what files are
currently mapped into the system cache. This extension can take
a few
minutes to process the necessary information before printing out
a chart
with a line for each stream that is mapped into the system
cache.

The first column in this chart is Mm’s CONTROL_AREA structure,
which can
be viewed using the “!ca” extension to give you the file object
Mm has
remembered for the mappings.

Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers
no
rights.



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Manish
Apte
Sent: Tuesday, February 17, 2004 7:51 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] cache information.

Using a windbg debugger extension command, Is it possible to
traverse
the list of file objects that are referenced by either the VMM
or the CM
or both.

This is useful in debugging potential referencing bugs wrt the
FCB that
is maintained by an FSD.

For example, at the time of reboot, if could traverse the list
of all
File Objects that are referenced by the VMM/CM, then I can tally
the
corresponding FCB structures that I maintain in my FSD. This
could help
in determining if there is any extra FCB reference leaked in my
FSD
code. Obviously this would be very useful in a running system as
well.

Regards,

Manish

Molly Brown wrote:

No, there is no way to programmatically ask the cache manager or
memory
manager to enumerate all the files (with our without offsets)
that
currently have views mapped in the system cache.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers
no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Monday, February 16, 2004 10:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

I want the cache information (file maps with their offset) that
WinDbg
gives in my filter driver to the file system. Is this thing
possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible somehow to got to know what all files are
mapped in the

> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>


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

You are currently subscribed to ntfsd as:
xxxxx@windows.microsoft.com
To unsubscribe send a blank email to
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@yahoo.com
To unsubscribe send a blank email to
xxxxx@lists.osr.com



Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

— Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently
subscribed
to ntfsd as: xxxxx@windows.microsoft.com To unsubscribe send
a blank
email to 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@yahoo.com
To unsubscribe send a blank email to
xxxxx@lists.osr.com

________________________________

Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
http:
— Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently subscribed
to ntfsd as: xxxxx@windows.microsoft.com To unsubscribe send a blank
email to xxxxx@lists.osr.com</http:>

Thanks Molly,
But is it possible to get the cache information of a particular file object
after picking the file object from the IRP while sitting over the file
system filter driver.

Thanks
=vikramsingh

“Molly Brown” wrote in message
news:xxxxx@ntfsd…
No, there is no way to programmatically ask the cache manager or memory
manager to enumerate all the files (with our without offsets) that
currently have views mapped in the system cache.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Monday, February 16, 2004 10:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

I want the cache information (file maps with their offset) that WinDbg
gives in my filter driver to the file system. Is this thing possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible somehow to got to know what all files are mapped in the

> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>


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

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

Don’t forget to set the Global Flag to enable the lists of objects of the same type.

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

----- Original Message -----
From: Manish Apte
To: Windows File Systems Devs Interest List
Sent: Tuesday, February 17, 2004 6:50 PM
Subject: RE: [ntfsd] cache information.

Using a windbg debugger extension command, Is it possible to traverse the list of file objects that are referenced by either the VMM or the CM or both.

This is useful in debugging potential referencing bugs wrt the FCB that is maintained by an FSD.

For example, at the time of reboot, if could traverse the list of all File Objects that are referenced by the VMM/CM, then I can tally the corresponding FCB structures that I maintain in my FSD. This could help in determining if there is any extra FCB reference leaked in my FSD code. Obviously this would be very useful in a running system as well.

Regards,

Manish

Molly Brown wrote:
No, there is no way to programmatically ask the cache manager or memory
manager to enumerate all the files (with our without offsets) that
currently have views mapped in the system cache.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Monday, February 16, 2004 10:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

I want the cache information (file maps with their offset) that WinDbg
gives in my filter driver to the file system. Is this thing possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible ! somehow to got to know what all files are mapped in the

> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to 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@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

------------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online — 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

No – even a file system doesn’t know exactly what ranges of the file
are mapped into the system cache at a given time unless it is using the
cache manager pinning interfaces (which are typically only used for
metadata files).

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Tuesday, February 17, 2004 5:11 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

Thanks Molly,
But is it possible to get the cache information of a particular file
object after picking the file object from the IRP while sitting over the
file system filter driver.

Thanks
=vikramsingh

“Molly Brown” wrote in message
news:xxxxx@ntfsd…
No, there is no way to programmatically ask the cache manager or memory
manager to enumerate all the files (with our without offsets) that
currently have views mapped in the system cache.

Thanks,
Molly Brown
Microsoft Corporation

This posting is provided “AS IS” with no warranties and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vikram
Sent: Monday, February 16, 2004 10:45 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] cache information.

I want the cache information (file maps with their offset) that WinDbg
gives in my filter driver to the file system. Is this thing possible?

Thanks in Advance.

“vikram” wrote in message news:xxxxx@ntfsd…
> Is it possible somehow to got to know what all files are mapped in the

> system cache along with their respective offset.
>
>
> Thanks in advance.
>
>
>


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

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to 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@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com