DISMOUNT and no teardown

Hi,

I made similar experience with a RDX drive and my minifilter as it was descibed here:
http://www.osronline.com/showThread.cfm?link=185865
Also at a customer with a cluster environment.

Trying to eject a removable media from a RDX drive which is currently in use fails after 2 retries. I see the failed FSCTRL_LOCK_VOLUME, I see the succeed FSCTL_DISMOUNT_VOLUME, but never the TearDown was called, but the InstanceSetup was called. So by the time the amount of instances per volume increases.

I did also the same, at FsCtrlPost I called FtlDetachInstance to “trigger” the teardown.
This works fine so far.

Anyhow I have some general question just for understanding and/or confirmation:

a) Is there any disadvantage if I trigger the teardown by myself after the dismount?

b) Did I understood it correct: The FS has a CDO and VDO/volume. When the VDO is closed/destroyed, then also the FltMgr triggers the teardown. FS will only close a VDO if there are no open handles to the VDO?

c) How can I see if FS destroyed the VDO? How can I query that there are no open handles to the VDO?

Thx
Norbert

> Trying to eject a removable media from a RDX drive which is currently in use fails after 2 retries. I see

the failed FSCTRL_LOCK_VOLUME, I see the succeed FSCTL_DISMOUNT_VOLUME, but never
the TearDown was called, but the InstanceSetup was called. So by the time the amount of instances
per volume increases.

Will teardown be called in CloseHandle of the handle you used to send dismount?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Maxim,

I’m not sure if I understood your question complete.

I do the eject via Explorer, so AFAIK the Explorer sends the LOCK and the DISMOUNT.
I assume you mean to check when the CloseHandle for the LOCK/DISMOUNT sequence will be called without calling FltDetachInstance after DISMOUNT.

I will check this.
Norbert