shadow devices

Hi, everybody,
I have made a filter driver and I am using shadow devices to avoid reentrancy (as in a Tony Mason’s article).
When I receive a call to a shadow device I do this :

// IoSkipCurrentIrpStackLocation
Irp->CurrentLocation++;
Irp->Tail.Overlay.CurrentStackLocation++;
IoCallDriver(PtrDeviceExtension->TargetDeviceObject, Irp);

This works OK almost all the time, except when I try to open a file in my PC from a remote PC. When that happens the process never (waited until 10 seconds) returns from the call to IoCallDriver. Am I doing something wrong?
Thanks.

I’m not sure what your code is trying to do, but I’m
pretty sure you have to copy the stack location.
IoSkipCurrentIrpStackLocation does this for you. What
happens if you comment out lines 2 and 3 and uncomment
line 1?

I am using this technique as well, and I haven’t seen
the behavior you are describing.

Randy

— Ratmil Torres wrote:
> Hi, everybody,
> I have made a filter driver and I am using shadow
> devices to avoid reentrancy (as in a Tony Mason’s
> article).
> When I receive a call to a shadow device I do this :
>
> // IoSkipCurrentIrpStackLocation
> Irp->CurrentLocation++;
> Irp->Tail.Overlay.CurrentStackLocation++;
>
> IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> Irp);
>
>
> This works OK almost all the time, except when I try
> to open a file in my PC from a remote PC. When that
> happens the process never (waited until 10 seconds)
> returns from the call to IoCallDriver. Am I doing
> something wrong?
> Thanks.
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook™.
http://calendar.yahoo.com

Thanks, I did just as you say, that worked. Now it only happens when the following conditions met :

-I have mapped a networked drive, for example J: to \MyLocalPC\AnyFolder.
-“MyLocalPC” is the local PC, so it is drive map to the local hard drive.

  • I try to open a file like “j:\file.exe”.
  • So this create call is sent to the NetworkRedirector (I guess, anyway it is sent to some driver). And then it is sent again to NTFS (or FAT or any other).

I changed my code to :

IoSkipCurrentIrpStackLocation(Irp);
IoCallDriver(PtrTargetDevice, Irp);
// And it never returns here.

----- Original Message -----
From: “Randy Cook”
To: “File Systems Developers”
Sent: Monday, June 02, 2003 8:02 PM
Subject: [ntfsd] Re: shadow devices

> I’m not sure what your code is trying to do, but I’m
> pretty sure you have to copy the stack location.
> IoSkipCurrentIrpStackLocation does this for you. What
> happens if you comment out lines 2 and 3 and uncomment
> line 1?
>
> I am using this technique as well, and I haven’t seen
> the behavior you are describing.
>
> Randy
>
> — Ratmil Torres wrote:
> > Hi, everybody,
> > I have made a filter driver and I am using shadow
> > devices to avoid reentrancy (as in a Tony Mason’s
> > article).
> > When I receive a call to a shadow device I do this :
> >
> > // IoSkipCurrentIrpStackLocation
> > Irp->CurrentLocation++;
> > Irp->Tail.Overlay.CurrentStackLocation++;
> >
> > IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > Irp);
> >
> >
> > This works OK almost all the time, except when I try
> > to open a file in my PC from a remote PC. When that
> > happens the process never (waited until 10 seconds)
> > returns from the call to IoCallDriver. Am I doing
> > something wrong?
> > Thanks.
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> > xxxxx@yahoo.com
> > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook™.
> http://calendar.yahoo.com
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Well, there is something going on. When I follow your
steps exactly I sometimes see a delay (~30 secs) and
sometimes it hangs.

This only happens when I map a drive to the local
machine. Remote access doesn’t appear to have the
same problem.

I don’t have time to get into it right now, but when I
do I’ll let you know.

Randy

— Ratmil Torres wrote:
> Thanks, I did just as you say, that worked. Now it
> only happens when the following conditions met :
>
> -I have mapped a networked drive, for example J: to
> \MyLocalPC\AnyFolder.
> -“MyLocalPC” is the local PC, so it is drive map to
> the local hard drive.
> - I try to open a file like “j:\file.exe”.
> - So this create call is sent to the
> NetworkRedirector (I guess, anyway it is sent to
> some driver). And then it is sent again to NTFS (or
> FAT or any other).
>
> I changed my code to :
>
> IoSkipCurrentIrpStackLocation(Irp);
> IoCallDriver(PtrTargetDevice, Irp);
> // And it never returns here.
>
> ----- Original Message -----
> From: “Randy Cook”
> To: “File Systems Developers”
> Sent: Monday, June 02, 2003 8:02 PM
> Subject: [ntfsd] Re: shadow devices
>
>
> > I’m not sure what your code is trying to do, but
> I’m
> > pretty sure you have to copy the stack location.
> > IoSkipCurrentIrpStackLocation does this for you.
> What
> > happens if you comment out lines 2 and 3 and
> uncomment
> > line 1?
> >
> > I am using this technique as well, and I haven’t
> seen
> > the behavior you are describing.
> >
> > Randy
> >
> > — Ratmil Torres wrote:
> > > Hi, everybody,
> > > I have made a filter driver and I am using
> shadow
> > > devices to avoid reentrancy (as in a Tony
> Mason’s
> > > article).
> > > When I receive a call to a shadow device I do
> this :
> > >
> > > // IoSkipCurrentIrpStackLocation
> > > Irp->CurrentLocation++;
> > > Irp->Tail.Overlay.CurrentStackLocation++;
> > >
> > >
> IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > Irp);
> > >
> > >
> > > This works OK almost all the time, except when I
> try
> > > to open a file in my PC from a remote PC. When
> that
> > > happens the process never (waited until 10
> seconds)
> > > returns from the call to IoCallDriver. Am I
> doing
> > > something wrong?
> > > Thanks.
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as:
> > > xxxxx@yahoo.com
> > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > >
> >
> >
> >
> > Do you Yahoo!?
> > Yahoo! Calendar - Free online calendar with sync
> to Outlook™.
> > http://calendar.yahoo.com
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> xxxxx@seg.inf.cu
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> >
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>


Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook™.
http://calendar.yahoo.com

30 seconds indicates you are hitting a “timeout” on CIFS…

What version of Windows (including service packs) are you using?

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: Randy Cook [mailto:xxxxx@yahoo.com]
Sent: Tuesday, June 03, 2003 6:33 PM
To: File Systems Developers
Subject: [ntfsd] Re: shadow devices

Well, there is something going on. When I follow your
steps exactly I sometimes see a delay (~30 secs) and
sometimes it hangs.

This only happens when I map a drive to the local
machine. Remote access doesn’t appear to have the
same problem.

I don’t have time to get into it right now, but when I
do I’ll let you know.

Randy

— Ratmil Torres wrote:
> Thanks, I did just as you say, that worked. Now it
> only happens when the following conditions met :
>
> -I have mapped a networked drive, for example J: to
> \MyLocalPC\AnyFolder.
> -“MyLocalPC” is the local PC, so it is drive map to
> the local hard drive.
> - I try to open a file like “j:\file.exe”.
> - So this create call is sent to the
> NetworkRedirector (I guess, anyway it is sent to
> some driver). And then it is sent again to NTFS (or
> FAT or any other).
>
> I changed my code to :
>
> IoSkipCurrentIrpStackLocation(Irp);
> IoCallDriver(PtrTargetDevice, Irp);
> // And it never returns here.
>
> ----- Original Message -----
> From: “Randy Cook”
> To: “File Systems Developers”
> Sent: Monday, June 02, 2003 8:02 PM
> Subject: [ntfsd] Re: shadow devices
>
>
> > I’m not sure what your code is trying to do, but
> I’m
> > pretty sure you have to copy the stack location.
> > IoSkipCurrentIrpStackLocation does this for you.
> What
> > happens if you comment out lines 2 and 3 and
> uncomment
> > line 1?
> >
> > I am using this technique as well, and I haven’t
> seen
> > the behavior you are describing.
> >
> > Randy
> >
> > — Ratmil Torres wrote:
> > > Hi, everybody,
> > > I have made a filter driver and I am using
> shadow
> > > devices to avoid reentrancy (as in a Tony
> Mason’s
> > > article).
> > > When I receive a call to a shadow device I do
> this :
> > >
> > > // IoSkipCurrentIrpStackLocation
> > > Irp->CurrentLocation++;
> > > Irp->Tail.Overlay.CurrentStackLocation++;
> > >
> > >
> IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > Irp);
> > >
> > >
> > > This works OK almost all the time, except when I
> try
> > > to open a file in my PC from a remote PC. When
> that
> > > happens the process never (waited until 10
> seconds)
> > > returns from the call to IoCallDriver. Am I
> doing
> > > something wrong?
> > > Thanks.
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as:
> > > xxxxx@yahoo.com
> > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > >
> >
> >
> >
> > Do you Yahoo!?
> > Yahoo! Calendar - Free online calendar with sync
> to Outlook™.
> > http://calendar.yahoo.com
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> xxxxx@seg.inf.cu
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> >
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>


Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook™.
http://calendar.yahoo.com


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks a lot, Randy. That helps me a lot to understand what the problem is.
----- Original Message -----
From: “Randy Cook”
To: “File Systems Developers”
Sent: Tuesday, June 03, 2003 6:33 PM
Subject: [ntfsd] Re: shadow devices

> Well, there is something going on. When I follow your
> steps exactly I sometimes see a delay (~30 secs) and
> sometimes it hangs.
>
> This only happens when I map a drive to the local
> machine. Remote access doesn’t appear to have the
> same problem.
>
> I don’t have time to get into it right now, but when I
> do I’ll let you know.
>
> Randy
>
> — Ratmil Torres wrote:
> > Thanks, I did just as you say, that worked. Now it
> > only happens when the following conditions met :
> >
> > -I have mapped a networked drive, for example J: to
> > \MyLocalPC\AnyFolder.
> > -“MyLocalPC” is the local PC, so it is drive map to
> > the local hard drive.
> > - I try to open a file like “j:\file.exe”.
> > - So this create call is sent to the
> > NetworkRedirector (I guess, anyway it is sent to
> > some driver). And then it is sent again to NTFS (or
> > FAT or any other).
> >
> > I changed my code to :
> >
> > IoSkipCurrentIrpStackLocation(Irp);
> > IoCallDriver(PtrTargetDevice, Irp);
> > // And it never returns here.
> >
> > ----- Original Message -----
> > From: “Randy Cook”
> > To: “File Systems Developers”
> > Sent: Monday, June 02, 2003 8:02 PM
> > Subject: [ntfsd] Re: shadow devices
> >
> >
> > > I’m not sure what your code is trying to do, but
> > I’m
> > > pretty sure you have to copy the stack location.
> > > IoSkipCurrentIrpStackLocation does this for you.
> > What
> > > happens if you comment out lines 2 and 3 and
> > uncomment
> > > line 1?
> > >
> > > I am using this technique as well, and I haven’t
> > seen
> > > the behavior you are describing.
> > >
> > > Randy
> > >
> > > — Ratmil Torres wrote:
> > > > Hi, everybody,
> > > > I have made a filter driver and I am using
> > shadow
> > > > devices to avoid reentrancy (as in a Tony
> > Mason’s
> > > > article).
> > > > When I receive a call to a shadow device I do
> > this :
> > > >
> > > > // IoSkipCurrentIrpStackLocation
> > > > Irp->CurrentLocation++;
> > > > Irp->Tail.Overlay.CurrentStackLocation++;
> > > >
> > > >
> > IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > > Irp);
> > > >
> > > >
> > > > This works OK almost all the time, except when I
> > try
> > > > to open a file in my PC from a remote PC. When
> > that
> > > > happens the process never (waited until 10
> > seconds)
> > > > returns from the call to IoCallDriver. Am I
> > doing
> > > > something wrong?
> > > > Thanks.
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntfsd as:
> > > > xxxxx@yahoo.com
> > > > To unsubscribe send a blank email to
> > > > xxxxx@lists.osr.com
> > > >
> > >
> > >
> > >
> > > Do you Yahoo!?
> > > Yahoo! Calendar - Free online calendar with sync
> > to Outlook™.
> > > http://calendar.yahoo.com
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as:
> > xxxxx@seg.inf.cu
> > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > >
> > >
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> > xxxxx@yahoo.com
> > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
>
>
>

> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook™.
> http://calendar.yahoo.com
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

It is Windows 2000 Advanced Server, no service pack.
Version 5.00.2195.
It doesn’t happen in WXP.
----- Original Message -----
From: “Tony Mason”
To: “File Systems Developers”
Sent: Tuesday, June 03, 2003 7:45 PM
Subject: [ntfsd] Re: shadow devices

> 30 seconds indicates you are hitting a “timeout” on CIFS…
>
> What version of Windows (including service packs) are you using?
>
> Regards,
>
> Tony
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
>
>
> -----Original Message-----
> From: Randy Cook [mailto:xxxxx@yahoo.com]
> Sent: Tuesday, June 03, 2003 6:33 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: shadow devices
>
> Well, there is something going on. When I follow your
> steps exactly I sometimes see a delay (~30 secs) and
> sometimes it hangs.
>
> This only happens when I map a drive to the local
> machine. Remote access doesn’t appear to have the
> same problem.
>
> I don’t have time to get into it right now, but when I
> do I’ll let you know.
>
> Randy
>
> — Ratmil Torres wrote:
> > Thanks, I did just as you say, that worked. Now it
> > only happens when the following conditions met :
> >
> > -I have mapped a networked drive, for example J: to
> > \MyLocalPC\AnyFolder.
> > -“MyLocalPC” is the local PC, so it is drive map to
> > the local hard drive.
> > - I try to open a file like “j:\file.exe”.
> > - So this create call is sent to the
> > NetworkRedirector (I guess, anyway it is sent to
> > some driver). And then it is sent again to NTFS (or
> > FAT or any other).
> >
> > I changed my code to :
> >
> > IoSkipCurrentIrpStackLocation(Irp);
> > IoCallDriver(PtrTargetDevice, Irp);
> > // And it never returns here.
> >
> > ----- Original Message -----
> > From: “Randy Cook”
> > To: “File Systems Developers”
> > Sent: Monday, June 02, 2003 8:02 PM
> > Subject: [ntfsd] Re: shadow devices
> >
> >
> > > I’m not sure what your code is trying to do, but
> > I’m
> > > pretty sure you have to copy the stack location.
> > > IoSkipCurrentIrpStackLocation does this for you.
> > What
> > > happens if you comment out lines 2 and 3 and
> > uncomment
> > > line 1?
> > >
> > > I am using this technique as well, and I haven’t
> > seen
> > > the behavior you are describing.
> > >
> > > Randy
> > >
> > > — Ratmil Torres wrote:
> > > > Hi, everybody,
> > > > I have made a filter driver and I am using
> > shadow
> > > > devices to avoid reentrancy (as in a Tony
> > Mason’s
> > > > article).
> > > > When I receive a call to a shadow device I do
> > this :
> > > >
> > > > // IoSkipCurrentIrpStackLocation
> > > > Irp->CurrentLocation++;
> > > > Irp->Tail.Overlay.CurrentStackLocation++;
> > > >
> > > >
> > IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > > Irp);
> > > >
> > > >
> > > > This works OK almost all the time, except when I
> > try
> > > > to open a file in my PC from a remote PC. When
> > that
> > > > happens the process never (waited until 10
> > seconds)
> > > > returns from the call to IoCallDriver. Am I
> > doing
> > > > something wrong?
> > > > Thanks.
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntfsd as:
> > > > xxxxx@yahoo.com
> > > > To unsubscribe send a blank email to
> > > > xxxxx@lists.osr.com
> > > >
> > >
> > >
> > >
> > > Do you Yahoo!?
> > > Yahoo! Calendar - Free online calendar with sync
> > to Outlook™.
> > > http://calendar.yahoo.com
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as:
> > xxxxx@seg.inf.cu
> > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > >
> > >
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> > xxxxx@yahoo.com
> > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
>
>
>

> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook™.
> http://calendar.yahoo.com
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@osr.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Same here. It works on XP, breaks on W2K Pro. no
service packs.

I’ll try applying the latest SP.

— Ratmil Torres wrote:
> It is Windows 2000 Advanced Server, no service pack.
> Version 5.00.2195.
> It doesn’t happen in WXP.
> ----- Original Message -----
> From: “Tony Mason”
> To: “File Systems Developers”
> Sent: Tuesday, June 03, 2003 7:45 PM
> Subject: [ntfsd] Re: shadow devices
>
>
> > 30 seconds indicates you are hitting a “timeout”
> on CIFS…
> >
> > What version of Windows (including service packs)
> are you using?
> >
> > Regards,
> >
> > Tony
> >
> > Tony Mason
> > Consulting Partner
> > OSR Open Systems Resources, Inc.
> > http://www.osr.com
> >
> >
> > -----Original Message-----
> > From: Randy Cook [mailto:xxxxx@yahoo.com]
> > Sent: Tuesday, June 03, 2003 6:33 PM
> > To: File Systems Developers
> > Subject: [ntfsd] Re: shadow devices
> >
> > Well, there is something going on. When I follow
> your
> > steps exactly I sometimes see a delay (~30 secs)
> and
> > sometimes it hangs.
> >
> > This only happens when I map a drive to the local
> > machine. Remote access doesn’t appear to have the
> > same problem.
> >
> > I don’t have time to get into it right now, but
> when I
> > do I’ll let you know.
> >
> > Randy
> >
> > — Ratmil Torres wrote:
> > > Thanks, I did just as you say, that worked. Now
> it
> > > only happens when the following conditions met :
> > >
> > > -I have mapped a networked drive, for example J:
> to
> > > \MyLocalPC\AnyFolder.
> > > -“MyLocalPC” is the local PC, so it is drive map
> to
> > > the local hard drive.
> > > - I try to open a file like “j:\file.exe”.
> > > - So this create call is sent to the
> > > NetworkRedirector (I guess, anyway it is sent to
> > > some driver). And then it is sent again to NTFS
> (or
> > > FAT or any other).
> > >
> > > I changed my code to :
> > >
> > > IoSkipCurrentIrpStackLocation(Irp);
> > > IoCallDriver(PtrTargetDevice, Irp);
> > > // And it never returns here.
> > >
> > > ----- Original Message -----
> > > From: “Randy Cook”
> > > To: “File Systems Developers”
>
> > > Sent: Monday, June 02, 2003 8:02 PM
> > > Subject: [ntfsd] Re: shadow devices
> > >
> > >
> > > > I’m not sure what your code is trying to do,
> but
> > > I’m
> > > > pretty sure you have to copy the stack
> location.
> > > > IoSkipCurrentIrpStackLocation does this for
> you.
> > > What
> > > > happens if you comment out lines 2 and 3 and
> > > uncomment
> > > > line 1?
> > > >
> > > > I am using this technique as well, and I
> haven’t
> > > seen
> > > > the behavior you are describing.
> > > >
> > > > Randy
> > > >
> > > > — Ratmil Torres wrote:
> > > > > Hi, everybody,
> > > > > I have made a filter driver and I am using
> > > shadow
> > > > > devices to avoid reentrancy (as in a Tony
> > > Mason’s
> > > > > article).
> > > > > When I receive a call to a shadow device I
> do
> > > this :
> > > > >
> > > > > // IoSkipCurrentIrpStackLocation
> > > > > Irp->CurrentLocation++;
> > > > > Irp->Tail.Overlay.CurrentStackLocation++;
> > > > >
> > > > >
> > >
> IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > > > Irp);
> > > > >
> > > > >
> > > > > This works OK almost all the time, except
> when I
> > > try
> > > > > to open a file in my PC from a remote PC.
> When
> > > that
> > > > > happens the process never (waited until 10
> > > seconds)
> > > > > returns from the call to IoCallDriver. Am I
> > > doing
> > > > > something wrong?
> > > > > Thanks.
> > > > >
> > > > >
> > > > > —
> > > > > You are currently subscribed to ntfsd as:
> > > > > xxxxx@yahoo.com
> > > > > To unsubscribe send a blank email to
> > > > > xxxxx@lists.osr.com
> > > > >
> > > >
> > > >
> > > >
> > > > Do you Yahoo!?
> > > > Yahoo! Calendar - Free online calendar with
> sync
> > > to Outlook™.
> > > > http://calendar.yahoo.com
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntfsd as:
> > > xxxxx@seg.inf.cu
> > > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > > >
> > > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as:
> > > xxxxx@yahoo.com
> > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > >
> >
> >
> >

> > Do you Yahoo!?
> > Yahoo! Calendar - Free online calendar with sync
> to Outlook™.
> > http://calendar.yahoo.com
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> xxxxx@osr.com
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> > —
> > You are currently subscribed to ntfsd as:
> xxxxx@seg.inf.cu
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
> >
>
>
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook™.
http://calendar.yahoo.com

After I applied SP3 to my Win2000 Pro box, I don’t see
the problem.

Randy

— Tony Mason wrote:
> 30 seconds indicates you are hitting a “timeout” on
> CIFS…
>
> What version of Windows (including service packs)
> are you using?
>
> Regards,
>
> Tony
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
>
>
> -----Original Message-----
> From: Randy Cook [mailto:xxxxx@yahoo.com]
> Sent: Tuesday, June 03, 2003 6:33 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: shadow devices
>
> Well, there is something going on. When I follow
> your
> steps exactly I sometimes see a delay (~30 secs) and
> sometimes it hangs.
>
> This only happens when I map a drive to the local
> machine. Remote access doesn’t appear to have the
> same problem.
>
> I don’t have time to get into it right now, but when
> I
> do I’ll let you know.
>
> Randy
>
> — Ratmil Torres wrote:
> > Thanks, I did just as you say, that worked. Now it
> > only happens when the following conditions met :
> >
> > -I have mapped a networked drive, for example J:
> to
> > \MyLocalPC\AnyFolder.
> > -“MyLocalPC” is the local PC, so it is drive map
> to
> > the local hard drive.
> > - I try to open a file like “j:\file.exe”.
> > - So this create call is sent to the
> > NetworkRedirector (I guess, anyway it is sent to
> > some driver). And then it is sent again to NTFS
> (or
> > FAT or any other).
> >
> > I changed my code to :
> >
> > IoSkipCurrentIrpStackLocation(Irp);
> > IoCallDriver(PtrTargetDevice, Irp);
> > // And it never returns here.
> >
> > ----- Original Message -----
> > From: “Randy Cook”
> > To: “File Systems Developers”
>
> > Sent: Monday, June 02, 2003 8:02 PM
> > Subject: [ntfsd] Re: shadow devices
> >
> >
> > > I’m not sure what your code is trying to do, but
> > I’m
> > > pretty sure you have to copy the stack location.
>
> > > IoSkipCurrentIrpStackLocation does this for you.
>
> > What
> > > happens if you comment out lines 2 and 3 and
> > uncomment
> > > line 1?
> > >
> > > I am using this technique as well, and I haven’t
> > seen
> > > the behavior you are describing.
> > >
> > > Randy
> > >
> > > — Ratmil Torres wrote:
> > > > Hi, everybody,
> > > > I have made a filter driver and I am using
> > shadow
> > > > devices to avoid reentrancy (as in a Tony
> > Mason’s
> > > > article).
> > > > When I receive a call to a shadow device I do
> > this :
> > > >
> > > > // IoSkipCurrentIrpStackLocation
> > > > Irp->CurrentLocation++;
> > > > Irp->Tail.Overlay.CurrentStackLocation++;
> > > >
> > > >
> >
> IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > > Irp);
> > > >
> > > >
> > > > This works OK almost all the time, except when
> I
> > try
> > > > to open a file in my PC from a remote PC. When
> > that
> > > > happens the process never (waited until 10
> > seconds)
> > > > returns from the call to IoCallDriver. Am I
> > doing
> > > > something wrong?
> > > > Thanks.

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook™.
http://calendar.yahoo.com

Well, I will try. And I will try with NT.
----- Original Message -----
From: “Randy Cook”
To: “File Systems Developers”
Sent: Wednesday, June 04, 2003 6:10 PM
Subject: [ntfsd] Re: shadow devices

> After I applied SP3 to my Win2000 Pro box, I don’t see
> the problem.
>
> Randy
>
> — Tony Mason wrote:
> > 30 seconds indicates you are hitting a “timeout” on
> > CIFS…
> >
> > What version of Windows (including service packs)
> > are you using?
> >
> > Regards,
> >
> > Tony
> >
> > Tony Mason
> > Consulting Partner
> > OSR Open Systems Resources, Inc.
> > http://www.osr.com
> >
> >
> > -----Original Message-----
> > From: Randy Cook [mailto:xxxxx@yahoo.com]
> > Sent: Tuesday, June 03, 2003 6:33 PM
> > To: File Systems Developers
> > Subject: [ntfsd] Re: shadow devices
> >
> > Well, there is something going on. When I follow
> > your
> > steps exactly I sometimes see a delay (~30 secs) and
> > sometimes it hangs.
> >
> > This only happens when I map a drive to the local
> > machine. Remote access doesn’t appear to have the
> > same problem.
> >
> > I don’t have time to get into it right now, but when
> > I
> > do I’ll let you know.
> >
> > Randy
> >
> > — Ratmil Torres wrote:
> > > Thanks, I did just as you say, that worked. Now it
> > > only happens when the following conditions met :
> > >
> > > -I have mapped a networked drive, for example J:
> > to
> > > \MyLocalPC\AnyFolder.
> > > -“MyLocalPC” is the local PC, so it is drive map
> > to
> > > the local hard drive.
> > > - I try to open a file like “j:\file.exe”.
> > > - So this create call is sent to the
> > > NetworkRedirector (I guess, anyway it is sent to
> > > some driver). And then it is sent again to NTFS
> > (or
> > > FAT or any other).
> > >
> > > I changed my code to :
> > >
> > > IoSkipCurrentIrpStackLocation(Irp);
> > > IoCallDriver(PtrTargetDevice, Irp);
> > > // And it never returns here.
> > >
> > > ----- Original Message -----
> > > From: “Randy Cook”
> > > To: “File Systems Developers”
> >
> > > Sent: Monday, June 02, 2003 8:02 PM
> > > Subject: [ntfsd] Re: shadow devices
> > >
> > >
> > > > I’m not sure what your code is trying to do, but
> > > I’m
> > > > pretty sure you have to copy the stack location.
> >
> > > > IoSkipCurrentIrpStackLocation does this for you.
> >
> > > What
> > > > happens if you comment out lines 2 and 3 and
> > > uncomment
> > > > line 1?
> > > >
> > > > I am using this technique as well, and I haven’t
> > > seen
> > > > the behavior you are describing.
> > > >
> > > > Randy
> > > >
> > > > — Ratmil Torres wrote:
> > > > > Hi, everybody,
> > > > > I have made a filter driver and I am using
> > > shadow
> > > > > devices to avoid reentrancy (as in a Tony
> > > Mason’s
> > > > > article).
> > > > > When I receive a call to a shadow device I do
> > > this :
> > > > >
> > > > > // IoSkipCurrentIrpStackLocation
> > > > > Irp->CurrentLocation++;
> > > > > Irp->Tail.Overlay.CurrentStackLocation++;
> > > > >
> > > > >
> > >
> > IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > > > Irp);
> > > > >
> > > > >
> > > > > This works OK almost all the time, except when
> > I
> > > try
> > > > > to open a file in my PC from a remote PC. When
> > > that
> > > > > happens the process never (waited until 10
> > > seconds)
> > > > > returns from the call to IoCallDriver. Am I
> > > doing
> > > > > something wrong?
> > > > > Thanks.
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook™.
> http://calendar.yahoo.com
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Hi, Mr. Mason.
I installed Service Pack 3 on Windows 2000 Advanced Server and I still have
the same problem.
----- Original Message -----
From: “Tony Mason”
To: “File Systems Developers”
Sent: Tuesday, June 03, 2003 7:45 PM
Subject: [ntfsd] Re: shadow devices

> 30 seconds indicates you are hitting a “timeout” on CIFS…
>
> What version of Windows (including service packs) are you using?
>
> Regards,
>
> Tony
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com
>
>
> -----Original Message-----
> From: Randy Cook [mailto:xxxxx@yahoo.com]
> Sent: Tuesday, June 03, 2003 6:33 PM
> To: File Systems Developers
> Subject: [ntfsd] Re: shadow devices
>
> Well, there is something going on. When I follow your
> steps exactly I sometimes see a delay (~30 secs) and
> sometimes it hangs.
>
> This only happens when I map a drive to the local
> machine. Remote access doesn’t appear to have the
> same problem.
>
> I don’t have time to get into it right now, but when I
> do I’ll let you know.
>
> Randy
>
> — Ratmil Torres wrote:
> > Thanks, I did just as you say, that worked. Now it
> > only happens when the following conditions met :
> >
> > -I have mapped a networked drive, for example J: to
> > \MyLocalPC\AnyFolder.
> > -“MyLocalPC” is the local PC, so it is drive map to
> > the local hard drive.
> > - I try to open a file like “j:\file.exe”.
> > - So this create call is sent to the
> > NetworkRedirector (I guess, anyway it is sent to
> > some driver). And then it is sent again to NTFS (or
> > FAT or any other).
> >
> > I changed my code to :
> >
> > IoSkipCurrentIrpStackLocation(Irp);
> > IoCallDriver(PtrTargetDevice, Irp);
> > // And it never returns here.
> >
> > ----- Original Message -----
> > From: “Randy Cook”
> > To: “File Systems Developers”
> > Sent: Monday, June 02, 2003 8:02 PM
> > Subject: [ntfsd] Re: shadow devices
> >
> >
> > > I’m not sure what your code is trying to do, but
> > I’m
> > > pretty sure you have to copy the stack location.
> > > IoSkipCurrentIrpStackLocation does this for you.
> > What
> > > happens if you comment out lines 2 and 3 and
> > uncomment
> > > line 1?
> > >
> > > I am using this technique as well, and I haven’t
> > seen
> > > the behavior you are describing.
> > >
> > > Randy
> > >
> > > — Ratmil Torres wrote:
> > > > Hi, everybody,
> > > > I have made a filter driver and I am using
> > shadow
> > > > devices to avoid reentrancy (as in a Tony
> > Mason’s
> > > > article).
> > > > When I receive a call to a shadow device I do
> > this :
> > > >
> > > > // IoSkipCurrentIrpStackLocation
> > > > Irp->CurrentLocation++;
> > > > Irp->Tail.Overlay.CurrentStackLocation++;
> > > >
> > > >
> > IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > > Irp);
> > > >
> > > >
> > > > This works OK almost all the time, except when I
> > try
> > > > to open a file in my PC from a remote PC. When
> > that
> > > > happens the process never (waited until 10
> > seconds)
> > > > returns from the call to IoCallDriver. Am I
> > doing
> > > > something wrong?
> > > > Thanks.
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntfsd as:
> > > > xxxxx@yahoo.com
> > > > To unsubscribe send a blank email to
> > > > xxxxx@lists.osr.com
> > > >
> > >
> > >
> > >
> > > Do you Yahoo!?
> > > Yahoo! Calendar - Free online calendar with sync
> > to Outlook™.
> > > http://calendar.yahoo.com
> > >
> > >
> > > —
> > > You are currently subscribed to ntfsd as:
> > xxxxx@seg.inf.cu
> > > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> > >
> > >
> >
> >
> > —
> > You are currently subscribed to ntfsd as:
> > xxxxx@yahoo.com
> > To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
>
>
>

> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook™.
> http://calendar.yahoo.com
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@osr.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Here it did not work on Windows 2000 Advance Server, Service Park 3.
----- Original Message -----
From: “Ratmil Torres”
To: “File Systems Developers”
Sent: Thursday, June 05, 2003 8:46 AM
Subject: [ntfsd] Re: shadow devices

> Well, I will try. And I will try with NT.
> ----- Original Message -----
> From: “Randy Cook”
> To: “File Systems Developers”
> Sent: Wednesday, June 04, 2003 6:10 PM
> Subject: [ntfsd] Re: shadow devices
>
>
> > After I applied SP3 to my Win2000 Pro box, I don’t see
> > the problem.
> >
> > Randy
> >
> > — Tony Mason wrote:
> > > 30 seconds indicates you are hitting a “timeout” on
> > > CIFS…
> > >
> > > What version of Windows (including service packs)
> > > are you using?
> > >
> > > Regards,
> > >
> > > Tony
> > >
> > > Tony Mason
> > > Consulting Partner
> > > OSR Open Systems Resources, Inc.
> > > http://www.osr.com
> > >
> > >
> > > -----Original Message-----
> > > From: Randy Cook [mailto:xxxxx@yahoo.com]
> > > Sent: Tuesday, June 03, 2003 6:33 PM
> > > To: File Systems Developers
> > > Subject: [ntfsd] Re: shadow devices
> > >
> > > Well, there is something going on. When I follow
> > > your
> > > steps exactly I sometimes see a delay (~30 secs) and
> > > sometimes it hangs.
> > >
> > > This only happens when I map a drive to the local
> > > machine. Remote access doesn’t appear to have the
> > > same problem.
> > >
> > > I don’t have time to get into it right now, but when
> > > I
> > > do I’ll let you know.
> > >
> > > Randy
> > >
> > > — Ratmil Torres wrote:
> > > > Thanks, I did just as you say, that worked. Now it
> > > > only happens when the following conditions met :
> > > >
> > > > -I have mapped a networked drive, for example J:
> > > to
> > > > \MyLocalPC\AnyFolder.
> > > > -“MyLocalPC” is the local PC, so it is drive map
> > > to
> > > > the local hard drive.
> > > > - I try to open a file like “j:\file.exe”.
> > > > - So this create call is sent to the
> > > > NetworkRedirector (I guess, anyway it is sent to
> > > > some driver). And then it is sent again to NTFS
> > > (or
> > > > FAT or any other).
> > > >
> > > > I changed my code to :
> > > >
> > > > IoSkipCurrentIrpStackLocation(Irp);
> > > > IoCallDriver(PtrTargetDevice, Irp);
> > > > // And it never returns here.
> > > >
> > > > ----- Original Message -----
> > > > From: “Randy Cook”
> > > > To: “File Systems Developers”
> > >
> > > > Sent: Monday, June 02, 2003 8:02 PM
> > > > Subject: [ntfsd] Re: shadow devices
> > > >
> > > >
> > > > > I’m not sure what your code is trying to do, but
> > > > I’m
> > > > > pretty sure you have to copy the stack location.
> > >
> > > > > IoSkipCurrentIrpStackLocation does this for you.
> > >
> > > > What
> > > > > happens if you comment out lines 2 and 3 and
> > > > uncomment
> > > > > line 1?
> > > > >
> > > > > I am using this technique as well, and I haven’t
> > > > seen
> > > > > the behavior you are describing.
> > > > >
> > > > > Randy
> > > > >
> > > > > — Ratmil Torres wrote:
> > > > > > Hi, everybody,
> > > > > > I have made a filter driver and I am using
> > > > shadow
> > > > > > devices to avoid reentrancy (as in a Tony
> > > > Mason’s
> > > > > > article).
> > > > > > When I receive a call to a shadow device I do
> > > > this :
> > > > > >
> > > > > > // IoSkipCurrentIrpStackLocation
> > > > > > Irp->CurrentLocation++;
> > > > > > Irp->Tail.Overlay.CurrentStackLocation++;
> > > > > >
> > > > > >
> > > >
> > > IoCallDriver(PtrDeviceExtension->TargetDeviceObject,
> > > > > > Irp);
> > > > > >
> > > > > >
> > > > > > This works OK almost all the time, except when
> > > I
> > > > try
> > > > > > to open a file in my PC from a remote PC. When
> > > > that
> > > > > > happens the process never (waited until 10
> > > > seconds)
> > > > > > returns from the call to IoCallDriver. Am I
> > > > doing
> > > > > > something wrong?
> > > > > > Thanks.
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Calendar - Free online calendar with sync to Outlook™.
> > http://calendar.yahoo.com
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Hi everybody,
I have a little problem that I posted some days ago. I have a filter driver and I am using shadows devices to avoid reentrancy. It has worked OK except when there is a network map, which happens to be mapped to the local PC. That is, for example J is mapped to \MyPC\SomeFolder where MyPc is the local PC.
So, when any process tries to open a file with name “J:\anyfile.exe”, that file is intercepted twice by my filter. Once from the network redirector and another from the NTFS driver. That makes no problem to my driver, the file is filtered twice without any problem, at least the first time. When my driver intercepts a file openning it reopens the file using a shadow device to avoid reentrancy. The first time this happens everything is done all right. But if the same process tries to open the file again, it stays waiting for a mutex object eternally. I discovered this using SoftIce, the last instruction executed is at 0008:F9CF24A2, a call to KeWaitForMutexObject. This instruction is reached only the second time, the first time execution doesn’t get to that point.
What might be the reason why this is happening? It is happening in PC with Windows 2000 Advanced Server Service Pack 3.
I hope that someone helps me.
Thanks in advance.