Logical Disk Filter Device Detach Time

Hi everyone
I’ve got the follwing question: how can I detect when I should detach my
logical disk filter device from the real one? NT 4.0 was sending Fast IO
Detach() request when it was deleting the real ones, so filter and other
attached devices knew when they could stop. But W2K doesn’t call Fast IO
Detach() at all and I see no other way to detach my devices in time. Please
help me.

Thanx.

> Hi everyone

I’ve got the follwing question: how can I detect when I should detach my
logical disk filter device from the real one? NT 4.0 was sending Fast IO
Detach() request when it was deleting the real ones, so filter and other
attached devices knew when they could stop. But W2K doesn’t call Fast IO
Detach() at all and I see no other way to detach my devices in time.
Please

If you use the PnP device stack in w2k, than detaching/deleting your DO must
be done in IRP_MN_REMOVE_DEVICE path.

Max

>> Hi everyone

> I’ve got the follwing question: how can I detect when I should detach
my
> logical disk filter device from the real one? NT 4.0 was sending Fast
IO
> Detach() request when it was deleting the real ones, so filter and
other
> attached devices knew when they could stop. But W2K doesn’t call Fast
IO
> Detach() at all and I see no other way to detach my devices in time.

Please

If you use the PnP device stack in w2k, than detaching/deleting your DO > must
be done in IRP_MN_REMOVE_DEVICE path.

As far as I’ve understood PnP device stack is not appyable for FS/Logical
Volumes filters. But thanx for the answer anyway :slight_smile:

This functionality has not been changed in W2k. FastIoDetachDevice is
properly called by the I/O Manager when a device is being torn down. An
easy way to test this is to force a dismount by formatting a volume.
Can you give some explicit examples of where this is not called?

Thanks,

Neal Christiansen

PS You are correct, PnP has nothing to do with filters and volumes.

-----Original Message-----
From: xxxxx@storactive.com
[mailto:xxxxx@storactive.com]
Sent: Tuesday, May 23, 2000 8:56 PM
To: File Systems Developers
Subject: [ntfsd] Re: Logical Disk Filter Device Detach Time

> Hi everyone
> I’ve got the follwing question: how can I detect when I should detach

my

> logical disk filter device from the real one? NT 4.0 was sending Fast

IO

> Detach() request when it was deleting the real ones, so filter and
other
> attached devices knew when they could stop. But W2K doesn’t call Fast

IO

> Detach() at all and I see no other way to detach my devices in time.

Please

If you use the PnP device stack in w2k, than detaching/deleting your
DO > must
be done in IRP_MN_REMOVE_DEVICE path.

As far as I’ve understood PnP device stack is not appyable for
FS/Logical
Volumes filters. But thanx for the answer anyway :slight_smile:


You are currently subscribed to ntfsd as: xxxxx@Exchange.Microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Hi,
I tried to write a simple logical disk filtering driver for W2k (RC 2 or RC
3) about 3 month ago (actually I only modify NT DDK sample). I inserted my
driver as an upper filter (SetupDiSetDeviceRegistryProperty(DeviceInfoSet,
DeviceInfoData, SPDRP_UPPERFILTERS, …) for existing logical disks, but I
was unsuccesfull to insert it as a filter for class device. I got PnP
messages like Add Device, IRP_MJ_PNP/IRP_MN_START_DEVICE and
IRP_MJ_PNP/IRP_MN_REMOVE_DEVICE. It seems the driver worked properly.

I hope, it may help

mari

-----Original Message-----
From: Neal Christiansen [mailto:xxxxx@Exchange.Microsoft.com]
Sent: Tuesday, June 13, 2000 1:19 AM
To: File Systems Developers
Subject: [ntfsd] Re: Logical Disk Filter Device Detach Time

This functionality has not been changed in W2k. FastIoDetachDevice is
properly called by the I/O Manager when a device is being torn down. An
easy way to test this is to force a dismount by formatting a volume. Can
you give some explicit examples of where this is not called?

Thanks,

Neal Christiansen

PS You are correct, PnP has nothing to do with filters and volumes.

-----Original Message-----
From: xxxxx@storactive.com
[ mailto:xxxxx@storactive.com
mailto:xxxxx ]
Sent: Tuesday, May 23, 2000 8:56 PM
To: File Systems Developers
Subject: [ntfsd] Re: Logical Disk Filter Device Detach Time

>> Hi everyone
>> I’ve got the follwing question: how can I detect when I should detach
my
>> logical disk filter device from the real one? NT 4.0 was sending Fast
IO
>> Detach() request when it was deleting the real ones, so filter and
other
>> attached devices knew when they could stop. But W2K doesn’t call Fast
IO
>> Detach() at all and I see no other way to detach my devices in time.

> Please

> If you use the PnP device stack in w2k, than detaching/deleting your DO >
must
> be done in IRP_MN_REMOVE_DEVICE path.

As far as I’ve understood PnP device stack is not appyable for FS/Logical
Volumes filters. But thanx for the answer anyway :slight_smile:


You are currently subscribed to ntfsd as: xxxxx@Exchange.Microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)</mailto:xxxxx>

Sorry, I was wrong about PnP. My filter receives
IRP_MN_QUERY_DEVICE_RELATIONS,
IRP_MN_QUERY_RESOURCE_REQUIREMENTS,IRP_MN_(QUERY_)STOP_DEVICE,IRP_MN_(QUERY_)REMOVE_DEVICE
and may be even more. What’s about FastIoDetach() request, I’m not quite
sure about it. May be it’s received may be it is not. The problem is that
during shut down I can do NOTHING to see if the routine is executed. Even
event logging is not working. I tried to place INT 3 in FastIoDetach()
handle and see it in SoftICE but the system just RESTARTED instead of
“popping up” SoftICE window.
Anyway, it seems W2K has very unstable core, so it just hangs up or reboots
instead of showing the “blue screen” sometimes.

On 06/13/00, “=?iso-8859-1?Q?Mar=EDk_Miloslav?= ” wrote:
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
>
> ------_=NextPart_001_01BFD521.6E71C0BA
> Content-Type: text/plain;
> charset=“iso-8859-1”
>
> Hi,
> I tried to write a simple logical disk filtering driver for W2k (RC 2 or RC
> 3) about 3 month ago (actually I only modify NT DDK sample). I inserted my
> driver as an upper filter (SetupDiSetDeviceRegistryProperty(DeviceInfoSet,
> DeviceInfoData, SPDRP_UPPERFILTERS, …) for existing logical disks, but I
> was unsuccesfull to insert it as a filter for class device. I got PnP
> messages like Add Device, IRP_MJ_PNP/IRP_MN_START_DEVICE and
> IRP_MJ_PNP/IRP_MN_REMOVE_DEVICE. It seems the driver worked properly.
>
> I hope, it may help
>
> mari
>
>
>
> -----Original Message-----
> From: Neal Christiansen [mailto:xxxxx@Exchange.Microsoft.com]
> Sent: Tuesday, June 13, 2000 1:19 AM
> To: File Systems Developers
> Subject: [ntfsd] Re: Logical Disk Filter Device Detach Time
>
>
>
> This functionality has not been changed in W2k. FastIoDetachDevice is
> properly called by the I/O Manager when a device is being torn down. An
> easy way to test this is to force a dismount by formatting a volume. Can
> you give some explicit examples of where this is not called?
>
> Thanks,
>
> Neal Christiansen
>
> PS You are correct, PnP has nothing to do with filters and volumes.
>
>
> -----Original Message-----
> From: xxxxx@storactive.com
> [mailto:xxxxx@storactive.com
> mailto:xxxxx]
> Sent: Tuesday, May 23, 2000 8:56 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: Logical Disk Filter Device Detach Time
>
>
> >> Hi everyone
> >> I’ve got the follwing question: how can I detect when I should detach
> my
> >> logical disk filter device from the real one? NT 4.0 was sending Fast
> IO
> >> Detach() request when it was deleting the real ones, so filter and
> other
> >> attached devices knew when they could stop. But W2K doesn’t call Fast
> IO
> >> Detach() at all and I see no other way to detach my devices in time.
>
> > Please
>
> > If you use the PnP device stack in w2k, than detaching/deleting your DO >
> must
> > be done in IRP_MN_REMOVE_DEVICE path.
>
> As far as I’ve understood PnP device stack is not appyable for FS/Logical
> Volumes filters. But thanx for the answer anyway :slight_smile:
>
> —
> You are currently subscribed to ntfsd as: xxxxx@Exchange.Microsoft.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
>
> ------
=_NextPart_001_01BFD521.6E71C0BA
> Content-Type: text/html;
> charset=“iso-8859-1”
>
>
>
>

> RE: [ntfsd] Re: Logical Disk Filter Device Detach Time

>
>

>
>

> class=280354609-13062000>Hi,


>
I
> tried to write a simple logical disk filtering driver for W2k (RC 2 or RC 3)
> about 3 month ago (actually I only modify > size=2>NT DDK sample). I inserted
> my driver as an upper filter (SetupDiSetDeviceRegistryProperty(DeviceInfoSet,
> DeviceInfoData, SPDRP_UPPERFILTERS, …) for existing logical disks, but I was
> unsuccesfull to insert it as a filter for class device. I got PnP messages
> like Add Device, IRP_MJ_PNP/IRP_MN_START_DEVICE and
> IRP_MJ_PNP/IRP_MN_REMOVE_DEVICE. It seems the driver worked
> properly.


>

> class=280354609-13062000>


>
I
> hope, it may help


>

> class=280354609-13062000>


>
> class=280354609-13062000>mari


>

> class=280354609-13062000>


>


>


> size=2>> face=Arial> -----Original Message-----
From: Neal
> Christiansen [mailto:xxxxx@Exchange.Microsoft.com]
Sent: Tuesday,
> June 13, 2000 1:19 AM
To: File Systems Developers
Subject:
> [ntfsd] Re: Logical Disk Filter Device Detach Time


>

>

This functionality has not been changed in W2k.
> FastIoDetachDevice is properly called by the I/O Manager when a device is
> being torn down. An easy way to test this is to force a dismount by
> formatting a volume. Can you give some explicit examples of where this
> is not called?


>

Thanks,


>

Neal Christiansen


>

PS You are correct, PnP has nothing to do with filters
> and volumes.



>

-----Original Message-----
From:
> xxxxx@storactive.com
[> href="mailto:xxxxx@storactive.com">mailto:xxxxx@storactive.com]
>
Sent: Tuesday, May 23, 2000 8:56 PM
> size=2>To: File Systems Developers
Subject: [ntfsd]
> Re: Logical Disk Filter Device Detach Time



>

>> Hi everyone
>> I've got
> the follwing question: how can I detect when I should detach
> size=2>my
>> logical disk filter device from the
> real one? NT 4.0 was sending Fast
IO
> size=2>>> Detach() request when it was deleting the real ones, so filter
> and
other
>> attached
> devices knew when they could stop. But W2K doesn't call Fast
> size=2>IO
>> Detach() at all and I see no other
> way to detach my devices in time.


>

> Please


>

> If you use the PnP device stack in w2k, than
> detaching/deleting your DO > must
> be done in
> IRP_MN_REMOVE_DEVICE path.


>

As far as I've understood PnP device stack is not appyable for
> FS/Logical
Volumes filters. But thanx for the answer
> anyway :-)


>

---
You are currently subscribed to
> ntfsd as: xxxxx@Exchange.Microsoft.com
To unsubscribe
> send a blank email to $subst('Email.Unsub')
>


>
> ------_=_NextPart_001_01BFD521.6E71C0BA--

> Sorry, I was wrong about PnP. My filter receives

IRP_MN_QUERY_DEVICE_RELATIONS,

IRP_MN_QUERY_RESOURCE_REQUIREMENTS,IRP_MN_(QUERY_)STOP_DEVICE,IRP_MN_(QUERY_
)REMOVE_DEVICE

and may be even more. What’s about FastIoDetach() request, I’m not quite

No need of FastIoDetach in the PnP stacks. You must detach your device in
MN_REMOVE_DEVICE handler. The stack disassembles itself from top to
bottom while handling MN_REMOVE_DEVICE.
FastIoDetach is called only when disassembling from bottom to top
(IoDeleteDevice calls it if there is another device attached to the victim).

Max