Message 2 of 2
27 Dec 17 03:31
Join Date: 03 Mar 2008
Posts To This List: 319
Question on FSCTL_REQUEST_OPLOCK
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.