You need to provide a full stack when the machine is hung.
Note that the mount manager holds a lock whenever it is doing something.
Sometimes its operations recurse and if you do another mount manager
operation in this situation you will deadlock. Thus the reason we need
to look at the stack and see if the mount manager is already present.
If you don’t care about timing issues I would queue the worker routine
from the mount completion callback. Note that if you do this some
operations may be sent to the volume before your worker routine has run.
How to do this depends on why you need the driver letter and how are you
using it.
Neal Christiansen
Microsoft File System Filter Group
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 Ampsi Ho
Sent: Tuesday, October 14, 2003 7:31 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Re: strange problem on RtlVolumeDeviceToDosName
i have never tested with PCMCIA harddisk before… only tested with USB
harddisk… so there might be other files to skip checking for the drive
letter.
well, i guess the good old method is still get the serial number and ask
an
application to resolve… 
Ampsi
----- Original Message -----
From: “vincent gambit”
To: “Windows File Systems Devs Interest List”
Sent: Friday, October 10, 2003 17:28
Subject: [ntfsd] Re: strange problem on RtlVolumeDeviceToDosName
Hi,
Thanks for your reply.
This method doesn’t seemed to work.
All drives work. I am able to get the drive letter.
But for Removable Hard Drives; eg PCMCIA hard drive and hotswappable
hard
drive
I am still unable to get the drive letter.
Its like a deadlock.
I can’t even stop my device.
So I guess I can only use the other method?
Thank You!
cheers,
vincent
>From: “Ampsi Ho”
>Reply-To: “Windows File Systems Devs Interest List”
>To: “Windows File Systems Devs Interest List”
>Subject: [ntfsd] Re: strange problem on RtlVolumeDeviceToDosName
>Date: Fri, 10 Oct 2003 09:31:46 +0800
>
>doing it in mount completion and the 1st create does not work. the 1st
>create for a removable harddisk usually is for the file
“$extend$reparse”
>and i think it is only after this create succeeds then the drive letter
>exists.
>
>so what i do is check in create, but skip calling
RtlVolumeDeviceToDosName
>if the file is “$extend$reparse”.
>
>Ampsi
>
>----- Original Message -----
>From: “vincent gambit”
>To: “Windows File Systems Devs Interest List”
>Sent: Wednesday, October 01, 2003 12:03
>Subject: [ntfsd] Re: strange problem on RtlVolumeDeviceToDosName
>
>
>Hi,
>
>Thanks for your reply.
>
>So where should I spawn my work item so that it will not block the
>completion of the mount request or intercept the first IRP_MJ_CREATE?
>
>Thank You!
>
>cheers,
>vincent
>
>
> >From: “Alexei Jelvis”
> >Reply-To: “Windows File Systems Devs Interest List”
> >To: “Windows File Systems Devs Interest List”
> >Subject: [ntfsd] Re: strange problem on RtlVolumeDeviceToDosName
> >Date: Tue, 30 Sep 2003 22:51:37 -0400
> >
> >Most likely mount manager waits volume to finish monting for whatever
> >reason. You may try to call RtlVolumeDeviceToDosName from a work item
> >without blocking completion of the mount request or intercept the
first
> >IRP_MJ_CREATE and call RtlVolumeDeviceToDosName before sending it
down.
> >
> >Alexei.
> >
> >
> >“vincent gambit” wrote in message
> >news:xxxxx@ntfsd…
> > >
> > > Hi,
> > >
> > > Thanks for your reply.
> > >
> > > Does that mean that the function hung because there is no drive
letter
> > > avaliable for that device yet in mountcompletion routine?
> > >
> > > so which is the best place to get the drive letter in a file
filter
> >driver
> > > of the device?
> > >
> > > thank you!
> > >
> > > cheers,
> > > vincent
> > >
> > >
> > > >From: “Jamey Kirby”
> > > >Reply-To: “Windows File Systems Devs Interest List”
> >
> > > >To: “Windows File Systems Devs Interest List”
> > > >Subject: [ntfsd] RE: strange problem on RtlVolumeDeviceToDosName
> > > >Date: Tue, 30 Sep 2003 10:59:07 -0700
> > > >
> > > >Sorry… There is no requirement for there to be a drive letter
when
> >mount
> > > >occurs.
> > > >
> > > >Jamey Kirby, Windows DDK MVP
> > > >StorageCraft Inc.
> > > >xxxxx@storagecraft.com
> > > >http://www.storagecraft.com
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >-----Original Message-----
> > > >From: xxxxx@lists.osr.com
> > > >[mailto:xxxxx@lists.osr.com] On Behalf Of Jamey
Kirby
> > > >Sent: Tuesday, September 30, 2003 10:38 AM
> > > >To: Windows File Systems Devs Interest List
> > > >Subject: [ntfsd] RE: strange problem on RtlVolumeDeviceToDosName
> > > >
> > > >There is no drive letter on mount completion.
> > > >
> > > >Jamey Kirby, Windows DDK MVP
> > > >StorageCraft Inc.
> > > >xxxxx@storagecraft.com
> > > >http://www.storagecraft.com
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >-----Original Message-----
> > > >From: xxxxx@lists.osr.com
> > > >[mailto:xxxxx@lists.osr.com] On Behalf Of vincent
gambit
> > > >Sent: Tuesday, September 30, 2003 3:01 AM
> > > >To: Windows File Systems Devs Interest List
> > > >Subject: [ntfsd] strange problem on RtlVolumeDeviceToDosName
> > > >
> > > >Hi,
> > > >
> > > >I have a strange problem
> > > >I am doing a file filter driver using the IFS kit.
> > > >
> > > >In MountCompletion routine,
> > > >I try to get the drive letter using
> > > >- RtlVolumeDeviceToDOsName as well as IoVolumeDeviceToDosName on
a
>Win
> >XP
> > > >machine,
> > > >i was able to get the drive letter for thumb drive, cd drive,
floppy
> >drive,
> > > >hard disk, compact flash using PCMCIA adapter and hot swappable
cdrom
> >drive
> > > >I am using a IBM Thinkpad laptop for my testing.
> > > >However when I insert a TOshiba PCMCIA hard drive or a hot
swappable
> >hard
> > > >drive, my driver hung at the RtlVolumeDeviceToDOsName as well as
> > > >IoVolumeDeviceToDosName routines.
> > > >However if I plug them in while the system boot, it is ok.
> > > >only when after the OS has boot and then I plug in then it hung…
> > > >
> > > >Anyone knows why?
> > > >ANyone has such experience?
> > > >
> > > >hope you can help.
> > > >
> > > >thank you!
> > > >
> > > >cheers,
> > > >vincent
> > > >
> > > >
> > > >Download games, logos, wallpapers and lots more at MSN Mobile!
> > > >http://www.msn.com.sg/mobile/
> > > >
> > > >
> > > >—
> > > >You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > >To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > > >
> > > >—
> > > >You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> > > >To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > > >
> > > >—
> > > >You are currently subscribed to ntfsd as: xxxxx@hotmail.com
> > > >To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> > > Keep track of Singapore & Malaysia stock prices.
> > > http://www.msn.com.sg/money/
> > >
> > >
> > >
> >
> >
> >
> >—
> >You are currently subscribed to ntfsd as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>Get 10mb of inbox space with MSN Hotmail Extra Storage
>http://join.msn.com/?pgmarket=en-sg
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@pmail.ntu.edu.sg
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>—
>You are currently subscribed to ntfsd as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
Get 10mb of inbox space with MSN Hotmail Extra Storage
http://join.msn.com/?pgmarket=en-sg
—
You are currently subscribed to ntfsd as: xxxxx@hotmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com