flock() fail between NFSv4 server (Linux 3.0/3.2) and client (works with two clients)
If, on NFSv4 client 1, I:
Code:
strace flock -x ./test -c "sleep 60" Code:
flock(3, LOCK_EX) = 0 Code:
flock(3, LOCK_EX Code:
flock(3, LOCK_EX) = 0 rpc.statd, lockd, (portmapper: nlockmgr, status) are all running on all clients and also the server. I've reproduced this on 3.0 and 3.2 kernels and on Ubuntu (12.04) and SuSE (SLES11SP2) Is it expected behavior? One workaround is to have the NFS server mount itself, then third-party apps depending on flock() still work. I know that in the ancient past, flock() did not work over NFS, but now it ..almost does? Does anyone get "proper" behavior with NFSv4 server and client flocks? |
Quote:
Code:
/* We're simulating flock() locks using posix locks on the server */ http://0pointer.de/blog/projects/locking2.html http://0pointer.de/blog/projects/locking.html |
All times are GMT -5. The time now is 10:03 AM. |