RE: Problem with calling FltGetVolumeFromName in InstanceSetup callback

Sorry for the slow reply (Vista is keeping us very busy):

There is a known deadlock issues with the MoungMgr that causes deadlocks
if you query for the DOS name or GUID name of a volume at instance setup
time. Filter manager has done several things to try and work around
this issue but it turned out that it is not a 100% solution. So at this
point it is not safe.

This is why the problem occurs:

  • Instance setup is called on the first create IRP after a volume has
    mounted
  • Unfortunately the first create IRP is often generated by the mount mgr
    which is holding a lock when it issues this create.
  • If from instance setup you do something that calls back into the
    mountmgr (like get the guid name or DOS name of a volume) you deadlock
    on this lock
  • Filter manager tries to detect this create from the mount mgr and not
    call instance setup at this time. This works fairly well but there are
    scenarios we can’t detect.
  • Thus you deadlock.

Now the good news. A QFE has been generated to address this issue on
Srv03. I do not have the KB number but as soon as I get it I will let
you know.

This issue has been fixed on Longhorn.

If this is affecting your product on XP I suggest you complain to your
Microsoft representative and see if you can get them to port the QFE to
XP as well.

To answer the original question, it sounds to me like you are trying to
open a storage stack device object. I believe it would deadlock for the
same reason because the open request will go through the mount manager.

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 kamii
Sent: Wednesday, February 08, 2006 9:27 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup callback

I found the message that it is not safe to call FltGetVolumeGuidName
routine
during the
InstanceSetupCallBack.

https://www.osronline.com/showThread.CFM?link=79416

Is it true?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of kamii
Sent: Thursday, February 09, 2006 12:10 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup callback

Thank you for your advice.
But I found the case that the volume’s GUID name was changed in some
rare
condition.
Thus I choose the form “??\STORAGE#Volume#…”.

Kamii

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Wednesday, February 08, 2006 11:40 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup callback

Then do it the other way around: Get the volume name of the new
instance
using FltGetVolumeName (or FltGetVolumeGuidName) with the
FltObjects->Volume
passed to the routine and compare it to your saved name.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of kamii
Sent: Wednesday, February 08, 2006 9:26 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup callback

I didin’t mean the volume’s GUID name “??\Volume{GUID}”.
But the same problem occurred when I chose the form “??\Volume{GUID}”.

I’m trying that…
(1) The persistent volume names are saved in registry and
(2) Minifilter read them in DriverEntry and
(3) In InstanceSetup callback if new volume’s persistent name is same as
(1), I attach filter to them.

It works well in single volume drive,
but It doesn’t work in multiple volumes drive.

FltGetVolumeFromName calling to the volume whoes instace have not been
set
up seems to cause system hung.

(When 1st volume’s InstanceSetup, FltGetVolumeFromName call with the 2nd
volume’s GUID name)

Regards
Kamii

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Wednesday, February 08, 2006 10:08 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup callback

I’m not familiar with a volume name in the form
“??\STORAGE#Volume#…”.
Do you mean the volume’s GUID name “??\Volume{GUID}” ?

Drivers typically use the volume’s GUID name or the volume’s
nonpersistent
device object name (for example, “\Device\HarddiskVolume1”). The FltMgr
routines primarily use nonpersistent device object names.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of kamii
Sent: Wednesday, February 08, 2006 6:28 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup callback

I have another question.

Can I get the FltObjects->Volume’s name in the form
“??\STORAGE#Volume#…”
in InstanceSetup callback?

Regards,
Kamii.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of kamii
Sent: Wednesday, February 08, 2006 8:16 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup callback

I meant the system hung. (without failed status) The name was
“??\STORAGE#Volume#…” form.

That volume’s instance had not been setted up, but that volume was
connected.
My device has 2-volumes. Calling FltGetVolumeFromName to 2nd volume from
1st
volume’s InstanceSetup callback cause system hung.
I’m expecting that FltGetVolumeFromName call will return with failed
status.

I’d like to decide whether to attach filter or not to attach filter in
InstanceSetup callback by the volume’s name comparing.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Cross
Sent: Wednesday, February 08, 2006 7:50 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup callback

What do you mean “was not returned”? The system hung? Crashed? Failed
status? What name was passed? Had the instance been set up for that
volume
yet?

Yes, you can call FltGetVolumeFromName in InstanceSetup. Of course, for
the
instance being set up, you can simply call FltGetVolumeName using the
FltObjects->Volume passed to the routine.

Ken

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of kamii
Sent: Tuesday, February 07, 2006 8:18 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Problem with calling FltGetVolumeFromName in
InstanceSetup
callback

Hi,

I found the case that calling FltGetVolumeFromName function from
InstanceSetup callback was not returned.

Is it possible to call FltGetVolumeFromName in InstanceSetup callback?

Regards,
Kamii


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


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

You are currently subscribed to ntfsd as: xxxxx@kamii.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@kamii.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


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

You are currently subscribed to ntfsd as: xxxxx@kamii.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


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

You are currently subscribed to ntfsd as: xxxxx@kamii.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@kamii.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