As posix-locks is loaded on server side, it will be visible to all the the clients, hence the distributed locking works. Also, if your question was how unify (or any cluster translator) handles it? its same as how it handles any other 'fd' based operation. In AFR, lk() request is sent to all the nodes, and locking is done on all the servers, where file exists. And in stripe, again, lk() fop is sent to all the servers where the file exists. -amar On 7/12/07, Vikas Gorur <vikas@xxxxxxxxxxxxx> wrote:
On Wed, Jul 11, 2007 at 09:53:58PM -0300, Daniel van Ham Colchete wrote: > People, > > what's the current design of locks in GlusterFS? I couldn't find the answer > looking the sources. > > Being more specific: how does cluster/unify and cluter/afr handle flock() > and fcntl byte-ranged advisory locking? Is this lock cluster-aware? I'm > considering only normal circumstances. I'm not worried with split-brain or > another type of rare situations. POSIX record locking support is provided by the posix-locks translator in GlusterFS (features/posix-locks). It supports both advisory and mandatory locking. You'd want to load this translator on each server, so that a lock would be visible to all clients. Spec file example: volume locks type features/posix-locks subvolumes brick1 # option mandatory on end-volume Vikas _______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxx http://lists.nongnu.org/mailman/listinfo/gluster-devel
-- Amar Tumballi http://amar.80x25.org [bulde on #gluster/irc.gnu.org]