Apart from any race conditions this entails, we all know how difficult it is to keep track of which hosts have mounted file systems from an NFS server. A wants to write to file foobar on the NFS server. Server honors request, writes data, transmits reply. Reply gets lost. Client A times out, retransmits request.
Server receives request, tries to write data, fails because of lock.
A returns error to process, which quits, leaving a half-modified file lying around on the server. Admittedly, this problem would not exist when client A would also lock the file prior to writing. But cases like these are exactly the very reason for having lock enforcement. If all processes had to lock their files anyway to avoid corruption, then we're back at where we started, and advisory locking would be enough. Last updated July 15, 1995.