Reliable file locking in network files

I read that locking files in network files is not very reliable .

I use win32-api LockFile / LockFileEx / UnlockFile functions for locking ranges. Does anyone have experience using these functions in files that live on a network share?

+3
source share
1 answer

Win32 file locking mechanisms are reliable if they run on a remote CIFS share. There were many flat file databases that worked reliably enough, using these mechanisms for decades.

They are unreliable if they are made on a remote NFS share (as Jim Lewis mentioned).

+2

Source: https://habr.com/ru/post/1714787/


All Articles