how to detect page file in pre-setFileInfo?

In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
callbacks for “\pagefile.sys”. I tried to detect this with
FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
SL_OPEN_PAGING_FILE ), but neither will say this is a page file.

Does anyone else try to detect paging files in a pre-op
IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
post-op next.

> I will try FsRtlIsPagingFile in the post-op next.

That isn’t working either. I have a big problem here because I am calling
FltGetStreamContext and it is giving me an assert because the irql >
APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert
failure I can’t just take a bad status code from FltGetStreamContext and
assume it is a paging file. I wish FltMgr would return more bad status
values and assert less.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
> callbacks for “\pagefile.sys”. I tried to detect this with
> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>
> Does anyone else try to detect paging files in a pre-op
> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
> post-op next.
>
>

Mark,

Look for the flag in IRP_MJ_CREATE (that’s the only time the
SL_OPEN_PAGING_FILE bit will be set) and store that away. As I recall
the FsRtl routine only works for XP and newer. Checking for the flag in
IRP_MJ_CREATE and storing that information will work for ALL versions.

Regards,

Tony

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Friday, April 01, 2005 5:29 AM
To: ntfsd redirect
Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?

I will try FsRtlIsPagingFile in the post-op next.

That isn’t working either. I have a big problem here because I am
calling
FltGetStreamContext and it is giving me an assert because the irql >
APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert

failure I can’t just take a bad status code from FltGetStreamContext and

assume it is a paging file. I wish FltMgr would return more bad status
values and assert less.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
> callbacks for “\pagefile.sys”. I tried to detect this with
> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>
> Does anyone else try to detect paging files in a pre-op
> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
> post-op next.
>
>


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

That is a big catch-22 because my problem is in FltGetStreamContext is what
I need to access anything stored away.


“Tony Mason” wrote in message news:xxxxx@ntfsd…
Mark,

Look for the flag in IRP_MJ_CREATE (that’s the only time the
SL_OPEN_PAGING_FILE bit will be set) and store that away. As I recall
the FsRtl routine only works for XP and newer. Checking for the flag in
IRP_MJ_CREATE and storing that information will work for ALL versions.

Regards,

Tony

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Friday, April 01, 2005 5:29 AM
To: ntfsd redirect
Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?

> I will try FsRtlIsPagingFile in the post-op next.

That isn’t working either. I have a big problem here because I am
calling
FltGetStreamContext and it is giving me an assert because the irql >
APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert

failure I can’t just take a bad status code from FltGetStreamContext and

assume it is a paging file. I wish FltMgr would return more bad status
values and assert less.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
> callbacks for “\pagefile.sys”. I tried to detect this with
> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>
> Does anyone else try to detect paging files in a pre-op
> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
> post-op next.
>
>


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

Mark:

Not sure I followed that – if you check it in pre-create and it is the
paging file, don’t create a stream context at all. Then it won’t exist in
pre-setinfo and there’s nothing for FltGetStreamContext to find.

Sorry – I must be missing something basic here…

(BTW, to answer a previous question, I have a pre-op IRP_MJ_SET_INFORMATION
callback and don’t hit any asserts, but I don’t try to attach a context to
the paging file.)

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Friday, April 01, 2005 1:57 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?

That is a big catch-22 because my problem is in FltGetStreamContext is what
I need to access anything stored away.


“Tony Mason” wrote in message news:xxxxx@ntfsd…
Mark,

Look for the flag in IRP_MJ_CREATE (that’s the only time the
SL_OPEN_PAGING_FILE bit will be set) and store that away. As I recall
the FsRtl routine only works for XP and newer. Checking for the flag in
IRP_MJ_CREATE and storing that information will work for ALL versions.

Regards,

Tony

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Friday, April 01, 2005 5:29 AM
To: ntfsd redirect
Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?

> I will try FsRtlIsPagingFile in the post-op next.

That isn’t working either. I have a big problem here because I am
calling
FltGetStreamContext and it is giving me an assert because the irql >
APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert

failure I can’t just take a bad status code from FltGetStreamContext and

assume it is a paging file. I wish FltMgr would return more bad status
values and assert less.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
> callbacks for “\pagefile.sys”. I tried to detect this with
> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>
> Does anyone else try to detect paging files in a pre-op
> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
> post-op next.
>
>


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


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

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

I don’t try to attach a context to the paging file. That is impossible
anyway.

The problem is that I have no way of finding out in pre-setinfo or
post-setinfo that I am dealing with a paging file and if I call
FltGetStreamContext on the paging file I get an assertion. It is a
catch-22: I need to call FltGetStreamContext to find out that there is no
context but calling FltGetStreamContext causes a crash.

Are you using a boot-start? It is at initial boot that the problem occurs.

“Ken Cross” wrote in message news:xxxxx@ntfsd…
> Mark:
>
> Not sure I followed that – if you check it in pre-create and it is the
> paging file, don’t create a stream context at all. Then it won’t exist in
> pre-setinfo and there’s nothing for FltGetStreamContext to find.
>
> Sorry – I must be missing something basic here…
>
> (BTW, to answer a previous question, I have a pre-op
> IRP_MJ_SET_INFORMATION
> callback and don’t hit any asserts, but I don’t try to attach a context to
> the paging file.)
>
> Ken
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
> Sent: Friday, April 01, 2005 1:57 PM
> To: Windows File Systems Devs Interest List
> Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?
>
> That is a big catch-22 because my problem is in FltGetStreamContext is
> what
> I need to access anything stored away.
>
> -----------------------------------
>
> “Tony Mason” wrote in message news:xxxxx@ntfsd…
> Mark,
>
> Look for the flag in IRP_MJ_CREATE (that’s the only time the
> SL_OPEN_PAGING_FILE bit will be set) and store that away. As I recall
> the FsRtl routine only works for XP and newer. Checking for the flag in
> IRP_MJ_CREATE and storing that information will work for ALL versions.
>
> Regards,
>
> Tony
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
> Sent: Friday, April 01, 2005 5:29 AM
> To: ntfsd redirect
> Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?
>
>> I will try FsRtlIsPagingFile in the post-op next.
>
> That isn’t working either. I have a big problem here because I am
> calling
> FltGetStreamContext and it is giving me an assert because the irql >
> APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert
>
> failure I can’t just take a bad status code from FltGetStreamContext and
>
> assume it is a paging file. I wish FltMgr would return more bad status
> values and assert less.
>
> “Mark Hahn” wrote in message news:xxxxx@ntfsd…
>> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
>> callbacks for “\pagefile.sys”. I tried to detect this with
>> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
>> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>>
>> Does anyone else try to detect paging files in a pre-op
>> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
>> post-op next.
>>
>>
>
>
>
> —
> 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
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@comcast.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

If there really is a maximum of one paging file per volume then using the
volume context is a great idea and solves my problem.

Thanks so much. I hope you don’t mind my posting your personal response but
I think this is good for the archive.


Tony Mason wrote …

I’m assuming you are saying this because there is no context for a paging
file? Sorry, but that model has never worked for me, so I just keep an extra
list on the side anyway. For example, there is at most one paging file per
volume, so I usually store it in my VOLUME context.

Regards,
Tony

Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
Looking forward to seeing you at the Next OSR File Systems Class April 4,
2005 in Boston!


“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> That is a big catch-22 because my problem is in FltGetStreamContext is
> what I need to access anything stored away.
>
> -----------------------------------
>
> “Tony Mason” wrote in message news:xxxxx@ntfsd…
> Mark,
>
> Look for the flag in IRP_MJ_CREATE (that’s the only time the
> SL_OPEN_PAGING_FILE bit will be set) and store that away. As I recall
> the FsRtl routine only works for XP and newer. Checking for the flag in
> IRP_MJ_CREATE and storing that information will work for ALL versions.
>
> Regards,
>
> Tony
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
> Sent: Friday, April 01, 2005 5:29 AM
> To: ntfsd redirect
> Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?
>
>> I will try FsRtlIsPagingFile in the post-op next.
>
> That isn’t working either. I have a big problem here because I am
> calling
> FltGetStreamContext and it is giving me an assert because the irql >
> APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert
>
> failure I can’t just take a bad status code from FltGetStreamContext and
>
> assume it is a paging file. I wish FltMgr would return more bad status
> values and assert less.
>
> “Mark Hahn” wrote in message news:xxxxx@ntfsd…
>> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
>> callbacks for “\pagefile.sys”. I tried to detect this with
>> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
>> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>>
>> Does anyone else try to detect paging files in a pre-op
>> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
>> post-op next.
>>
>>
>
>
>
> —
> 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
>
>
>

And do what with the volume context? Detect the paging file in pre-create
and save the file ID or something?

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
Sent: Friday, April 01, 2005 3:26 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?

If there really is a maximum of one paging file per volume then using the
volume context is a great idea and solves my problem.

Thanks so much. I hope you don’t mind my posting your personal response but

I think this is good for the archive.


Tony Mason wrote …

I’m assuming you are saying this because there is no context for a paging
file? Sorry, but that model has never worked for me, so I just keep an extra

list on the side anyway. For example, there is at most one paging file per
volume, so I usually store it in my VOLUME context.

Regards,
Tony

Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
Looking forward to seeing you at the Next OSR File Systems Class April 4,
2005 in Boston!


“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> That is a big catch-22 because my problem is in FltGetStreamContext is
> what I need to access anything stored away.
>
> -----------------------------------
>
> “Tony Mason” wrote in message news:xxxxx@ntfsd…
> Mark,
>
> Look for the flag in IRP_MJ_CREATE (that’s the only time the
> SL_OPEN_PAGING_FILE bit will be set) and store that away. As I recall
> the FsRtl routine only works for XP and newer. Checking for the flag in
> IRP_MJ_CREATE and storing that information will work for ALL versions.
>
> Regards,
>
> Tony
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
> Sent: Friday, April 01, 2005 5:29 AM
> To: ntfsd redirect
> Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?
>
>> I will try FsRtlIsPagingFile in the post-op next.
>
> That isn’t working either. I have a big problem here because I am
> calling
> FltGetStreamContext and it is giving me an assert because the irql >
> APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert
>
> failure I can’t just take a bad status code from FltGetStreamContext and
>
> assume it is a paging file. I wish FltMgr would return more bad status
> values and assert less.
>
> “Mark Hahn” wrote in message news:xxxxx@ntfsd…
>> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
>> callbacks for “\pagefile.sys”. I tried to detect this with
>> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
>> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>>
>> Does anyone else try to detect paging files in a pre-op
>> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
>> post-op next.
>>
>>
>
>
>
> —
> 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
>
>
>


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

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

I’m saving the FsContext. Wish me luck…

“Ken Cross” wrote in message news:xxxxx@ntfsd…
> And do what with the volume context? Detect the paging file in pre-create
> and save the file ID or something?
>
> Ken
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
> Sent: Friday, April 01, 2005 3:26 PM
> To: Windows File Systems Devs Interest List
> Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?
>
> If there really is a maximum of one paging file per volume then using the
> volume context is a great idea and solves my problem.
>
> Thanks so much. I hope you don’t mind my posting your personal response
> but
>
> I think this is good for the archive.
>
> -------------------------
> Tony Mason wrote …
>
> I’m assuming you are saying this because there is no context for a paging
> file? Sorry, but that model has never worked for me, so I just keep an
> extra
>
> list on the side anyway. For example, there is at most one paging file per
> volume, so I usually store it in my VOLUME context.
>
> Regards,
> Tony
>
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
> Looking forward to seeing you at the Next OSR File Systems Class April 4,
> 2005 in Boston!
>
> ---------------------------
>
> “Mark Hahn” wrote in message news:xxxxx@ntfsd…
>> That is a big catch-22 because my problem is in FltGetStreamContext is
>> what I need to access anything stored away.
>>
>> -----------------------------------
>>
>> “Tony Mason” wrote in message news:xxxxx@ntfsd…
>> Mark,
>>
>> Look for the flag in IRP_MJ_CREATE (that’s the only time the
>> SL_OPEN_PAGING_FILE bit will be set) and store that away. As I recall
>> the FsRtl routine only works for XP and newer. Checking for the flag in
>> IRP_MJ_CREATE and storing that information will work for ALL versions.
>>
>> Regards,
>>
>> Tony
>>
>> Tony Mason
>> Consulting Partner
>> OSR Open Systems Resources, Inc.
>> http://www.osr.com
>>
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Hahn
>> Sent: Friday, April 01, 2005 5:29 AM
>> To: ntfsd redirect
>> Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?
>>
>>> I will try FsRtlIsPagingFile in the post-op next.
>>
>> That isn’t working either. I have a big problem here because I am
>> calling
>> FltGetStreamContext and it is giving me an assert because the irql >
>> APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert
>>
>> failure I can’t just take a bad status code from FltGetStreamContext and
>>
>> assume it is a paging file. I wish FltMgr would return more bad status
>> values and assert less.
>>
>> “Mark Hahn” wrote in message news:xxxxx@ntfsd…
>>> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
>>> callbacks for “\pagefile.sys”. I tried to detect this with
>>> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
>>> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>>>
>>> Does anyone else try to detect paging files in a pre-op
>>> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
>>> post-op next.
>>>
>>>
>>
>>
>>
>> —
>> 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
>>
>>
>>
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@comcast.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

I just found out that FsRtlIsPagingfile doesn’t work in any of my operation
callbacks. So this problem is not unique to setFileInfo. I sure hope the
volume context trick works.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
> callbacks for “\pagefile.sys”. I tried to detect this with
> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>
> Does anyone else try to detect paging files in a pre-op
> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
> post-op next.
>
>

Mark,

The only reason this would happen is if you are trying to get a context
in a POST operation callback at DPC level. You can not GET contexts at
DPC level. If you need a context in a post-operation callback you have
two choices:

  • get it in the pre and pass it to your post via your completion
    context.
  • move your completion processing to a safe IRQL with
    FltDoCompletionProcessingWhenSafe

Note that you can release a context at DPC level.

Neal Christiansen
Microsoft File System Filter Group Lead
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 Mark Hahn
Sent: Friday, April 01, 2005 2:29 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?

I will try FsRtlIsPagingFile in the post-op next.

That isn’t working either. I have a big problem here because I am
calling
FltGetStreamContext and it is giving me an assert because the irql >
APC_LEVEL. This only happens on “\pagefile.sys”. Since it is an assert

failure I can’t just take a bad status code from FltGetStreamContext and

assume it is a paging file. I wish FltMgr would return more bad status
values and assert less.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
> callbacks for “\pagefile.sys”. I tried to detect this with
> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>
> Does anyone else try to detect paging files in a pre-op
> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
> post-op next.
>
>


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

Mark,

It is possible for the first coulple of operations to the paging file
after it has been opened it will not show up as a paging file. This is
because internally we are calling an MM routine that looks through an
internal list and it is not inserted into this list at create time.

I don’t believe the statement that it never weeks since we have test
code that verifies its correctness. Can you tell me what os version you
believe this is not work on?

Note that we have changed how this routine is implemeneted in longhorn
so this is now fixed and it will be accurate for all operations after
the paging file is opened.

Neal Christiansen
Microsoft File System Filter Group Lead
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 Mark Hahn
Sent: Friday, April 01, 2005 12:58 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] how to detect page file in pre-setFileInfo?

I just found out that FsRtlIsPagingfile doesn’t work in any of my
operation
callbacks. So this problem is not unique to setFileInfo. I sure hope
the
volume context trick works.

“Mark Hahn” wrote in message news:xxxxx@ntfsd…
> In my mini-filter I am getting pre-operation IRP_MJ_SET_INFORMATION
> callbacks for “\pagefile.sys”. I tried to detect this with
> FsRtlIsPagingFile and with: FlagOn( Data->Iopb->OperationFlags,
> SL_OPEN_PAGING_FILE ), but neither will say this is a page file.
>
> Does anyone else try to detect paging files in a pre-op
> IRP_MJ_SET_INFORMATION callback? I will try FsRtlIsPagingFile in the
> post-op next.
>
>


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