Re: [Gluster-devel] Question about EC locking

2017-01-13 Thread Xavier Hernandez
Hi, On 13/01/17 10:58, jayakrishnan mm wrote: Hi Xavier, I went through the source code. Some questions remain. 1. If two clients try to write to same file, it should succeed, even if they overlap. (Locks should ensure it happens in sequence, in the bricks). from the source code

Re: [Gluster-devel] Question about EC locking

2017-01-13 Thread jayakrishnan mm
Hi Xavier, I went through the source code. Some questions remain. 1. If two clients try to write to same file, it should succeed, even if they overlap. (Locks should ensure it happens in sequence, in the bricks). from the source code lock->flock.l_type = F_WRLCK;

Re: [Gluster-devel] Question about EC locking

2016-12-12 Thread Xavier Hernandez
Hi JK, On 12/13/2016 08:34 AM, jayakrishnan mm wrote: Dear Xavi, How do I test the locks, for example locks for write fop. I have two clients(independent), both are trying to write to same file. 1. According to my understanding, both can successfully write if the offsets don't overlap

Re: [Gluster-devel] Question about EC locking

2016-12-12 Thread jayakrishnan mm
Dear Xavi, How do I test the locks, for example locks for write fop. I have two clients(independent), both are trying to write to same file. 1. According to my understanding, both can successfully write if the offsets don't overlap . I mean, the WRITE FOP takes a chunk lock on the file .

Re: [Gluster-devel] Question about EC locking

2016-11-30 Thread jayakrishnan mm
Hi Xavier, Thank you very much for your explanation. This helped me to understand more about locking in EC. Best Regards JK On Mon, Nov 28, 2016 at 4:17 PM, Xavier Hernandez wrote: > Hi, > > On 11/28/2016 02:59 AM, jayakrishnan mm wrote: > >> Hi Xavier, >> >> Notice

Re: [Gluster-devel] Question about EC locking

2016-11-28 Thread Xavier Hernandez
Hi, On 11/28/2016 02:59 AM, jayakrishnan mm wrote: Hi Xavier, Notice that EC xlator uses blocking locks. Any specific reason for this? In a distributed filesystem like gluster a synchronization mechanism is a must to avoid data corruption. Do you think this will affect the

[Gluster-devel] Question about EC locking

2016-11-27 Thread jayakrishnan mm
Hi Xavier, Notice that EC xlator uses blocking locks. Any specific reason for this? Do you think this will affect the performance ? (In comparison AFR first tries non blocking locks and if not successful, tries blocking locks then) Also, why two locks are needed per FOP ? One for

[Gluster-devel] Question about EC Locking

2016-11-27 Thread jayakrishnan mm
Hi Xavier, Noticed that EC xlator uses blocking locks. Any specific reason for this ? Do you think this will affect the read/write performance ? ___ Gluster-devel mailing list Gluster-devel@gluster.org