In the Shared Folders Management Console, most sysadmins are quite familiar with the "Open Files" section, but I've never really felt the need to distinguish between the "Open Mode" column, and Number of Locks ("# Locks").
We're having issues with a particular application and file locks at the moment so I'm questioning it. I don't want to digress into that, just trying to learn the difference between those 2 columns. I've tried googling and not been able to find an answer.
I previously thought that if there were 0 "# Locks", then it was opened read only. But I notice the "Open Mode" can be read, write, or Write+Read. So how can it be opened for writing but not be locked?
I'm guessing it's referring to a specific type of locking but not sure what.
File locking is a mechanism that restricts access to a file by allowing only one user (=process) to access it in a specific time. The hosting filesystem is expected to totally block (delay) any other access in this time.
Almost all modern FS implement locking to prevent the interceding update scenario, which is a typical example of race condition. This enforces the serialization of update processes to a file. Wikipedia has more about Locking.
Opening files will not be restricted by the hosting system. The files content may be read a 1000 times simultaneously.