The opportunistic lock (oplock) function allows an application to open a file that might be used by multiple applications, as though it was the only application using the file if the application makes the first open request. For example, there may be a log file that could be written to by multiple applications, but normally only one application actively uses (either reads or writes) the log file. The application that actively uses the log could open it via oplock as though it was the exclusive user of the log file, without having to lock file range bytes as it added to the log file. It also means the changes to the open file can be made on the client (application) side of the connection and be written in bulk at a later time, a potential performance improvement.
When a second application requests access to a file with an outstanding oplock, the initial application having the existing oplock is notified by the server as seen below in your trace record 1. The prior application, if acting politely, will then flush it's buffers and write any file changes to the server. After writing the changes the first application typically issues a lock for only the range of bytes it needs to use, releasing the overall lock of the file. From the snippet below, it looks like the original application is not releasing it's lock on the file.
Trace the FID (file handle) in the packets below back through earlier trace records to identify an OpenX, Open, Create or MakeNew SMB request which should then identify the file that is being opportunisticly locked. That may provide you some additional hints about which application is issuing the original oplock and why it might delay releasing an oplock. If the previous Open etc. command is not in the trace, you may have to take a longer trace in order to identify the original oplock request.
The symptom of a client hanging up would be consistent with an oplock not being released by the first file user when the hanging client is asking for access to the same file.
Alan Emery
IBM Global Solution Center
Prize Jose <PJose@xxxxxxx>
Sent by: ethereal-users-bounces@xxxxxxxxxxxx 03/02/2005 10:38 AM
|
|
Powered by MHonArc 2.6.10