Oplock completion

During an OPLOCK FSCTRL Irp I added some code to synchronize the completion
back to the main line of the Irp. I have found that now the application
hangs and it takes a minute for the OPLOCK request to complete, in which
case my completion routine gets called. The application is never able to
open the file. The code I use to synchronize back to the Irp mainline is
standard code used elsewhere so I don’t think its causing the problem.

Is there something about OPLOCKS which prevents me from using a completion
routine and synchronizing back to the IRP main-line?

Ken


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

Ken,

In many cases, the Irp is not completed by the FSD right away. If you notice
in the Fat source, the only time the Irp is completed synchronously is when
the OpLock is not granted or when there is some type of failure. FSD’s
generally utilize the FsRtl OpLock package for handling these Irps and hence
rarely complete them inline.

Pete

Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 1:54 PM
To: File Systems Developers
Subject: [ntfsd] Oplock completion

During an OPLOCK FSCTRL Irp I added some code to synchronize the
completion back to the main line of the Irp. I have found that now the
application hangs and it takes a minute for the OPLOCK request to complete,
in which case my completion routine gets called. The application is never
able to open the file. The code I use to synchronize back to the Irp
mainline is standard code used elsewhere so I don’t think its causing the
problem.

Is there something about OPLOCKS which prevents me from using a completion
routine and synchronizing back to the IRP main-line?

Ken

You are currently subscribed to ntfsd as: xxxxx@home.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

Pete,
Thanks, I understand that it does not complete right away, but why does my
having a completion routine suddenly cause the application hanging behavior.
The application hangs for minute and then fails to open the intended file.
My completion routine is called with a status zero at the time the
application gives up.
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Peter Scott
Sent: Tuesday, November 27, 2001 6:43 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Ken,

In many cases, the Irp is not completed by the FSD right away. If you
notice in the Fat source, the only time the Irp is completed synchronously
is when the OpLock is not granted or when there is some type of failure.
FSD’s generally utilize the FsRtl OpLock package for handling these Irps and
hence rarely complete them inline.

Pete

Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 1:54 PM
To: File Systems Developers
Subject: [ntfsd] Oplock completion

During an OPLOCK FSCTRL Irp I added some code to synchronize the
completion back to the main line of the Irp. I have found that now the
application hangs and it takes a minute for the OPLOCK request to complete,
in which case my completion routine gets called. The application is never
able to open the file. The code I use to synchronize back to the Irp
mainline is standard code used elsewhere so I don’t think its causing the
problem.

Is there something about OPLOCKS which prevents me from using a
completion routine and synchronizing back to the IRP main-line?

Ken

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

You are currently subscribed to ntfsd as: xxxxx@legato.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

Never mind! I figured out what was causing the delay. A lock was being held
pending the completion of the IRP. Thanks,
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 7:39 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Pete,
Thanks, I understand that it does not complete right away, but why does my
having a completion routine suddenly cause the application hanging behavior.
The application hangs for minute and then fails to open the intended file.
My completion routine is called with a status zero at the time the
application gives up.
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Peter Scott
Sent: Tuesday, November 27, 2001 6:43 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Ken,

In many cases, the Irp is not completed by the FSD right away. If you
notice in the Fat source, the only time the Irp is completed synchronously
is when the OpLock is not granted or when there is some type of failure.
FSD’s generally utilize the FsRtl OpLock package for handling these Irps and
hence rarely complete them inline.

Pete

Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 1:54 PM
To: File Systems Developers
Subject: [ntfsd] Oplock completion

During an OPLOCK FSCTRL Irp I added some code to synchronize the
completion back to the main line of the Irp. I have found that now the
application hangs and it takes a minute for the OPLOCK request to complete,
in which case my completion routine gets called. The application is never
able to open the file. The code I use to synchronize back to the Irp
mainline is standard code used elsewhere so I don’t think its causing the
problem.

Is there something about OPLOCKS which prevents me from using a
completion routine and synchronizing back to the IRP main-line?

Ken

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

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

You are currently subscribed to ntfsd as: xxxxx@legato.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

Sorry, Never mind! the Never mind. The delay is not cause by a lock, it was
just a reference counter. Any ideas on the application hang?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 7:48 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Never mind! I figured out what was causing the delay. A lock was being
held pending the completion of the IRP. Thanks,
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 7:39 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Pete,
Thanks, I understand that it does not complete right away, but why does
my having a completion routine suddenly cause the application hanging
behavior. The application hangs for minute and then fails to open the
intended file. My completion routine is called with a status zero at the
time the application gives up.
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Peter Scott
Sent: Tuesday, November 27, 2001 6:43 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Ken,

In many cases, the Irp is not completed by the FSD right away. If you
notice in the Fat source, the only time the Irp is completed synchronously
is when the OpLock is not granted or when there is some type of failure.
FSD’s generally utilize the FsRtl OpLock package for handling these Irps and
hence rarely complete them inline.

Pete

Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 1:54 PM
To: File Systems Developers
Subject: [ntfsd] Oplock completion

During an OPLOCK FSCTRL Irp I added some code to synchronize the
completion back to the main line of the Irp. I have found that now the
application hangs and it takes a minute for the OPLOCK request to complete,
in which case my completion routine gets called. The application is never
able to open the file. The code I use to synchronize back to the Irp
mainline is standard code used elsewhere so I don’t think its causing the
problem.

Is there something about OPLOCKS which prevents me from using a
completion routine and synchronizing back to the IRP main-line?

Ken

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

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

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

You are currently subscribed to ntfsd as: xxxxx@legato.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

Ken,

I would suspect that blocking the original requestor thread may not be what
the FsRtl OpLock package intended you to do. Instead of blocking the main
line thread you may want to set your completion routine and return as normal
processing is handled. Then within your completion routine you can queue up
a worker request and return MORE_PROCESSING_REQUIRED. Then in your worker
request processing perform the completion of the Irp as you see fit.

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 8:13 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Sorry, Never mind! the Never mind. The delay is not cause by a lock, it
was just a reference counter. Any ideas on the application hang?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 7:48 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Never mind! I figured out what was causing the delay. A lock was being
held pending the completion of the IRP. Thanks,
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 7:39 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Pete,
Thanks, I understand that it does not complete right away, but why
does my having a completion routine suddenly cause the application hanging
behavior. The application hangs for minute and then fails to open the
intended file. My completion routine is called with a status zero at the
time the application gives up.
Ken
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Peter Scott
Sent: Tuesday, November 27, 2001 6:43 PM
To: File Systems Developers
Subject: [ntfsd] RE: Oplock completion

Ken,

In many cases, the Irp is not completed by the FSD right away. If
you notice in the Fat source, the only time the Irp is completed
synchronously is when the OpLock is not granted or when there is some type
of failure. FSD’s generally utilize the FsRtl OpLock package for handling
these Irps and hence rarely complete them inline.

Pete

Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Ken Galipeau
Sent: Tuesday, November 27, 2001 1:54 PM
To: File Systems Developers
Subject: [ntfsd] Oplock completion

During an OPLOCK FSCTRL Irp I added some code to synchronize the
completion back to the main line of the Irp. I have found that now the
application hangs and it takes a minute for the OPLOCK request to complete,
in which case my completion routine gets called. The application is never
able to open the file. The code I use to synchronize back to the Irp
mainline is standard code used elsewhere so I don’t think its causing the
problem.

Is there something about OPLOCKS which prevents me from using a
completion routine and synchronizing back to the IRP main-line?

Ken

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

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

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

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

You are currently subscribed to ntfsd as: xxxxx@home.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