gpvcs@xxxxxxxxxx wrote:
In my configuration I noticed that locks are sticky. I dont
know why but I found this behaviour:
- first client open file, lock it (fcntl) and write to it
and close it OK
- second client open file, try to lock it and wait (fcntl
SETLKW), obtain the lock, write to it and close it OK
- first client open file, try to lock it and wait FOREVER
(fcntl SETLW) KO!
- second client open file, try to lock it and wait FOREVER
(fcntl SETLW) KO!
In fact it looks like that lock obtain by SETLKW are never
released.
On the other hand, locks obtain by GETLW/SETLK are released.
I know you are busy working on the lock code. Do you see any
reason for this behaviour ?
This was a bug in the locking code. The fix is in the tla repo now.
Also, POSIX locking support has been moved into a separate translator
now (features/posix-locks). This will give us locking support over other
storage backends as well (for example Amazon S3).
Typically you'd want to load it on the server side, just above the
storage xlator.
volume locks
type features/posix-locks
subvolumes brick
end-volume
HTH,
Vikas