use RtlVolumeDeviceToDosName on LanmanRedirector cause page fault?

Hi.
I am writting a file system filter based on the sfilter sample.
I want to know the dos name of the volumes I attach to, if there is
one. So I use RtlVolumeDeviceToDosName to get the dos name of volume
device. It works on harddisk volumes, but crushes on
\Device\LanmanRedirector.
Sure LanmanRedirector doesn’t have a dos name, but instead of
returning an error code, my system crushed with a page fault.
It seems to me that invoking RtlVolumeDeviceToDosName on a volume
device which doesn’t have dos name causes a page fault. Is it true?
and if it is, how can I get the dos name of a volume safely?
Thanks!

Callers of this routine must be running at IRQL = PASSIVE_LEVEL, where page
faults are permitted.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of li pan
Sent: Sunday, October 16, 2005 11:06 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector cause page
fault?

Hi.
I am writting a file system filter based on the sfilter sample.
I want to know the dos name of the volumes I attach to, if there is
one. So I use RtlVolumeDeviceToDosName to get the dos name of volume
device. It works on harddisk volumes, but crushes on
\Device\LanmanRedirector.
Sure LanmanRedirector doesn’t have a dos name, but instead of
returning an error code, my system crushed with a page fault.
It seems to me that invoking RtlVolumeDeviceToDosName on a volume
device which doesn’t have dos name causes a page fault. Is it true?
and if it is, how can I get the dos name of a volume safely?
Thanks!


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

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Should I catch some “exception” to handle the page fault when it occurs?
I can’t leave it along since my system will dead.
2005/10/16, Ken Cross :
> Callers of this routine must be running at IRQL = PASSIVE_LEVEL, where page
> faults are permitted.
>
> Ken
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of li pan
> Sent: Sunday, October 16, 2005 11:06 AM
> To: Windows File Systems Devs Interest List
> Subject: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector cause page
> fault?
>
> Hi.
> I am writting a file system filter based on the sfilter sample.
> I want to know the dos name of the volumes I attach to, if there is
> one. So I use RtlVolumeDeviceToDosName to get the dos name of volume
> device. It works on harddisk volumes, but crushes on
> \Device\LanmanRedirector.
> Sure LanmanRedirector doesn’t have a dos name, but instead of
> returning an error code, my system crushed with a page fault.
> It seems to me that invoking RtlVolumeDeviceToDosName on a volume
> device which doesn’t have dos name causes a page fault. Is it true?
> and if it is, how can I get the dos name of a volume safely?
> Thanks!
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
> 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@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

I’m not sure I understand your question, but the answer is: you *must* be
running at IRQL PASSIVE_LEVEL. Then page faults are handled for you.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of li pan
Sent: Sunday, October 16, 2005 9:56 PM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector cause
page fault?

Should I catch some “exception” to handle the page fault when it occurs?
I can’t leave it along since my system will dead.
2005/10/16, Ken Cross :
> Callers of this routine must be running at IRQL = PASSIVE_LEVEL, where
page
> faults are permitted.
>
> Ken
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of li pan
> Sent: Sunday, October 16, 2005 11:06 AM
> To: Windows File Systems Devs Interest List
> Subject: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector cause
page
> fault?
>
> Hi.
> I am writting a file system filter based on the sfilter sample.
> I want to know the dos name of the volumes I attach to, if there is
> one. So I use RtlVolumeDeviceToDosName to get the dos name of volume
> device. It works on harddisk volumes, but crushes on
> \Device\LanmanRedirector.
> Sure LanmanRedirector doesn’t have a dos name, but instead of
> returning an error code, my system crushed with a page fault.
> It seems to me that invoking RtlVolumeDeviceToDosName on a volume
> device which doesn’t have dos name causes a page fault. Is it true?
> and if it is, how can I get the dos name of a volume safely?
> Thanks!
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
> 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@gmail.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: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

I know I must running at IRQL PASSIVE_LEVEL. I mean the problem is my
windows crushes when it happens( tring to get dos name of
lanmanredirector), and the error code is page fault. So I think maybe
my code is supposed to handle this, and I don’t know how to do it.

Sorry, but if you’re truly at PASSIVE_LEVEL, then a page fault by itself
won’t crash your system. You have some other problem. Maybe !analyze -v
would give some clues.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of li pan
Sent: Tuesday, October 18, 2005 2:00 AM
To: Windows File Systems Devs Interest List
Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector cause
page fault?

I know I must running at IRQL PASSIVE_LEVEL. I mean the problem is my
windows crushes when it happens( tring to get dos name of
lanmanredirector), and the error code is page fault. So I think maybe
my code is supposed to handle this, and I don’t know how to do it.


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

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

I’m curious how you could possibly be passing this function a valid
volume device object. The documentation says:

VolumeDeviceObject
Pointer to a device object that represents a volume device object
created by a storage class driver.

Since a redirector isn’t normally associated with such a volume device
object, how are you getting this device object to pass in the first
place? If you are passing something OTHER than a valid storage class
driver created volume device object, that might be why your system
crashes.

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 in Los
Angeles, CA October 24-27, 2005.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of li pan
Sent: Tuesday, October 18, 2005 2:00 AM
To: ntfsd redirect
Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector
cause page fault?

I know I must running at IRQL PASSIVE_LEVEL. I mean the problem is my
windows crushes when it happens( tring to get dos name of
lanmanredirector), and the error code is page fault. So I think maybe
my code is supposed to handle this, and I don’t know how to do it.


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

You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

2005/10/18, Tony Mason :

> Since a redirector isn’t normally associated with such a volume device
> object, how are you getting this device object to pass in the first
> place? If you are passing something OTHER than a valid storage class
> driver created volume device object, that might be why your system
> crashes.
I called it in a filter modified from sfilter.It attaches to every
storage devices. I am trying to find a way to find out whether a
device is valid volume device object but still I can’t get it.

oh, I see. Thanks a lot,
2005/10/18, Ken Cross :
> Sorry, but if you’re truly at PASSIVE_LEVEL, then a page fault by itself
> won’t crash your system. You have some other problem. Maybe !analyze -v
> would give some clues.
>
> Ken
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of li pan
> Sent: Tuesday, October 18, 2005 2:00 AM
> To: Windows File Systems Devs Interest List
> Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector cause
> page fault?
>
> I know I must running at IRQL PASSIVE_LEVEL. I mean the problem is my
> windows crushes when it happens( tring to get dos name of
> lanmanredirector), and the error code is page fault. So I think maybe
> my code is supposed to handle this, and I don’t know how to do it.
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
> 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@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Try looking at the device type. If this is of the volume type (disk,
tape, cd, virtual disk) then you can call this function. Otherwise you
can’t.

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 in Los
Angeles, CA October 24-27, 2005.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of li pan
Sent: Tuesday, October 18, 2005 8:45 PM
To: ntfsd redirect
Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector
cause page fault?

2005/10/18, Tony Mason :

> Since a redirector isn’t normally associated with such a volume device
> object, how are you getting this device object to pass in the first
> place? If you are passing something OTHER than a valid storage class
> driver created volume device object, that might be why your system
> crashes.
I called it in a filter modified from sfilter.It attaches to every
storage devices. I am trying to find a way to find out whether a
device is valid volume device object but still I can’t get it.


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

You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

It now works.
Thanks:)

2005/10/19, Tony Mason :
> Try looking at the device type. If this is of the volume type (disk,
> tape, cd, virtual disk) then you can call this function. Otherwise you
> can’t.
>
> 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 in Los
> Angeles, CA October 24-27, 2005.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of li pan
> Sent: Tuesday, October 18, 2005 8:45 PM
> To: ntfsd redirect
> Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector
> cause page fault?
>
> 2005/10/18, Tony Mason :
>
> > Since a redirector isn’t normally associated with such a volume device
> > object, how are you getting this device object to pass in the first
> > place? If you are passing something OTHER than a valid storage class
> > driver created volume device object, that might be why your system
> > crashes.
> I called it in a filter modified from sfilter.It attaches to every
> storage devices. I am trying to find a way to find out whether a
> device is valid volume device object but still I can’t get it.
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
> ‘’
> 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: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

“Doctor, it hurts when I do that!”

“Well, don’t do that!”

“But I still want to do that!”

“Well take this pill, and I’ll catch up with you in the morgue.”

:wink:

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 in Los
Angeles, CA October 24-27, 2005.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of li pan
Sent: Wednesday, October 19, 2005 5:29 AM
To: ntfsd redirect
Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector
cause page fault?

It now works.
Thanks:)

2005/10/19, Tony Mason :
> Try looking at the device type. If this is of the volume type (disk,
> tape, cd, virtual disk) then you can call this function. Otherwise
you
> can’t.
>
> 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 in
Los
> Angeles, CA October 24-27, 2005.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of li pan
> Sent: Tuesday, October 18, 2005 8:45 PM
> To: ntfsd redirect
> Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector
> cause page fault?
>
> 2005/10/18, Tony Mason :
>
> > Since a redirector isn’t normally associated with such a volume
device
> > object, how are you getting this device object to pass in the first
> > place? If you are passing something OTHER than a valid storage
class
> > driver created volume device object, that might be why your system
> > crashes.
> I called it in a filter modified from sfilter.It attaches to every
> storage devices. I am trying to find a way to find out whether a
> device is valid volume device object but still I can’t get it.
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag
argument:
> ‘’
> 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: unknown lmsubst tag
argument: ‘’
> 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: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

@_@ good joke

2005/10/20, Tony Mason :
> “Doctor, it hurts when I do that!”
>
> “Well, don’t do that!”
>
> “But I still want to do that!”
>
> “Well take this pill, and I’ll catch up with you in the morgue.”
>
> :wink:
>
> 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 in Los
> Angeles, CA October 24-27, 2005.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of li pan
> Sent: Wednesday, October 19, 2005 5:29 AM
> To: ntfsd redirect
> Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector
> cause page fault?
>
> It now works.
> Thanks:)
>
>
> 2005/10/19, Tony Mason :
> > Try looking at the device type. If this is of the volume type (disk,
> > tape, cd, virtual disk) then you can call this function. Otherwise
> you
> > can’t.
> >
> > 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 in
> Los
> > Angeles, CA October 24-27, 2005.
> >
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of li pan
> > Sent: Tuesday, October 18, 2005 8:45 PM
> > To: ntfsd redirect
> > Subject: Re: [ntfsd] use RtlVolumeDeviceToDosName on LanmanRedirector
> > cause page fault?
> >
> > 2005/10/18, Tony Mason :
> >
> > > Since a redirector isn’t normally associated with such a volume
> device
> > > object, how are you getting this device object to pass in the first
> > > place? If you are passing something OTHER than a valid storage
> class
> > > driver created volume device object, that might be why your system
> > > crashes.
> > I called it in a filter modified from sfilter.It attaches to every
> > storage devices. I am trying to find a way to find out whether a
> > device is valid volume device object but still I can’t get it.
> >
> > —
> > Questions? First check the IFS FAQ at
> > https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: unknown lmsubst tag
> argument:
> > ‘’
> > 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: unknown lmsubst tag
> argument: ‘’
> > 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: unknown lmsubst tag argument:
> ‘’
> 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: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>