Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTFSD

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


FltGetVolumeGuidName during InstanceSetup

OSR_Community_UserOSR_Community_User Member Posts: 110,217
I am calling FltGetVolumeGuidName from inside my InstanceSetupCallBack
routine yet it is hanging. This is a result of plugging in a USB drive. The
documentation says it is safe to call this routine during the
InstanceSetupCallBack.



The stack looks like this:



4.00002c 86fc1020 00053c1 Blocked nt!KiSwapContext+0x2e

nt!KiSwapThread+0x46

nt!KeWaitForSingleObject+0x1c2

MountMgr!MountMgrDeviceControl+0x2e

nt!IopfCallDriver+0x31

fltmgr!FltGetVolumeGuidName+0x13a

MyDriver!RepInstanceSetup+0xac


fltmgr!FltpDoInstanceSetupNotification+0x4b

fltmgr!FltpInitInstance+0x272


fltmgr!FltpCreateInstanceFromName+0x295


fltmgr!FltpEnumerateRegistryInstances+0xf4


fltmgr!FltpDoFilterNotificationForNewVolume+0xf5

fltmgr!FltpCreate+0x16a

nt!IopfCallDriver+0x31

naiavf5x+0x74a0

naiavf5x+0x2520

nt!IopfCallDriver+0x31

nt!IopParseDevice+0xa58

nt!ObpLookupObjectName+0x56a

nt!ObOpenObjectByName+0xeb

nt!IopCreateFile+0x407

nt!IoCreateFile+0x8e

nt!NtOpenFile+0x27

nt!KiFastCallEntry+0xf8

nt!ZwOpenFile+0x11


VolSnap!VspDeleteDiffAreaFilesWorker+0xa0

nt!IopProcessWorkItem+0x13

nt!ExpWorkerThread+0x100

nt!PspSystemThreadStartup+0x34

nt!KiThreadStartup+0x16



I was going to move the call when the first opened happened, but the docs
also say that that is when the InstanceSetupCallback is called. SO that
won't help.



When can this routine safely be called?



Thanks,

Ken

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    > The documentation says it is safe to call this routine during the
    InstanceSetupCallBack.

    It is not safe. This was revealed at the last plugfest. You need to post
    the query to a worker thread to the volume guid name without a deadlock.

    It stinks, but that's the way it is.

    - Dan.

    At 09:01 AM 8/12/2005 -0700, you wrote:

    >I am calling FltGetVolumeGuidName from inside my InstanceSetupCallBack
    >routine yet it is hanging. This is a result of plugging in a USB drive.
    >The documentation says it is safe to call this routine during the
    >InstanceSetupCallBack.
    >
    >
    >
    >The stack looks like this:
    >
    >
    >
    > 4.00002c 86fc1020 00053c1 Blocked nt!KiSwapContext+0x2e
    >
    > nt!KiSwapThread+0x46
    >
    > nt!KeWaitForSingleObject+0x1c2
    >
    > MountMgr!MountMgrDeviceControl+0x2e
    >
    > nt!IopfCallDriver+0x31
    >
    > fltmgr!FltGetVolumeGuidName+0x13a
    >
    > MyDriver!RepInstanceSetup+0xac
    >
    >
    >fltmgr!FltpDoInstanceSetupNotification+0x4b
    >
    > fltmgr!FltpInitInstance+0x272
    >
    >
    >fltmgr!FltpCreateInstanceFromName+0x295
    >
    >
    >fltmgr!FltpEnumerateRegistryInstances+0xf4
    >
    >
    >fltmgr!FltpDoFilterNotificationForNewVolume+0xf5
    >
    > fltmgr!FltpCreate+0x16a
    >
    > nt!IopfCallDriver+0x31
    >
    > naiavf5x+0x74a0
    >
    > naiavf5x+0x2520
    >
    > nt!IopfCallDriver+0x31
    >
    > nt!IopParseDevice+0xa58
    >
    > nt!ObpLookupObjectName+0x56a
    >
    > nt!ObOpenObjectByName+0xeb
    >
    > nt!IopCreateFile+0x407
    >
    > nt!IoCreateFile+0x8e
    >
    > nt!NtOpenFile+0x27
    >
    > nt!KiFastCallEntry+0xf8
    >
    > nt!ZwOpenFile+0x11
    >
    >
    >VolSnap!VspDeleteDiffAreaFilesWorker+0xa0
    >
    > nt!IopProcessWorkItem+0x13
    >
    > nt!ExpWorkerThread+0x100
    >
    > nt!PspSystemThreadStartup+0x34
    >
    > nt!KiThreadStartup+0x16
    >
    >
    >
    >I was going to move the call when the first opened happened, but the docs
    >also say that that is when the InstanceSetupCallback is called. SO that
    >wont help.
    >
    >
    >
    >When can this routine safely be called?
    >
    >
    >
    >Thanks,
    >
    >Ken
    >
    >---
    >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 [email protected]
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Hmm, what object (handle, fltinstance, device object etc) do you pass to the
    worker thread to do this query?

    Thanks,
    Ken

    -----Original Message-----
    From: Dan Kyler [mailto:[email protected]]
    Sent: Friday, August 12, 2005 12:21 PM
    To: Windows File Systems Devs Interest List
    Subject: Re: [ntfsd] FltGetVolumeGuidName during InstanceSetup

    > The documentation says it is safe to call this routine during the
    InstanceSetupCallBack.

    It is not safe. This was revealed at the last plugfest. You need to post
    the query to a worker thread to the volume guid name without a deadlock.

    It stinks, but that's the way it is.

    - Dan.

    At 09:01 AM 8/12/2005 -0700, you wrote:

    >I am calling FltGetVolumeGuidName from inside my InstanceSetupCallBack
    >routine yet it is hanging. This is a result of plugging in a USB drive.
    >The documentation says it is safe to call this routine during the
    >InstanceSetupCallBack.
    >
    >
    >
    >The stack looks like this:
    >
    >
    >
    > 4.00002c 86fc1020 00053c1 Blocked nt!KiSwapContext+0x2e
    >
    > nt!KiSwapThread+0x46
    >
    > nt!KeWaitForSingleObject+0x1c2
    >
    >
    MountMgr!MountMgrDeviceControl+0x2e
    >
    > nt!IopfCallDriver+0x31
    >
    > fltmgr!FltGetVolumeGuidName+0x13a
    >
    > MyDriver!RepInstanceSetup+0xac
    >
    >
    >fltmgr!FltpDoInstanceSetupNotification+0x4b
    >
    > fltmgr!FltpInitInstance+0x272
    >
    >
    >fltmgr!FltpCreateInstanceFromName+0x295
    >
    >
    >fltmgr!FltpEnumerateRegistryInstances+0xf4
    >
    >
    >fltmgr!FltpDoFilterNotificationForNewVolume+0xf5
    >
    > fltmgr!FltpCreate+0x16a
    >
    > nt!IopfCallDriver+0x31
    >
    > naiavf5x+0x74a0
    >
    > naiavf5x+0x2520
    >
    > nt!IopfCallDriver+0x31
    >
    > nt!IopParseDevice+0xa58
    >
    > nt!ObpLookupObjectName+0x56a
    >
    > nt!ObOpenObjectByName+0xeb
    >
    > nt!IopCreateFile+0x407
    >
    > nt!IoCreateFile+0x8e
    >
    > nt!NtOpenFile+0x27
    >
    > nt!KiFastCallEntry+0xf8
    >
    > nt!ZwOpenFile+0x11
    >
    >
    >VolSnap!VspDeleteDiffAreaFilesWorker+0xa0
    >
    > nt!IopProcessWorkItem+0x13
    >
    > nt!ExpWorkerThread+0x100
    >
    > nt!PspSystemThreadStartup+0x34
    >
    > nt!KiThreadStartup+0x16
    >
    >
    >
    >I was going to move the call when the first opened happened, but the docs
    >also say that that is when the InstanceSetupCallback is called. SO that
    >wont help.
    >
    >
    >
    >When can this routine safely be called?
    >
    >
    >
    >Thanks,
    >
    >Ken
    >
    >---
    >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 [email protected]


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

    You are currently subscribed to ntfsd as: [email protected]
    To unsubscribe send a blank email to [email protected]
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    I pass my instance context, which contains a pointer to the volume object.

    - Dan.

    At 12:30 PM 8/22/2005 -0700, you wrote:

    >Hmm, what object (handle, fltinstance, device object etc) do you pass to
    >the worker thread to do this query?
    >
    >Thanks,
    >Ken
    >
    >-----Original Message-----
    >From: Dan Kyler [mailto:[email protected]]
    >Sent: Friday, August 12, 2005 12:21 PM
    >To: Windows File Systems Devs Interest List
    >Subject: Re: [ntfsd] FltGetVolumeGuidName during InstanceSetup
    >
    > > The documentation says it is safe to call this routine during the
    >InstanceSetupCallBack.
    >
    >It is not safe. This was revealed at the last plugfest. You need to post
    >the query to a worker thread to the volume guid name without a deadlock.
    >
    >It stinks, but that's the way it is.
    >
    >- Dan.
    >
    >At 09:01 AM 8/12/2005 -0700, you wrote:
    >
    > >I am calling FltGetVolumeGuidName from inside my InstanceSetupCallBack
    > >routine yet it is hanging. This is a result of plugging in a USB drive.
    > >The documentation says it is safe to call this routine during the
    > >InstanceSetupCallBack.
    > >
    > >
    > >
    > >The stack looks like this:
    > >
    > >
    > >
    > > 4.00002c 86fc1020 00053c1 Blocked nt!KiSwapContext+0x2e
    > >
    > > nt!KiSwapThread+0x46
    > >
    > > nt!KeWaitForSingleObject+0x1c2
    > >
    > >
    > MountMgr!MountMgrDeviceControl+0x2e
    > >
    > > nt!IopfCallDriver+0x31
    > >
    > > fltmgr!FltGetVolumeGuidName+0x13a
    > >
    > > MyDriver!RepInstanceSetup+0xac
    > >
    > >
    > >fltmgr!FltpDoInstanceSetupNotification+0x4b
    > >
    > > fltmgr!FltpInitInstance+0x272
    > >
    > >
    > >fltmgr!FltpCreateInstanceFromName+0x295
    > >
    > >
    > >fltmgr!FltpEnumerateRegistryInstances+0xf4
    > >
    > >
    > >fltmgr!FltpDoFilterNotificationForNewVolume+0xf5
    > >
    > > fltmgr!FltpCreate+0x16a
    > >
    > > nt!IopfCallDriver+0x31
    > >
    > > naiavf5x+0x74a0
    > >
    > > naiavf5x+0x2520
    > >
    > > nt!IopfCallDriver+0x31
    > >
    > > nt!IopParseDevice+0xa58
    > >
    > > nt!ObpLookupObjectName+0x56a
    > >
    > > nt!ObOpenObjectByName+0xeb
    > >
    > > nt!IopCreateFile+0x407
    > >
    > > nt!IoCreateFile+0x8e
    > >
    > > nt!NtOpenFile+0x27
    > >
    > > nt!KiFastCallEntry+0xf8
    > >
    > > nt!ZwOpenFile+0x11
    > >
    > >
    > >VolSnap!VspDeleteDiffAreaFilesWorker+0xa0
    > >
    > > nt!IopProcessWorkItem+0x13
    > >
    > > nt!ExpWorkerThread+0x100
    > >
    > > nt!PspSystemThreadStartup+0x34
    > >
    > > nt!KiThreadStartup+0x16
    > >
    > >
    > >
    > >I was going to move the call when the first opened happened, but the docs
    > >also say that that is when the InstanceSetupCallback is called. SO that
    > >wont help.
    > >
    > >
    > >
    > >When can this routine safely be called?
    > >
    > >
    > >
    > >Thanks,
    > >
    > >Ken
    > >
    > >---
    > >Questions? First check the IFS FAQ at
    > >https://www.osronline.com/ar
    > ticle.cfm?id=17
    > >
    > >You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ''
    > >To unsubscribe send a blank email to [email protected]
    >
    >---
    >Questions? First check the IFS FAQ at
    >https://www.osronline.com/article.cfm?id=17
    >
    >
    >You are currently subscribed to ntfsd as: [email protected]
    >To unsubscribe send a blank email to [email protected]
    >
    >---
    >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 [email protected]
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Where volume object is "FltObjects->Volume"?



    Are there any other query APIs that should not be called InstanceSetup?



    Thanks,

    Ken





    _____

    From: Dan Kyler [mailto:[email protected]]
    Sent: Monday, August 22, 2005 4:23 PM
    To: Windows File Systems Devs Interest List
    Subject: RE: [ntfsd] FltGetVolumeGuidName during InstanceSetup



    I pass my instance context, which contains a pointer to the volume object.

    - Dan.

    At 12:30 PM 8/22/2005 -0700, you wrote:




    Hmm, what object (handle, fltinstance, device object etc) do you pass to the
    worker thread to do this query?

    Thanks,
    Ken

    -----Original Message-----
    From: Dan Kyler [mailto:[email protected] ]
    Sent: Friday, August 12, 2005 12:21 PM
    To: Windows File Systems Devs Interest List
    Subject: Re: [ntfsd] FltGetVolumeGuidName during InstanceSetup

    > The documentation says it is safe to call this routine during the
    InstanceSetupCallBack.

    It is not safe. This was revealed at the last plugfest. You need to post
    the query to a worker thread to the volume guid name without a deadlock.

    It stinks, but that's the way it is.

    - Dan.

    At 09:01 AM 8/12/2005 -0700, you wrote:

    >I am calling FltGetVolumeGuidName from inside my InstanceSetupCallBack
    >routine yet it is hanging. This is a result of plugging in a USB drive.
    >The documentation says it is safe to call this routine during the
    >InstanceSetupCallBack.
    >
    >
    >
    >The stack looks like this:
    >
    >
    >
    > 4.00002c 86fc1020 00053c1 Blocked nt!KiSwapContext+0x2e
    >
    > nt!KiSwapThread+0x46
    >
    > nt!KeWaitForSingleObject+0x1c2
    >
    >
    MountMgr!MountMgrDeviceControl+0x2e
    >
    > nt!IopfCallDriver+0x31
    >
    > fltmgr!FltGetVolumeGuidName+0x13a
    >
    > MyDriver!RepInstanceSetup+0xac
    >
    >
    >fltmgr!FltpDoInstanceSetupNotification+0x4b
    >
    > fltmgr!FltpInitInstance+0x272
    >
    >
    >fltmgr!FltpCreateInstanceFromName+0x295
    >
    >
    >fltmgr!FltpEnumerateRegistryInstances+0xf4
    >
    >
    >fltmgr!FltpDoFilterNotificationForNewVolume+0xf5
    >
    > fltmgr!FltpCreate+0x16a
    >
    > nt!IopfCallDriver+0x31
    >
    > naiavf5x+0x74a0
    >
    > naiavf5x+0x2520
    >
    > nt!IopfCallDriver+0x31
    >
    > nt!IopParseDevice+0xa58
    >
    > nt!ObpLookupObjectName+0x56a
    >
    > nt!ObOpenObjectByName+0xeb
    >
    > nt!IopCreateFile+0x407
    >
    > nt!IoCreateFile+0x8e
    >
    > nt!NtOpenFile+0x27
    >
    > nt!KiFastCallEntry+0xf8
    >
    > nt!ZwOpenFile+0x11
    >
    >
    >VolSnap!VspDeleteDiffAreaFilesWorker+0xa0
    >
    > nt!IopProcessWorkItem+0x13
    >
    > nt!ExpWorkerThread+0x100
    >
    > nt!PspSystemThreadStartup+0x34
    >
    > nt!KiThreadStartup+0x16
    >
    >
    >
    >I was going to move the call when the first opened happened, but the docs
    >also say that that is when the InstanceSetupCallback is called. SO that
    >wont help.
    >
    >
    >
    >When can this routine safely be called?
    >
    >
    >
    >Thanks,
    >
    >Ken
    >
    >---
    >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 [email protected]

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


    You are currently subscribed to ntfsd as: [email protected]
    To unsubscribe send a blank email to [email protected]

    ---
    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 [email protected]


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

    You are currently subscribed to ntfsd as: [email protected]
    To unsubscribe send a blank email to [email protected]
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    At 01:46 PM 8/22/2005 -0700, you wrote:

    >Where volume object is FltObjects->Volume?

    Yes.

    >
    >
    >Are there any other query APIs that should not be called InstanceSetup?
    >

    Anything that uses the mount manager can encounter this deadlock.

    - Dan.


    >
    >
    >Thanks,
    >
    >Ken
    >
    >
    >
    >
    >
    >----------
    >From: Dan Kyler [mailto:[email protected]]
    >Sent: Monday, August 22, 2005 4:23 PM
    >To: Windows File Systems Devs Interest List
    >Subject: RE: [ntfsd] FltGetVolumeGuidName during InstanceSetup
    >
    >
    >
    >I pass my instance context, which contains a pointer to the volume object.
    >
    >- Dan.
    >
    >At 12:30 PM 8/22/2005 -0700, you wrote:
    >
    >
    >Hmm, what object (handle, fltinstance, device object etc) do you pass to
    >the worker thread to do this query?
    >
    >Thanks,
    >Ken
    >
    >-----Original Message-----
    >From: Dan Kyler [mailto:[email protected]]
    >Sent: Friday, August 12, 2005 12:21 PM
    >To: Windows File Systems Devs Interest List
    >Subject: Re: [ntfsd] FltGetVolumeGuidName during InstanceSetup
    >
    > > The documentation says it is safe to call this routine during the
    >InstanceSetupCallBack.
    >
    >It is not safe. This was revealed at the last plugfest. You need to post
    >the query to a worker thread to the volume guid name without a deadlock.
    >
    >It stinks, but that's the way it is.
    >
    >- Dan.
    >
    >At 09:01 AM 8/12/2005 -0700, you wrote:
    >
    > >I am calling FltGetVolumeGuidName from inside my InstanceSetupCallBack
    > >routine yet it is hanging. This is a result of plugging in a USB drive.
    > >The documentation says it is safe to call this routine during the
    > >InstanceSetupCallBack.
    > >
    > >
    > >
    > >The stack looks like this:
    > >
    > >
    > >
    > > 4.00002c 86fc1020 00053c1 Blocked nt!KiSwapContext+0x2e
    > >
    > > nt!KiSwapThread+0x46
    > >
    > > nt!KeWaitForSingleObject+0x1c2
    > >
    > >
    > MountMgr!MountMgrDeviceControl+0x2e
    > >
    > > nt!IopfCallDriver+0x31
    > >
    > > fltmgr!FltGetVolumeGuidName+0x13a
    > >
    > > MyDriver!RepInstanceSetup+0xac
    > >
    > >
    > >fltmgr!FltpDoInstanceSetupNotification+0x4b
    > >
    > > fltmgr!FltpInitInstance+0x272
    > >
    > >
    > >fltmgr!FltpCreateInstanceFromName+0x295
    > >
    > >
    > >fltmgr!FltpEnumerateRegistryInstances+0xf4
    > >
    > >
    > >fltmgr!FltpDoFilterNotificationForNewVolume+0xf5
    > >
    > > fltmgr!FltpCreate+0x16a
    > >
    > > nt!IopfCallDriver+0x31
    > >
    > > naiavf5x+0x74a0
    > >
    > > naiavf5x+0x2520
    > >
    > > nt!IopfCallDriver+0x31
    > >
    > > nt!IopParseDevice+0xa58
    > >
    > > nt!ObpLookupObjectName+0x56a
    > >
    > > nt!ObOpenObjectByName+0xeb
    > >
    > > nt!IopCreateFile+0x407
    > >
    > > nt!IoCreateFile+0x8e
    > >
    > > nt!NtOpenFile+0x27
    > >
    > > nt!KiFastCallEntry+0xf8
    > >
    > > nt!ZwOpenFile+0x11
    > >
    > >
    > >VolSnap!VspDeleteDiffAreaFilesWorker+0xa0
    > >
    > > nt!IopProcessWorkItem+0x13
    > >
    > > nt!ExpWorkerThread+0x100
    > >
    > > nt!PspSystemThreadStartup+0x34
    > >
    > > nt!KiThreadStartup+0x16
    > >
    > >
    > >
    > >I was going to move the call when the first opened happened, but the docs
    > >also say that that is when the InstanceSetupCallback is called. SO that
    > >wont help.
    > >
    > >
    > >
    > >When can this routine safely be called?
    > >
    > >
    > >
    > >Thanks,
    > >
    > >Ken
    > >
    > >---
    > >Questions? First check the IFS FAQ at
    > >https://www.osronline.com/ar
    > ticle.cfm?id=17
    > >
    > >You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ''
    > >To unsubscribe send a blank email to [email protected]
    >
    >---
    >Questions? First check the IFS FAQ at
    >https://www.osronline.com/article.cfm?id=17
    >
    >
    >You are currently subscribed to ntfsd as: [email protected]
    >To unsubscribe send a blank email to [email protected]
    >
    >---
    >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 [email protected]
    >
    >
    >---
    >Questions? First check the IFS FAQ at
    >https://www.osronline.com/article.cfm?id=17
    >
    >You are currently subscribed to ntfsd as: [email protected]
    >To unsubscribe send a blank email to [email protected]
    >
    >---
    >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 [email protected]
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Thanks,



    Which ones use the Mount Manager?



    Ken



    _____

    From: Dan Kyler [mailto:[email protected]]
    Sent: Tuesday, August 23, 2005 11:26 AM
    To: Windows File Systems Devs Interest List
    Subject: RE: [ntfsd] FltGetVolumeGuidName during InstanceSetup



    At 01:46 PM 8/22/2005 -0700, you wrote:




    Where volume object is FltObjects->Volume?


    Yes.






    Are there any other query APIs that should not be called InstanceSetup?


    Anything that uses the mount manager can encounter this deadlock.

    - Dan.







    Thanks,

    Ken





    _____

    From: Dan Kyler [mailto:[email protected] ]
    Sent: Monday, August 22, 2005 4:23 PM
    To: Windows File Systems Devs Interest List
    Subject: RE: [ntfsd] FltGetVolumeGuidName during InstanceSetup



    I pass my instance context, which contains a pointer to the volume object.

    - Dan.

    At 12:30 PM 8/22/2005 -0700, you wrote:


    Hmm, what object (handle, fltinstance, device object etc) do you pass to the
    worker thread to do this query?

    Thanks,
    Ken

    -----Original Message-----
    From: Dan Kyler [mailto:[email protected] ]
    Sent: Friday, August 12, 2005 12:21 PM
    To: Windows File Systems Devs Interest List
    Subject: Re: [ntfsd] FltGetVolumeGuidName during InstanceSetup

    > The documentation says it is safe to call this routine during the
    InstanceSetupCallBack.

    It is not safe. This was revealed at the last plugfest. You need to post
    the query to a worker thread to the volume guid name without a deadlock.

    It stinks, but that's the way it is.

    - Dan.

    At 09:01 AM 8/12/2005 -0700, you wrote:

    >I am calling FltGetVolumeGuidName from inside my InstanceSetupCallBack
    >routine yet it is hanging. This is a result of plugging in a USB drive.
    >The documentation says it is safe to call this routine during the
    >InstanceSetupCallBack.
    >
    >
    >
    >The stack looks like this:
    >
    >
    >
    > 4.00002c 86fc1020 00053c1 Blocked nt!KiSwapContext+0x2e
    >
    > nt!KiSwapThread+0x46
    >
    > nt!KeWaitForSingleObject+0x1c2
    >
    >
    MountMgr!MountMgrDeviceControl+0x2e
    >
    > nt!IopfCallDriver+0x31
    >
    > fltmgr!FltGetVolumeGuidName+0x13a
    >
    > MyDriver!RepInstanceSetup+0xac
    >
    >
    >fltmgr!FltpDoInstanceSetupNotification+0x4b
    >
    > fltmgr!FltpInitInstance+0x272
    >
    >
    >fltmgr!FltpCreateInstanceFromName+0x295
    >
    >
    >fltmgr!FltpEnumerateRegistryInstances+0xf4
    >
    >
    >fltmgr!FltpDoFilterNotificationForNewVolume+0xf5
    >
    > fltmgr!FltpCreate+0x16a
    >
    > nt!IopfCallDriver+0x31
    >
    > naiavf5x+0x74a0
    >
    > naiavf5x+0x2520
    >
    > nt!IopfCallDriver+0x31
    >
    > nt!IopParseDevice+0xa58
    >
    > nt!ObpLookupObjectName+0x56a
    >
    > nt!ObOpenObjectByName+0xeb
    >
    > nt!IopCreateFile+0x407
    >
    > nt!IoCreateFile+0x8e
    >
    > nt!NtOpenFile+0x27
    >
    > nt!KiFastCallEntry+0xf8
    >
    > nt!ZwOpenFile+0x11
    >
    >
    >VolSnap!VspDeleteDiffAreaFilesWorker+0xa0
    >
    > nt!IopProcessWorkItem+0x13
    >
    > nt!ExpWorkerThread+0x100
    >
    > nt!PspSystemThreadStartup+0x34
    >
    > nt!KiThreadStartup+0x16
    >
    >
    >
    >I was going to move the call when the first opened happened, but the docs
    >also say that that is when the InstanceSetupCallback is called. SO that
    >wont help.
    >
    >
    >
    >When can this routine safely be called?
    >
    >
    >
    >Thanks,
    >
    >Ken
    >
    >---
    >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 [email protected]

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


    You are currently subscribed to ntfsd as: [email protected]
    To unsubscribe send a blank email to [email protected]

    ---
    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 [email protected]


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


    You are currently subscribed to ntfsd as: [email protected]
    To unsubscribe send a blank email to [email protected]

    ---
    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 [email protected]


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

    You are currently subscribed to ntfsd as: [email protected]
    To unsubscribe send a blank email to [email protected]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 12 September 2022 Live, Online
Internals & Software Drivers 23 October 2022 Live, Online
Kernel Debugging 14 November 2022 Live, Online
Developing Minifilters 5 December 2022 Live, Online