FastIoDetach "not" called (on time)

Hi,

I’m facing the following problem:

  • In my FS Filter(s), I attach to drive letter devices. I have a
    user mode service tell when a new device is inserted, and the drive
    letter is available (this eliminates the complexity of working with sym
    links to find out the file names). It does attach to non drive FSes,
    like Lanman, though.
  • Now, the problem occurs for removable media. I am not getting
    a FastIoDetach, on time. Yes, I know that it could be called in the
    future, and that it will be called sometime in the future, but the thing
    is it’s not called, even when a new media is inserted, and I have to re
    attach. I don’t want to keep the old device, and make a new one - this
    might not be a good idea is some cases.
    Now, “why” is FastIoDetach not called at least when a new media
    is inserted, and there is NO reason for the old object to stay, or why
    isn’t the new object still useful, until the detach occurs (in case when
    the same media is re inserted?)?
    On a side note: I know unloading a filter is unsafe, but “why”
    is detaching from a device also unsafe? I would guess the filter would
    still be able to process any IRPs, as it will still be loaded, only it
    won’t be attached any more.


Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
E-mail: xxxxx@alfasp.com
ICQ#: 56570367
Professional file&system related components and libraries for Win32
developers.
Alfa File Monitor - #1 file monitoring system for Win32 developers.
Alfa File Protector - #1 file protection and hiding system for Win32
developers.
Alfa Units - #1 file and system handling units for Delphi.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Dejan,

Can you check for IRP_MJ_PNP / IRP_MN_QUERY_REMOVE_DEVICE in your
DeviceIoControl dispatch routine? My filter seems to get this consistently
when the user ejects the removable device I am dealing with which is a USB
SCSI drive. Maybe this is different since the whole drive is removable, not
just the media. Anyway, just a thought.

Mike

----- Original Message -----
From: “Dejan Maksimovic”
To: “File Systems Developers”
Sent: Monday, July 23, 2001 11:06 PM
Subject: [ntfsd] FastIoDetach “not” called (on time)

>
> Hi,
>
> I’m facing the following problem:
> - In my FS Filter(s), I attach to drive letter devices. I have a
> user mode service tell when a new device is inserted, and the drive
> letter is available (this eliminates the complexity of working with sym
> links to find out the file names). It does attach to non drive FSes,
> like Lanman, though.
> - Now, the problem occurs for removable media. I am not getting
> a FastIoDetach, on time. Yes, I know that it could be called in the
> future, and that it will be called sometime in the future, but the thing
> is it’s not called, even when a new media is inserted, and I have to re
> attach. I don’t want to keep the old device, and make a new one - this
> might not be a good idea is some cases.
> Now, “why” is FastIoDetach not called at least when a new media
> is inserted, and there is NO reason for the old object to stay, or why
> isn’t the new object still useful, until the detach occurs (in case when
> the same media is re inserted?)?
> On a side note: I know unloading a filter is unsafe, but “why”
> is detaching from a device also unsafe? I would guess the filter would
> still be able to process any IRPs, as it will still be loaded, only it
> won’t be attached any more.
>
> –
> Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
> E-mail: xxxxx@alfasp.com
> ICQ#: 56570367
> Professional file&system related components and libraries for Win32
> developers.
> Alfa File Monitor - #1 file monitoring system for Win32 developers.
> Alfa File Protector - #1 file protection and hiding system for Win32
> developers.
> Alfa Units - #1 file and system handling units for Delphi.
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@xwarecorp.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

It’s not Win2K specific, and it doesn’t get IRP_MJ_PNP calls - or should I
use IoRegisterxxx (which) to enable this?

Regards, Dejan.

Michael Minnick wrote:

Dejan,

Can you check for IRP_MJ_PNP / IRP_MN_QUERY_REMOVE_DEVICE in your
DeviceIoControl dispatch routine? My filter seems to get this consistently
when the user ejects the removable device I am dealing with which is a USB
SCSI drive. Maybe this is different since the whole drive is removable, not
just the media. Anyway, just a thought.

Mike

----- Original Message -----
From: “Dejan Maksimovic”
> To: “File Systems Developers”
> Sent: Monday, July 23, 2001 11:06 PM
> Subject: [ntfsd] FastIoDetach “not” called (on time)
>
> >
> > Hi,
> >
> > I’m facing the following problem:
> > - In my FS Filter(s), I attach to drive letter devices. I have a
> > user mode service tell when a new device is inserted, and the drive
> > letter is available (this eliminates the complexity of working with sym
> > links to find out the file names). It does attach to non drive FSes,
> > like Lanman, though.
> > - Now, the problem occurs for removable media. I am not getting
> > a FastIoDetach, on time. Yes, I know that it could be called in the
> > future, and that it will be called sometime in the future, but the thing
> > is it’s not called, even when a new media is inserted, and I have to re
> > attach. I don’t want to keep the old device, and make a new one - this
> > might not be a good idea is some cases.
> > Now, “why” is FastIoDetach not called at least when a new media
> > is inserted, and there is NO reason for the old object to stay, or why
> > isn’t the new object still useful, until the detach occurs (in case when
> > the same media is re inserted?)?
> > On a side note: I know unloading a filter is unsafe, but “why”
> > is detaching from a device also unsafe? I would guess the filter would
> > still be able to process any IRPs, as it will still be loaded, only it
> > won’t be attached any more.
> >
> > –
> > Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
> > E-mail: xxxxx@alfasp.com
> > ICQ#: 56570367
> > Professional file&system related components and libraries for Win32
> > developers.
> > Alfa File Monitor - #1 file monitoring system for Win32 developers.
> > Alfa File Protector - #1 file protection and hiding system for Win32
> > developers.
> > Alfa Units - #1 file and system handling units for Delphi.
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@xwarecorp.com
> > To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@alfasp.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
E-mail: xxxxx@alfasp.com
ICQ#: 56570367
Professional file&system related components and libraries for Win32 developers.

Alfa File Monitor - #1 file monitoring system for Win32 developers.
Alfa File Protector - #1 file protection and hiding system for Win32
developers.
Alfa Units - #1 file and system handling units for Delphi.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Dejan,
Did you solve the problem, I am also facing same thing.

-Ramaraj

-----Original Message-----
From: Dejan Maksimovic [mailto:xxxxx@alfasp.com]
Sent: Tuesday, July 24, 2001 11:38 AM
To: File Systems Developers
Subject: [ntfsd] Re: FastIoDetach “not” called (on time)

It’s not Win2K specific, and it doesn’t get IRP_MJ_PNP calls - or
should I
use IoRegisterxxx (which) to enable this?

Regards, Dejan.

Michael Minnick wrote:

Dejan,

Can you check for IRP_MJ_PNP / IRP_MN_QUERY_REMOVE_DEVICE in your
DeviceIoControl dispatch routine? My filter seems to get this consistently
when the user ejects the removable device I am dealing with which is a USB
SCSI drive. Maybe this is different since the whole drive is removable,
not
just the media. Anyway, just a thought.

Mike

----- Original Message -----
From: “Dejan Maksimovic”
> To: “File Systems Developers”
> Sent: Monday, July 23, 2001 11:06 PM
> Subject: [ntfsd] FastIoDetach “not” called (on time)
>
> >
> > Hi,
> >
> > I’m facing the following problem:
> > - In my FS Filter(s), I attach to drive letter devices. I have a
> > user mode service tell when a new device is inserted, and the drive
> > letter is available (this eliminates the complexity of working with sym
> > links to find out the file names). It does attach to non drive FSes,
> > like Lanman, though.
> > - Now, the problem occurs for removable media. I am not getting
> > a FastIoDetach, on time. Yes, I know that it could be called in the
> > future, and that it will be called sometime in the future, but the thing
> > is it’s not called, even when a new media is inserted, and I have to re
> > attach. I don’t want to keep the old device, and make a new one - this
> > might not be a good idea is some cases.
> > Now, “why” is FastIoDetach not called at least when a new media
> > is inserted, and there is NO reason for the old object to stay, or why
> > isn’t the new object still useful, until the detach occurs (in case when
> > the same media is re inserted?)?
> > On a side note: I know unloading a filter is unsafe, but “why”
> > is detaching from a device also unsafe? I would guess the filter would
> > still be able to process any IRPs, as it will still be loaded, only it
> > won’t be attached any more.
> >
> > –
> > Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
> > E-mail: xxxxx@alfasp.com
> > ICQ#: 56570367
> > Professional file&system related components and libraries for Win32
> > developers.
> > Alfa File Monitor - #1 file monitoring system for Win32 developers.
> > Alfa File Protector - #1 file protection and hiding system for Win32
> > developers.
> > Alfa Units - #1 file and system handling units for Delphi.
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@xwarecorp.com
> > To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@alfasp.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
E-mail: xxxxx@alfasp.com
ICQ#: 56570367
Professional file&system related components and libraries for Win32
developers.

Alfa File Monitor - #1 file monitoring system for Win32 developers.
Alfa File Protector - #1 file protection and hiding system for Win32
developers.
Alfa Units - #1 file and system handling units for Delphi.


You are currently subscribed to ntfsd as: xxxxx@dvdjukebox.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Afraid not. I’m still looking for a work around.

Regards, Dejan.

Did you solve the problem, I am also facing same thing.
It’s not Win2K specific, and it doesn’t get IRP_MJ_PNP calls - or
should I use IoRegisterxxx (which) to enable this?
> Can you check for IRP_MJ_PNP / IRP_MN_QUERY_REMOVE_DEVICE in your
> DeviceIoControl dispatch routine? My filter seems to get this consistently
> when the user ejects the removable device I am dealing with which is a USB
> SCSI drive. Maybe this is different since the whole drive is removable,
not
> just the media. Anyway, just a thought.


Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
E-mail: xxxxx@alfasp.com
ICQ#: 56570367
Professional file&system related components and libraries for Win32 developers.
Alfa File Monitor - #1 file monitoring system for Win32 developers.
Alfa File Protector - #1 file protection and hiding system for Win32 developers.

Alfa Units - #1 file and system handling units for Delphi.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com