Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting... Please check out the Community Guidelines in the
Announcements and Administration Category, below.

Question on FSCTL_REQUEST_OPLOCK

What happens if I neglect the oplocks functions,
that is, what happens if I do not call the oplock functions in IRP_MJ_CREATE and IRP_MJ_CLEANUP
AND
that I always return STATUS_SUCCESS in ioctl function FSCTL_REQUEST_OPLOCK ????

How will behave Windows 10?
Why do that ?
Because I can not stop / restart the machine because some opLocks functions used (difficult applicatio).
I have some problems with oplocks.

Comments

  • You do not call oplock functions. The oplock functions are being called and you just filter them and have you filter behave accordingly.
    You pretty much will have to go ahead and see the oplock semantics and implement your filtering accordingly.
    The short version is: save the oplock file object and use that in your I/O ( alternatively there could also be an oplock key specified through ECP to use your own FO).
    The long version is slightly more complicated and you will need to maintain internal states of the oplocked file and do I/O when possible without breaking the oplock yourself.
    You could very well get away with it by simply ignoring everything but I don't know what your filter does and what scenarios need I/O.
    Keep in mind that oplocks could be used even locally to access any file, not just network files. Windows Defender for example uses filter oplocks ( or used to anyway ) to scan files locally.
    If you want more help you will need to provide more on the problem you are facing now, like a particular deadlock scenario and such. Your question is too generic to receive a concrete answer.

    Gabriel
    www.kasardia.com

    Cheers,
    Gabriel

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!