I have a driver that emulates a CD-ROM drive. On the virtual CD-ROM disk,
there is a file, \file.bin, 100 KB in size. Note the file is read-only,
though CDFS wouldn’t allow one to write to the file anyway.
The content (but not the size) of the file may change from beneath CDFS.
Essentially, the file dynamically reflects the state of some external
objects. The changes are infrequent - a few changes per hour. So far so
good, unless the CD-ROM is shared and the file is accessed across the
network.
The problem is with RDR requesting an oplock on the file. The remote clients
only see the local cache and not the changes occurred to the file timestamp
and data since the file was opened. We solved the problem a few years ago by
adding a filter driver on client PCs that does nothing but fails oplock
requests.
Now it’s time to update the driver. We don’t want to leave the filter driver
in place, as it’s not a clean solution and adds unnecessary complexity to
the system.
My question is, how can break all oplocks for a given file or the whole CD
(I guess, we have only Level 2 oplocks) from within the virtual CD-ROM
driver? Once the driver sees the data change, it could break the oplocks and
force the clients to discard the local cache and re-read the file from the
server.
Thanks